diff options
author | Koen Kooi <koen@openembedded.org> | 2006-09-08 10:58:57 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2006-09-08 10:58:57 +0000 |
commit | e2e1de52828a19f8bb3ffe98e4128c0ae28fbf20 (patch) | |
tree | 365a559232933f21775fc5422c450437fe0cbfe3 | |
parent | 3d25e5fd944792a48cea823fc2aeec348c855826 (diff) | |
download | openembedded-e2e1de52828a19f8bb3ffe98e4128c0ae28fbf20.tar.gz |
ipkg-utils: sync with .dev
6 files changed, 77 insertions, 4 deletions
diff --git a/packages/ipkg-utils/ipkg-utils-native/.mtn2git_empty b/packages/ipkg-utils/ipkg-utils-native/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/ipkg-utils/ipkg-utils-native/.mtn2git_empty diff --git a/packages/ipkg-utils/ipkg-utils-native/ipkg-utils-fix.patch b/packages/ipkg-utils/ipkg-utils-native/ipkg-utils-fix.patch new file mode 100644 index 0000000000..a9e6fc4d05 --- /dev/null +++ b/packages/ipkg-utils/ipkg-utils-native/ipkg-utils-fix.patch @@ -0,0 +1,17 @@ +--- ../../../work/i686-linux/ipkg-utils-native-1.6+cvs20050404-r6/ipkg-utils/ipkg.py 2005-01-08 19:08:52.000000000 +0100 ++++ ipkg-utils/ipkg.py 2006-06-29 12:52:58.466446000 +0200 +@@ -150,11 +150,11 @@ + stat = os.stat(fn) + self.size = stat[ST_SIZE] + self.filename = os.path.basename(fn) +- ## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,)) ++ sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,)) + if self.isdeb: +- control = os.popen("ar p "+fn+" control.tar.gz | tar xfzO - '*control'","r") ++ control = os.popen("ar p "+fn+" control.tar.gz | tar xfzO - './control'","r") + else: +- control = os.popen("tar xfzO "+fn+" '*control.tar.gz' | tar xfzO - '*control'","r") ++ control = os.popen("tar xfzO "+fn+" 'control.tar.gz' | tar xfzO - './control'","r") + line = control.readline() + while 1: + if not line: break diff --git a/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb b/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb index eb11ac560d..8079b46267 100644 --- a/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb +++ b/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb @@ -1,12 +1,14 @@ -include ipkg-utils_${PV}.bb +require ipkg-utils_${PV}.bb +SRC_URI += "file://ipkg-utils-fix.patch;patch=1" RDEPENDS = "" -PR = "r6" +PR = "r8" inherit native # Avoid circular dependencies from package_ipk.bbclass PACKAGES = "" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/ipkg-utils" do_stage() { for i in ${INSTALL}; do diff --git a/packages/ipkg-utils/ipkg-utils/.mtn2git_empty b/packages/ipkg-utils/ipkg-utils/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/ipkg-utils/ipkg-utils/.mtn2git_empty diff --git a/packages/ipkg-utils/ipkg-utils/index_speedup.patch b/packages/ipkg-utils/ipkg-utils/index_speedup.patch new file mode 100644 index 0000000000..bef28a9df1 --- /dev/null +++ b/packages/ipkg-utils/ipkg-utils/index_speedup.patch @@ -0,0 +1,53 @@ +Index: ipkg-utils/ipkg-make-index +=================================================================== +--- ipkg-utils.orig/ipkg-make-index 2005-03-20 18:10:54.000000000 +0000 ++++ ipkg-utils/ipkg-make-index 2006-07-24 09:18:16.000000000 +0100 +@@ -37,6 +37,21 @@ + if os.path.exists(pkg_dir + "/" + filename + ".asc"): + os.rename(pkg_dir + "/" + filename + ".asc", locale_dir + "/" + filename + ".asc") + ++def md5sum(file): ++ import md5 ++ sum = md5.new() ++ f = open(file, "r") ++ while 1: ++ data = f.read(1024) ++ if not data: break ++ sum.update(data) ++ f.close() ++ if sys.version[:1] > '2': ++ # when using Python 2.0 or newer ++ return sum.hexdigest() ++ else: ++ return string.join(map((lambda x:"%02x" % ord(x)),sum.digest()),'') ++ + old_filename = None + packages_filename = None + filelist_filename = "Packages.filelist" +@@ -87,7 +102,7 @@ + files.sort() + for filename in files: + basename = os.path.basename(filename) +- if old_pkg_hash.has_key(basename): ++ 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]: + if (verbose): + sys.stderr.write("Found %s in Packages\n" % (filename,)) + pkg = old_pkg_hash[basename] +Index: ipkg-utils/ipkg.py +=================================================================== +--- ipkg-utils.orig/ipkg.py 2005-01-20 23:09:10.000000000 +0000 ++++ ipkg-utils/ipkg.py 2006-07-24 09:16:44.000000000 +0100 +@@ -210,8 +210,13 @@ + value = value + '\n' + line + if name == 'size': + self.size = int(value) ++ elif name == 'md5sum': ++ self.md5 = value + elif self.__dict__.has_key(name): + self.__dict__[name] = value ++ else: ++ print "Lost field %s, %s" % (name,value) ++ + if line[0] == '\n': + return # consumes one blank line at end of package descriptoin + else: diff --git a/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb b/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb index 12ed042f15..48c7445828 100644 --- a/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb +++ b/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb @@ -5,9 +5,10 @@ LICENSE = "GPL" CONFLICTS = "ipkg-link" RDEPENDS = "python" SRCDATE = "20050404" -PR = "r11" +PR = "r12" -SRC_URI = "${HANDHELDS_CVS};module=ipkg-utils" +SRC_URI = "${HANDHELDS_CVS};module=ipkg-utils \ + file://index_speedup.patch;patch=1" S = "${WORKDIR}/ipkg-utils" |