summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb3
-rw-r--r--meta/packages/ipkg-utils/ipkg-utils/index_speedup.patch53
-rw-r--r--meta/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb5
3 files changed, 58 insertions, 3 deletions
diff --git a/meta/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb b/meta/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
index ab8f4d63e0..bfb91f2f56 100644
--- a/meta/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
+++ b/meta/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
@@ -2,12 +2,13 @@ include ipkg-utils_${PV}.bb
2SRC_URI += "file://ipkg-utils-fix.patch;patch=1" 2SRC_URI += "file://ipkg-utils-fix.patch;patch=1"
3 3
4RDEPENDS = "" 4RDEPENDS = ""
5PR = "r7" 5PR = "r8"
6 6
7inherit native 7inherit native
8 8
9# Avoid circular dependencies from package_ipk.bbclass 9# Avoid circular dependencies from package_ipk.bbclass
10PACKAGES = "" 10PACKAGES = ""
11FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/ipkg-utils"
11 12
12do_stage() { 13do_stage() {
13 for i in ${INSTALL}; do 14 for i in ${INSTALL}; do
diff --git a/meta/packages/ipkg-utils/ipkg-utils/index_speedup.patch b/meta/packages/ipkg-utils/ipkg-utils/index_speedup.patch
new file mode 100644
index 0000000000..bef28a9df1
--- /dev/null
+++ b/meta/packages/ipkg-utils/ipkg-utils/index_speedup.patch
@@ -0,0 +1,53 @@
1Index: ipkg-utils/ipkg-make-index
2===================================================================
3--- ipkg-utils.orig/ipkg-make-index 2005-03-20 18:10:54.000000000 +0000
4+++ ipkg-utils/ipkg-make-index 2006-07-24 09:18:16.000000000 +0100
5@@ -37,6 +37,21 @@
6 if os.path.exists(pkg_dir + "/" + filename + ".asc"):
7 os.rename(pkg_dir + "/" + filename + ".asc", locale_dir + "/" + filename + ".asc")
8
9+def md5sum(file):
10+ import md5
11+ sum = md5.new()
12+ f = open(file, "r")
13+ while 1:
14+ data = f.read(1024)
15+ if not data: break
16+ sum.update(data)
17+ f.close()
18+ if sys.version[:1] > '2':
19+ # when using Python 2.0 or newer
20+ return sum.hexdigest()
21+ else:
22+ return string.join(map((lambda x:"%02x" % ord(x)),sum.digest()),'')
23+
24 old_filename = None
25 packages_filename = None
26 filelist_filename = "Packages.filelist"
27@@ -87,7 +102,7 @@
28 files.sort()
29 for filename in files:
30 basename = os.path.basename(filename)
31- if old_pkg_hash.has_key(basename):
32+ if old_pkg_hash.has_key(basename) and old_pkg_hash[basename].md5 == md5sum(filename) and old_pkg_hash[basename].size == os.stat(filename)[6]:
33 if (verbose):
34 sys.stderr.write("Found %s in Packages\n" % (filename,))
35 pkg = old_pkg_hash[basename]
36Index: ipkg-utils/ipkg.py
37===================================================================
38--- ipkg-utils.orig/ipkg.py 2005-01-20 23:09:10.000000000 +0000
39+++ ipkg-utils/ipkg.py 2006-07-24 09:16:44.000000000 +0100
40@@ -210,8 +210,13 @@
41 value = value + '\n' + line
42 if name == 'size':
43 self.size = int(value)
44+ elif name == 'md5sum':
45+ self.md5 = value
46 elif self.__dict__.has_key(name):
47 self.__dict__[name] = value
48+ else:
49+ print "Lost field %s, %s" % (name,value)
50+
51 if line[0] == '\n':
52 return # consumes one blank line at end of package descriptoin
53 else:
diff --git a/meta/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb b/meta/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
index 12ed042f15..48c7445828 100644
--- a/meta/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
+++ b/meta/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
@@ -5,9 +5,10 @@ LICENSE = "GPL"
5CONFLICTS = "ipkg-link" 5CONFLICTS = "ipkg-link"
6RDEPENDS = "python" 6RDEPENDS = "python"
7SRCDATE = "20050404" 7SRCDATE = "20050404"
8PR = "r11" 8PR = "r12"
9 9
10SRC_URI = "${HANDHELDS_CVS};module=ipkg-utils" 10SRC_URI = "${HANDHELDS_CVS};module=ipkg-utils \
11 file://index_speedup.patch;patch=1"
11 12
12S = "${WORKDIR}/ipkg-utils" 13S = "${WORKDIR}/ipkg-utils"
13 14