diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-09-16 19:00:46 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-09-16 19:00:51 +0200 |
commit | bc2cb8a247019e20ee4b414732c69e2fed3c14f5 (patch) | |
tree | 438725da7ca9a60ce4a56549ff0ccced76baa83e | |
parent | b800a0f74f1dd5122fd2e19ef5c0c6de26a3e968 (diff) | |
download | ptxdist-bc2cb8a247019e20ee4b414732c69e2fed3c14f5.tar.gz ptxdist-bc2cb8a247019e20ee4b414732c69e2fed3c14f5.tar.xz |
host-opkg-utils: version bump r4747 -> 0.3.5
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
41 files changed, 25 insertions, 2285 deletions
diff --git a/patches/opkg-utils-r4747/0200-opkg-make-ar-deterministic.patch b/patches/opkg-utils-0.3.5/0001-opkg-make-ar-deterministic.patch index e8c7a3482..c2e3b32e1 100644 --- a/patches/opkg-utils-r4747/0200-opkg-make-ar-deterministic.patch +++ b/patches/opkg-utils-0.3.5/0001-opkg-make-ar-deterministic.patch @@ -33,18 +33,18 @@ Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opkg-build b/opkg-build -index 90a7111..fb533a6 100755 +index 5dbf903710e3..f05eaecc6836 100755 --- a/opkg-build +++ b/opkg-build -@@ -247,7 +247,10 @@ fi +@@ -306,7 +306,10 @@ fi rm -f $pkg_file if [ "$outer" = "ar" ] ; then -- ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) +- ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) + # chown the content to "0:0". files. This is needed as high UID values (> + # 99999) cause problems when parsing ar file headers + ( cd $tmp_dir && chown 0:0 ./debian-binary ./data.tar.gz ./control.tar.gz && -+ ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) ++ ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) else - ( cd $tmp_dir && tar -cz --format=gnu -f $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) + ( cd $tmp_dir && tar -cz $tarformat -f $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) fi diff --git a/patches/opkg-utils-r4747/0201-opkg-build-use-CROSS_COMPILE-ar.patch b/patches/opkg-utils-0.3.5/0002-opkg-build-use-CROSS_COMPILE-ar.patch index 388e18bfc..eaaebff65 100644 --- a/patches/opkg-utils-r4747/0201-opkg-build-use-CROSS_COMPILE-ar.patch +++ b/patches/opkg-utils-0.3.5/0002-opkg-build-use-CROSS_COMPILE-ar.patch @@ -14,15 +14,15 @@ Signed-off-by: Andreas Bießmann <andreas@biessmann.de> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opkg-build b/opkg-build -index fb533a6..646787b 100755 +index f05eaecc6836..e24216946346 100755 --- a/opkg-build +++ b/opkg-build -@@ -250,7 +250,7 @@ if [ "$outer" = "ar" ] ; then +@@ -309,7 +309,7 @@ if [ "$outer" = "ar" ] ; then # chown the content to "0:0". files. This is needed as high UID values (> # 99999) cause problems when parsing ar file headers ( cd $tmp_dir && chown 0:0 ./debian-binary ./data.tar.gz ./control.tar.gz && -- ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) -+ ${CROSS_COMPILE}ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) +- ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) ++ ${CROSS_COMPILE}ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) else - ( cd $tmp_dir && tar -cz --format=gnu -f $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) + ( cd $tmp_dir && tar -cz $tarformat -f $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) fi diff --git a/patches/opkg-utils-r4747/0202-Fill-out-Installed-Size.patch b/patches/opkg-utils-0.3.5/0003-Fill-out-Installed-Size.patch index 2261dbdd4..cbf63f3e2 100644 --- a/patches/opkg-utils-r4747/0202-Fill-out-Installed-Size.patch +++ b/patches/opkg-utils-0.3.5/0003-Fill-out-Installed-Size.patch @@ -11,10 +11,10 @@ Signed-off-by: George McCollister <george.mccollister@gmail.com> 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opkg.py b/opkg.py -index c839100..53cf54a 100644 +index 2ecac8ae60b0..bf31eeb003a6 100644 --- a/opkg.py +++ b/opkg.py -@@ -155,6 +155,11 @@ class Package: +@@ -165,6 +165,11 @@ class Package(object): ## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,)) ar = arfile.ArFile(f, fn) @@ -25,8 +25,8 @@ index c839100..53cf54a 100644 + tarStream = ar.open("control.tar.gz") tarf = tarfile.open("control.tar.gz", "r", tarStream) - -@@ -462,7 +467,7 @@ class Package: + try: +@@ -473,7 +478,7 @@ class Package(object): if self.maintainer: out = out + "Maintainer: %s\n" % (self.maintainer) if self.md5: out = out + "MD5Sum: %s\n" % (self.md5) if self.size: out = out + "Size: %d\n" % int(self.size) diff --git a/patches/opkg-utils-0.3.5/series b/patches/opkg-utils-0.3.5/series new file mode 100644 index 000000000..4d9888fe7 --- /dev/null +++ b/patches/opkg-utils-0.3.5/series @@ -0,0 +1,6 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-opkg-make-ar-deterministic.patch +0002-opkg-build-use-CROSS_COMPILE-ar.patch +0003-Fill-out-Installed-Size.patch +# cc49e2a9a92001e2d39530cbdbce163c - git-ptx-patches magic diff --git a/patches/opkg-utils-r4747/0001-opkg-compare-versions-Adapted-to-the-latest-opkg-ups.patch b/patches/opkg-utils-r4747/0001-opkg-compare-versions-Adapted-to-the-latest-opkg-ups.patch deleted file mode 100644 index 95c312893..000000000 --- a/patches/opkg-utils-r4747/0001-opkg-compare-versions-Adapted-to-the-latest-opkg-ups.patch +++ /dev/null @@ -1,90 +0,0 @@ -From: Lianhao Lu <lianhao.lu@intel.com> -Date: Tue, 10 Apr 2012 21:44:14 +0800 -Subject: [PATCH] opkg-compare-versions: Adapted to the latest opkg upstream. - -Adapted to the latest opkg upstream implemenation for comparing -versions. - -This is part of the bug fixing [YOCTO #2233]. - -Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> ---- - opkg-compare-versions.c | 59 ++++++++++++++++++++++--------------------------- - 1 file changed, 27 insertions(+), 32 deletions(-) - -diff --git a/opkg-compare-versions.c b/opkg-compare-versions.c -index d5133fa..62851fa 100644 ---- a/opkg-compare-versions.c -+++ b/opkg-compare-versions.c -@@ -31,43 +31,38 @@ struct versionrevision { - const char *revision; - }; - --static int verrevcmp(const char *val, const char *ref) --{ -- int vc, rc; -- long vl, rl; -- const char *vp, *rp; -- const char *vsep, *rsep; -- -+/* assume ascii; warning: evaluates x multiple times! */ -+#define order(x) ((x) == '~' ? -1 \ -+ : isdigit((x)) ? 0 \ -+ : !(x) ? 0 \ -+ : isalpha((x)) ? (x) \ -+ : (x) + 256) -+ -+static int -+verrevcmp(const char *val, const char *ref) { - if (!val) val= ""; - if (!ref) ref= ""; -- for (;;) { -- vp= val; while (*vp && !isdigit(*vp)) vp++; -- rp= ref; while (*rp && !isdigit(*rp)) rp++; -- for (;;) { -- vc= val == vp ? 0 : *val++; -- rc= ref == rp ? 0 : *ref++; -- if (!rc && !vc) break; -- if (vc && !isalpha(vc)) vc += 256; /* assumes ASCII character set */ -- if (rc && !isalpha(rc)) rc += 256; -+ -+ while (*val || *ref) { -+ int first_diff= 0; -+ -+ while ( (*val && !isdigit(*val)) || (*ref && !isdigit(*ref)) ) { -+ int vc= order(*val), rc= order(*ref); - if (vc != rc) return vc - rc; -+ val++; ref++; - } -- val= vp; -- ref= rp; -- vl=0; if (isdigit(*vp)) vl= strtol(val,(char**)&val,10); -- rl=0; if (isdigit(*rp)) rl= strtol(ref,(char**)&ref,10); -- if (vl != rl) return vl - rl; -- -- vc = *val; -- rc = *ref; -- vsep = strchr(".-", vc); -- rsep = strchr(".-", rc); -- if (vsep && !rsep) return -1; -- if (!vsep && rsep) return +1; -- -- if (!*val && !*ref) return 0; -- if (!*val) return -1; -- if (!*ref) return +1; -+ -+ while ( *val == '0' ) val++; -+ while ( *ref == '0' ) ref++; -+ while (isdigit(*val) && isdigit(*ref)) { -+ if (!first_diff) first_diff= *val - *ref; -+ val++; ref++; -+ } -+ if (isdigit(*val)) return 1; -+ if (isdigit(*ref)) return -1; -+ if (first_diff) return first_diff; - } -+ return 0; - } - - int versioncompare(const struct versionrevision *version, diff --git a/patches/opkg-utils-r4747/0002-opkg-make-index-don-t-error-out-when-some-package-di.patch b/patches/opkg-utils-r4747/0002-opkg-make-index-don-t-error-out-when-some-package-di.patch deleted file mode 100644 index 2f1f5c957..000000000 --- a/patches/opkg-utils-r4747/0002-opkg-make-index-don-t-error-out-when-some-package-di.patch +++ /dev/null @@ -1,78 +0,0 @@ -From: Richard Purdie <richard.purdie@linuxfoundation.org> -Date: Thu, 29 Mar 2012 10:41:02 +0200 -Subject: [PATCH] opkg-make-index: don't error out when some package disappears - -* If we're building an image and some package rebuilds while this is - happening some package can be removed/added to the ipk deploy - directory. The image will not depend on this package so we can - safely ignore these cases rather than error out. - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-make-index | 25 ++++++++++++++++++++++++- - 1 file changed, 24 insertions(+), 1 deletion(-) - -diff --git a/opkg-make-index b/opkg-make-index -index ae829e6..2f1ae17 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -96,6 +96,7 @@ if (verbose): - files=glob(pkg_dir + '/*.opk') + glob(pkg_dir + '/*.deb') + glob(pkg_dir + '/*.ipk') - files.sort() - for filename in files: -+ try: - basename = os.path.basename(filename) - pkg = None - fnameStat = os.stat(filename) -@@ -130,6 +131,12 @@ for filename in files: - to_morgue(basename) - if opt_s: - print filename -+ except OSError: -+ sys.stderr.write("Package %s disappeared on us!\n" % (filename)) -+ continue -+ except IOError: -+ sys.stderr.write("Package %s disappeared on us!\n" % (filename)) -+ continue - - pkgsStampsFile = open(stamplist_filename, "w") - for f in pkgsStamps.keys(): -@@ -148,6 +155,7 @@ if packages_filename: - names = packages.packages.keys() - names.sort() - for name in names: -+ try: - pkg = packages.packages[name] - if locales_dir and pkg.depends: - depends = string.split(pkg.depends, ',') -@@ -165,6 +173,13 @@ for name in names: - if (verbose): - sys.stderr.write("Writing info for package %s\n" % (pkg.package,)) - print pkg -+ except OSError: -+ sys.stderr.write("Package %s disappeared on us!\n" % (name)) -+ continue -+ except IOError: -+ sys.stderr.write("Package %s disappeared on us!\n" % (name)) -+ continue -+ - if packages_filename: - sys.stdout.close() - sys.stdout = old_stdout -@@ -182,7 +197,15 @@ files = {} - names = packages.packages.keys() - names.sort() - for name in names: -- for fn in packages[name].get_file_list(): -+ try: -+ fnlist = packages[name].get_file_list() -+ except OSError, e: -+ sys.stderr.write("Package %s disappeared on us!\n" % (name)) -+ continue -+ except IOError, e: -+ sys.stderr.write("Package %s disappeared on us!\n" % (name)) -+ continue -+ for fn in fnlist: - (h,t) = os.path.split(fn) - if not t: continue - if not files.has_key(t): files[t] = name+':'+fn diff --git a/patches/opkg-utils-r4747/0003-opkg-make-index-convert-mtime-to-int-before-comparin.patch b/patches/opkg-utils-r4747/0003-opkg-make-index-convert-mtime-to-int-before-comparin.patch deleted file mode 100644 index 364e2f052..000000000 --- a/patches/opkg-utils-r4747/0003-opkg-make-index-convert-mtime-to-int-before-comparin.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> -Date: Thu, 29 Mar 2012 10:44:16 +0200 -Subject: [PATCH] opkg-make-index: convert mtime to int before comparing it - -* The st_mtime attribute (which is a float) is compared against a value - from the timestamp database, which was stored as an integer there. - -* When working on a filesystem with precise timestamps the comparision - will fail nearly everytime hence. - -* Although it might be possible to enhance the database to store the - fractional part too, this will complicate things more than we would - gain by this change. - -Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-make-index | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/opkg-make-index b/opkg-make-index -index 2f1ae17..dc98c63 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -101,7 +101,7 @@ for filename in files: - pkg = None - fnameStat = os.stat(filename) - if old_pkg_hash.has_key(basename): -- if pkgsStamps.has_key(basename) and fnameStat.st_mtime == pkgsStamps[basename]: -+ if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == pkgsStamps[basename]: - if (verbose): - sys.stderr.write("Found %s in Packages\n" % (filename,)) - pkg = old_pkg_hash[basename] diff --git a/patches/opkg-utils-r4747/0004-opkg.py-Add-knowledge-about-License-field-in-ipk-hea.patch b/patches/opkg-utils-r4747/0004-opkg.py-Add-knowledge-about-License-field-in-ipk-hea.patch deleted file mode 100644 index 248a99217..000000000 --- a/patches/opkg-utils-r4747/0004-opkg.py-Add-knowledge-about-License-field-in-ipk-hea.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 29 Mar 2012 10:45:44 +0200 -Subject: [PATCH] opkg.py: Add knowledge about License field in ipk headers - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg.py | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/opkg.py b/opkg.py -index 3fda9b5..8ddc8b8 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -145,6 +145,7 @@ class Package: - self.priority = None - self.tags = None - self.fn = fn -+ self.license = None - - if fn: - # see if it is deb format -@@ -319,6 +320,12 @@ class Package: - def get_section(self, section): - return self.section - -+ def set_license(self, license): -+ self.license = license -+ -+ def get_license(self, license): -+ return self.license -+ - def get_file_list(self): - if not self.fn: - return [] -@@ -425,6 +432,7 @@ class Package: - if self.description: out = out + "Description: %s\n" % (self.description) - if self.oe: out = out + "OE: %s\n" % (self.oe) - if self.homepage: out = out + "HomePage: %s\n" % (self.homepage) -+ if self.license: out = out + "License: %s\n" % (self.license) - if self.priority: out = out + "Priority: %s\n" % (self.priority) - if self.tags: out = out + "Tags: %s\n" % (self.tags) - out = out + "\n" diff --git a/patches/opkg-utils-r4747/0005-arfile.py-handle-six-digit-UIDs.patch b/patches/opkg-utils-r4747/0005-arfile.py-handle-six-digit-UIDs.patch deleted file mode 100644 index d826647c3..000000000 --- a/patches/opkg-utils-r4747/0005-arfile.py-handle-six-digit-UIDs.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Scott Anderson <o2e@saaworld.com> -Date: Thu, 29 Mar 2012 10:46:34 +0200 -Subject: [PATCH] arfile.py: handle six digit UIDs - -* Essentially, the problem is that arfile.py is splitting the ar header with - white-space instead of fixed-width fields, so two fields would get treated - as a single field. This makes things better than before as it now honors - the fixed field widths. - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - arfile.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/arfile.py b/arfile.py -index 22548af..8291a2d 100644 ---- a/arfile.py -+++ b/arfile.py -@@ -75,7 +75,12 @@ class ArFile: - l = self.f.readline() - if not l: break - l = l.replace('`', '') -- descriptor = l.split() -+ # Field lengths from /usr/include/ar.h: -+ ar_field_lens = [ 16, 12, 6, 6, 8, 10, 2 ] -+ descriptor = [] -+ for field_len in ar_field_lens: -+ descriptor.append(l[:field_len].strip()) -+ l = l[field_len:] - # print descriptor - size = int(descriptor[5]) - memberName = descriptor[0][:-1] diff --git a/patches/opkg-utils-r4747/0006-Use-python-via-the-PATH-rather-than-hardcoding-usr-b.patch b/patches/opkg-utils-r4747/0006-Use-python-via-the-PATH-rather-than-hardcoding-usr-b.patch deleted file mode 100644 index 7bbffd978..000000000 --- a/patches/opkg-utils-r4747/0006-Use-python-via-the-PATH-rather-than-hardcoding-usr-b.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: Christopher Larson <kergoth@gmail.com> -Date: Thu, 29 Mar 2012 10:47:49 +0200 -Subject: [PATCH] Use python via the PATH, rather than hardcoding - /usr/bin/python - -Signed-off-by: Christopher Larson <kergoth@gmail.com> -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-list-fields | 2 +- - opkg-make-index | 2 +- - opkg-show-deps | 2 +- - opkg-unbuild | 2 +- - opkg-update-index | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/opkg-list-fields b/opkg-list-fields -index d263b90..da78d53 100755 ---- a/opkg-list-fields -+++ b/opkg-list-fields -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/env python - - import sys, opkg - -diff --git a/opkg-make-index b/opkg-make-index -index dc98c63..b65dc6e 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/env python - - import sys, os, posixpath - from glob import glob -diff --git a/opkg-show-deps b/opkg-show-deps -index a6681f4..9de1aac 100755 ---- a/opkg-show-deps -+++ b/opkg-show-deps -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/env python - - import sys, os, posixpath - from glob import glob -diff --git a/opkg-unbuild b/opkg-unbuild -index eff604b..b5c5227 100755 ---- a/opkg-unbuild -+++ b/opkg-unbuild -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/env python - - import sys, os, re - -diff --git a/opkg-update-index b/opkg-update-index -index 807f8f4..3864fa5 100755 ---- a/opkg-update-index -+++ b/opkg-update-index -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2.1 -+#!/usr/bin/env python - - import sys, os - from glob import glob diff --git a/patches/opkg-utils-r4747/0007-opkg.py-use-hashlib-instead-of-old-md5-module.patch b/patches/opkg-utils-r4747/0007-opkg.py-use-hashlib-instead-of-old-md5-module.patch deleted file mode 100644 index 1706cc3ee..000000000 --- a/patches/opkg-utils-r4747/0007-opkg.py-use-hashlib-instead-of-old-md5-module.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 12:44:01 +0200 -Subject: [PATCH] opkg.py: use hashlib instead of old md5 module - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/opkg.py b/opkg.py -index 8ddc8b8..56e774d 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -36,7 +36,7 @@ import tempfile - import os - import sys - import glob --import md5 -+import hashlib - import re - import string - import commands -@@ -188,8 +188,8 @@ class Package: - def _computeFileMD5(self): - # compute the MD5. - f = open(self.fn, "rb") -- sum = md5.new() -- while 1: -+ sum = hashlib.md5() -+ while True: - data = f.read(1024) - if not data: break - sum.update(data) diff --git a/patches/opkg-utils-r4747/0008-opkg.py-arfile.py-report-which-file-has-wrong-format.patch b/patches/opkg-utils-r4747/0008-opkg.py-arfile.py-report-which-file-has-wrong-format.patch deleted file mode 100644 index 340230e8f..000000000 --- a/patches/opkg-utils-r4747/0008-opkg.py-arfile.py-report-which-file-has-wrong-format.patch +++ /dev/null @@ -1,100 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 12:44:26 +0200 -Subject: [PATCH] opkg.py, arfile.py: report which file has wrong format and - use the same test - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - arfile.py | 16 +++++++++------- - opkg.py | 11 ++--------- - 2 files changed, 11 insertions(+), 16 deletions(-) - -diff --git a/arfile.py b/arfile.py -index 8291a2d..7a695c6 100644 ---- a/arfile.py -+++ b/arfile.py -@@ -40,13 +40,13 @@ class FileSection: - - class ArFile: - -- def __init__(self, f): -+ def __init__(self, f, fn): - self.f = f - self.directory = {} - self.directoryRead = False - - signature = self.f.readline() -- assert signature == "!<arch>\n" -+ assert signature == "!<arch>\n" or signature == b"!<arch>\n", "Old ipk format (non-deb) is unsupported, file: %s, magic: %s, expected %s" % (fn, signature, "!<arch>") - self.directoryOffset = self.f.tell() - - def open(self, fname): -@@ -100,9 +100,10 @@ class ArFile: - - if __name__ == "__main__": - if None: -- f = open(sys.argv[1], "rb") -+ fn = sys.argv[1] -+ f = open(fn, "rb") - -- ar = ArFile(f) -+ ar = ArFile(f, fn) - tarStream = ar.open("data.tar.gz") - print "--------" - tarStream = ar.open("data.tar.gz") -@@ -120,10 +121,11 @@ if __name__ == "__main__": - for f in os.listdir(dir): - if not f.endswith(".opk") and not f.endswith(".ipk"): continue - -- print "=== %s ===" % f -- f = open(dir + "/" + f, "rb") -+ print("=== %s ===" % f) -+ fn = "%s/%s" % (dir, f) -+ f = open(fn, "rb") - -- ar = ArFile(f) -+ ar = ArFile(f, fn) - tarStream = ar.open("control.tar.gz") - tarf = tarfile.open("control.tar.gz", "r", tarStream) - #tarf.list() -diff --git a/opkg.py b/opkg.py -index 56e774d..31b847c 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -138,7 +138,6 @@ class Package: - #self.size = None - self.installed_size = None - self.filename = None -- self.isdeb = 0 - self.file_ext_opk = "ipk" - self.homepage = None - self.oe = None -@@ -150,18 +149,12 @@ class Package: - if fn: - # see if it is deb format - f = open(fn, "rb") -- magic = f.read(4) -- f.seek(0, 0) -- if (magic == "!<ar"): -- self.isdeb = 1 -- - - self.filename = os.path.basename(fn) -- assert self.isdeb == 1, "Old ipk format (non-deb) is unsupported" - - ## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,)) - -- ar = arfile.ArFile(f) -+ ar = arfile.ArFile(f, fn) - tarStream = ar.open("control.tar.gz") - tarf = tarfile.open("control.tar.gz", "r", tarStream) - -@@ -330,7 +323,7 @@ class Package: - if not self.fn: - return [] - f = open(self.fn, "rb") -- ar = arfile.ArFile(f) -+ ar = arfile.ArFile(f, self.fn) - tarStream = ar.open("data.tar.gz") - tarf = tarfile.open("data.tar.gz", "r", tarStream) - self.file_list = tarf.getnames() diff --git a/patches/opkg-utils-r4747/0009-arfile-decode-read-lines-as-ascii-string-before-gett.patch b/patches/opkg-utils-r4747/0009-arfile-decode-read-lines-as-ascii-string-before-gett.patch deleted file mode 100644 index ed81b836b..000000000 --- a/patches/opkg-utils-r4747/0009-arfile-decode-read-lines-as-ascii-string-before-gett.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 13:24:10 +0200 -Subject: [PATCH] arfile: decode read lines as ascii string before getting - fields from it - -* python3 returns them as byte sequence - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - arfile.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arfile.py b/arfile.py -index 7a695c6..92ffee0 100644 ---- a/arfile.py -+++ b/arfile.py -@@ -74,6 +74,7 @@ class ArFile: - if l == "\n": - l = self.f.readline() - if not l: break -+ l = l.decode('ascii') - l = l.replace('`', '') - # Field lengths from /usr/include/ar.h: - ar_field_lens = [ 16, 12, 6, 6, 8, 10, 2 ] diff --git a/patches/opkg-utils-r4747/0010-2to3-use-subprocess-instead-of-commands.patch b/patches/opkg-utils-r4747/0010-2to3-use-subprocess-instead-of-commands.patch deleted file mode 100644 index df5d08aa9..000000000 --- a/patches/opkg-utils-r4747/0010-2to3-use-subprocess-instead-of-commands.patch +++ /dev/null @@ -1,97 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 13:28:01 +0200 -Subject: [PATCH] 2to3: use subprocess instead of commands - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-compare-indexes | 6 +++--- - opkg-make-index | 5 ++--- - opkg-show-deps | 1 - - opkg-update-index | 1 - - opkg.py | 2 +- - 5 files changed, 6 insertions(+), 9 deletions(-) - -diff --git a/opkg-compare-indexes b/opkg-compare-indexes -index 6c68125..2610987 100755 ---- a/opkg-compare-indexes -+++ b/opkg-compare-indexes -@@ -2,7 +2,7 @@ - - import sys, os - from glob import glob --import commands -+import subprocess - import opkg - - pkg_dir1 = sys.argv[1] -@@ -40,8 +40,8 @@ for name in names: - if pkg1 and pkg2 and pkg1.version != pkg2.version: - print "CHANGED: %s from version %s to %s (%s)" % (pkg1.package, pkg1.version, pkg2.version, pkg2.maintainer) - cmd = "opkg-diff %s %s > %s " % ((pkg_dir1 + pkg1.filename), (pkg_dir2 + pkg2.filename), (pkg1.package + '.diff')) -- print cmd -- commands.getstatusoutput(cmd) -+ print(cmd) -+ subprocess.call(cmd) - if not pkg1: - print "NEW: %s version %s (%s)"% (pkg2.package, pkg2.version, pkg2.maintainer) - if not pkg2: -diff --git a/opkg-make-index b/opkg-make-index -index b65dc6e..7923f1e 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -2,7 +2,7 @@ - - import sys, os, posixpath - from glob import glob --import commands -+import subprocess - import opkg - import getopt - import string -@@ -186,8 +186,7 @@ if packages_filename: - gzip_filename = ("%s.gz" % packages_filename) - tmp_gzip_filename = ("%s.%d" % (gzip_filename, os.getpid())) - gzip_cmd = "gzip -9c < %s > %s" % (tmp_packages_filename, tmp_gzip_filename) -- (rc, outtext) = commands.getstatusoutput(gzip_cmd) -- print outtext -+ rc = subprocess.check_output(gzip_cmd, shell=True) - os.rename(tmp_packages_filename, packages_filename) - os.rename(tmp_gzip_filename, gzip_filename) - -diff --git a/opkg-show-deps b/opkg-show-deps -index 9de1aac..5ab5b4f 100755 ---- a/opkg-show-deps -+++ b/opkg-show-deps -@@ -2,7 +2,6 @@ - - import sys, os, posixpath - from glob import glob --import commands - import opkg - import getopt - import string -diff --git a/opkg-update-index b/opkg-update-index -index 3864fa5..d9c9b43 100755 ---- a/opkg-update-index -+++ b/opkg-update-index -@@ -2,7 +2,6 @@ - - import sys, os - from glob import glob --import commands - import opkg - - pkg_dir=sys.argv[1] -diff --git a/opkg.py b/opkg.py -index 31b847c..f37a68d 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -39,7 +39,7 @@ import glob - import hashlib - import re - import string --import commands -+import subprocess - from stat import ST_SIZE - import arfile - import tarfile diff --git a/patches/opkg-utils-r4747/0011-2to3-print-fixes.patch b/patches/opkg-utils-r4747/0011-2to3-print-fixes.patch deleted file mode 100644 index 86a4be95c..000000000 --- a/patches/opkg-utils-r4747/0011-2to3-print-fixes.patch +++ /dev/null @@ -1,266 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 14:45:24 +0200 -Subject: [PATCH] 2to3: print fixes - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - arfile.py | 20 ++++++++++---------- - makePackage | 2 +- - opkg-compare-indexes | 6 +++--- - opkg-list-fields | 2 +- - opkg-make-index | 8 ++++---- - opkg-show-deps | 2 +- - opkg-unbuild | 2 +- - opkg.py | 24 ++++++++++++------------ - 8 files changed, 33 insertions(+), 33 deletions(-) - -diff --git a/arfile.py b/arfile.py -index 92ffee0..320c9ca 100644 ---- a/arfile.py -+++ b/arfile.py -@@ -20,7 +20,7 @@ class FileSection: - self.seek(0, 0) - - def seek(self, offset, whence = 0): --# print "seek(%x, %d)" % (offset, whence) -+# print("seek(%x, %d)" % (offset, whence)) - if whence == 0: - return self.f.seek(offset + self.offset, whence) - elif whence == 1: -@@ -31,11 +31,11 @@ class FileSection: - assert False - - def tell(self): --# print "tell()" -+# print("tell()") - return self.f.tell() - self.offset - - def read(self, size = -1): --# print "read(%d)" % size -+# print("read(%d)" % size) - return self.f.read(size) - - class ArFile: -@@ -82,11 +82,11 @@ class ArFile: - for field_len in ar_field_lens: - descriptor.append(l[:field_len].strip()) - l = l[field_len:] --# print descriptor -+# print(descriptor) - size = int(descriptor[5]) - memberName = descriptor[0][:-1] - self.directory[memberName] = descriptor + [self.f.tell()] --# print "read:", memberName -+# print(("read:", memberName)) - if memberName == fname: - # Record directory offset to start from next time - self.directoryOffset = self.f.tell() + size -@@ -96,7 +96,7 @@ class ArFile: - if size % 2: - size = size + 1 - data = self.f.seek(size, 1) --# print hex(f.tell()) -+# print(hex(self.f.tell())) - - - if __name__ == "__main__": -@@ -106,11 +106,11 @@ if __name__ == "__main__": - - ar = ArFile(f, fn) - tarStream = ar.open("data.tar.gz") -- print "--------" -+ print("--------") - tarStream = ar.open("data.tar.gz") -- print "--------" -+ print("--------") - tarStream = ar.open("control.tar.gz") -- print "--------" -+ print("--------") - tarStream = ar.open("control.tar.gz2") - - sys.exit(0) -@@ -132,4 +132,4 @@ if __name__ == "__main__": - #tarf.list() - - f2 = tarf.extractfile("control") -- print f2.read() -+ print(f2.read()) -diff --git a/makePackage b/makePackage -index 082a81f..ec76338 100755 ---- a/makePackage -+++ b/makePackage -@@ -11,4 +11,4 @@ import opkg - - fn = sys.argv[1] - pkg = opkg.Package(fn) --print pkg -+print(pkg) -diff --git a/opkg-compare-indexes b/opkg-compare-indexes -index 2610987..e0933ce 100755 ---- a/opkg-compare-indexes -+++ b/opkg-compare-indexes -@@ -38,12 +38,12 @@ for name in names: - if pkgs2.packages.has_key(name): - pkg2 = pkgs2.packages[name] - if pkg1 and pkg2 and pkg1.version != pkg2.version: -- print "CHANGED: %s from version %s to %s (%s)" % (pkg1.package, pkg1.version, pkg2.version, pkg2.maintainer) -+ print("CHANGED: %s from version %s to %s (%s)" % (pkg1.package, pkg1.version, pkg2.version, pkg2.maintainer)) - cmd = "opkg-diff %s %s > %s " % ((pkg_dir1 + pkg1.filename), (pkg_dir2 + pkg2.filename), (pkg1.package + '.diff')) - print(cmd) - subprocess.call(cmd) - if not pkg1: -- print "NEW: %s version %s (%s)"% (pkg2.package, pkg2.version, pkg2.maintainer) -+ print("NEW: %s version %s (%s)"% (pkg2.package, pkg2.version, pkg2.maintainer)) - if not pkg2: -- print "DELETE: %s version %s (%s)"% (pkg1.package, pkg1.version, pkg1.maintainer) -+ print("DELETE: %s version %s (%s)"% (pkg1.package, pkg1.version, pkg1.maintainer)) - -diff --git a/opkg-list-fields b/opkg-list-fields -index da78d53..1fb7fd1 100755 ---- a/opkg-list-fields -+++ b/opkg-list-fields -@@ -9,5 +9,5 @@ def usage(): - if (len(sys.argv) < 2): - usage() - --print opkg.Package(sys.argv[1]) -+print(opkg.Package(sys.argv[1])) - -diff --git a/opkg-make-index b/opkg-make-index -index 7923f1e..c3a292b 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -125,12 +125,12 @@ for filename in files: - if opt_m: - to_morgue(old_filename) - if opt_s: -- print pkg_dir + "/" + old_filename -+ print(("%s/%s" % (pkg_dir, old_filename))) - else: - if opt_m: - to_morgue(basename) - if opt_s: -- print filename -+ print(filename) - except OSError: - sys.stderr.write("Package %s disappeared on us!\n" % (filename)) - continue -@@ -172,7 +172,7 @@ for name in names: - continue - if (verbose): - sys.stderr.write("Writing info for package %s\n" % (pkg.package,)) -- print pkg -+ print(pkg) - except OSError: - sys.stderr.write("Package %s disappeared on us!\n" % (name)) - continue -@@ -216,7 +216,7 @@ if filelist_filename: - names = files.keys() - names.sort() - for name in names: -- print name,files[name] -+ print((name,files[name])) - sys.stdout.close() - if posixpath.exists(filelist_filename): - os.unlink(filelist_filename) -diff --git a/opkg-show-deps b/opkg-show-deps -index 5ab5b4f..524d247 100755 ---- a/opkg-show-deps -+++ b/opkg-show-deps -@@ -83,5 +83,5 @@ for root in remaining_args: - recurse(p) - - for pkg in required.keys(): -- print pkg -+ print(pkg) - -diff --git a/opkg-unbuild b/opkg-unbuild -index b5c5227..35a387f 100755 ---- a/opkg-unbuild -+++ b/opkg-unbuild -@@ -3,7 +3,7 @@ - import sys, os, re - - if (len(sys.argv) == 0): -- print 'usage: %s: package.opk' % sys.argv[0] -+ print('usage: %s: package.opk' % sys.argv[0]) - sys.exit(1) - - for filename in sys.argv[1:]: -diff --git a/opkg.py b/opkg.py -index f37a68d..54060c3 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -56,10 +56,10 @@ class Version: - while 1: - ## first look for non-numeric version component - selfm = re.match('([^0-9]*)(.*)', selfversion) -- #print 'selfm', selfm.groups() -+ #print(('selfm', selfm.groups())) - (selfalpha, selfversion) = selfm.groups() - refm = re.match('([^0-9]*)(.*)', refversion) -- #print 'refm', refm.groups() -+ #print(('refm', refm.groups()) - (refalpha, refversion) = refm.groups() - if (selfalpha > refalpha): - return 1 -@@ -68,8 +68,8 @@ class Version: - ## now look for numeric version component - (selfnum, selfversion) = re.match('([0-9]*)(.*)', selfversion).groups() - (refnum, refversion) = re.match('([0-9]*)(.*)', refversion).groups() -- #print 'selfnum', selfnum, selfversion -- #print 'refnum', refnum, refversion -+ #print(('selfnum', selfnum, selfversion) -+ #print(('refnum', refnum, refversion) - if (selfnum != ''): - selfnum = int(selfnum) - else: -@@ -93,12 +93,12 @@ class Version: - else: - self_ver_comps = re.match(r"(.+?)(-r.+)?$", self.version) - ref_ver_comps = re.match(r"(.+?)(-r.+)?$", ref.version) -- #print (self_ver_comps.group(1), self_ver_comps.group(2)) -- #print (ref_ver_comps.group(1), ref_ver_comps.group(2)) -+ #print((self_ver_comps.group(1), self_ver_comps.group(2))) -+ #print((ref_ver_comps.group(1), ref_ver_comps.group(2))) - r = self._versioncompare(self_ver_comps.group(1), ref_ver_comps.group(1)) - if r == 0: - r = self._versioncompare(self_ver_comps.group(2), ref_ver_comps.group(2)) -- #print "compare: %s vs %s = %d" % (self, ref, r) -+ #print("compare: %s vs %s = %d" % (self, ref, r)) - return r - - def __str__(self): -@@ -220,7 +220,7 @@ class Package: - elif self.__dict__.has_key(name): - self.__dict__[name] = value - else: -- print "Lost field %s, %s" % (name,value) -+ print("Lost field %s, %s" % (name,value)) - pass - - if line and line[0] == '\n': -@@ -391,9 +391,9 @@ class Package: - def compare_version(self, ref): - """Compare package versions of self and ref""" - if not self.version: -- print 'No version for package %s' % self.package -+ print('No version for package %s' % self.package) - if not ref.version: -- print 'No version for package %s' % ref.package -+ print('No version for package %s' % ref.package) - if not self.parsed_version: - self.parsed_version = parse_version(self.version) - if not ref.parsed_version: -@@ -499,9 +499,9 @@ if __name__ == "__main__": - package.set_depends("libc") - package.set_description("A test of the APIs.") - -- print "<" -+ print("<") - sys.stdout.write(package) -- print ">" -+ print(">") - - package.write_package("/tmp") - diff --git a/patches/opkg-utils-r4747/0012-2to3-dictionary-fixes.patch b/patches/opkg-utils-r4747/0012-2to3-dictionary-fixes.patch deleted file mode 100644 index 8dc1d8f2b..000000000 --- a/patches/opkg-utils-r4747/0012-2to3-dictionary-fixes.patch +++ /dev/null @@ -1,235 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 14:42:00 +0200 -Subject: [PATCH] 2to3: dictionary fixes - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - arfile.py | 2 +- - opkg-compare-indexes | 10 +++++----- - opkg-make-index | 18 +++++++++--------- - opkg-show-deps | 12 ++++++------ - opkg-update-index | 2 +- - opkg.py | 8 ++++---- - 6 files changed, 26 insertions(+), 26 deletions(-) - -diff --git a/arfile.py b/arfile.py -index 320c9ca..9149387 100644 ---- a/arfile.py -+++ b/arfile.py -@@ -50,7 +50,7 @@ class ArFile: - self.directoryOffset = self.f.tell() - - def open(self, fname): -- if self.directory.has_key(fname): -+ if fname in self.directory: - return FileSection(self.f, self.directory[fname][-1], int(self.directory[fname][5])) - - if self.directoryRead: -diff --git a/opkg-compare-indexes b/opkg-compare-indexes -index e0933ce..0c119e3 100755 ---- a/opkg-compare-indexes -+++ b/opkg-compare-indexes -@@ -18,8 +18,8 @@ pkgs1.read_packages_file(pkg_dir1 + '/Packages') - pkgs2 = opkg.Packages() - pkgs2.read_packages_file(pkg_dir2 + '/Packages') - --names1 = pkgs1.packages.keys() --names2 = pkgs2.packages.keys() -+names1 = list(pkgs1.packages.keys()) -+names2 = list(pkgs2.packages.keys()) - - ## union of the two names lists - pkgs = {} -@@ -28,14 +28,14 @@ for name in names1: - for name in names2: - pkgs[name] = pkgs2.packages[name] - --names = pkgs.keys() -+names = list(pkgs.keys()) - names.sort() - for name in names: - pkg1 = None - pkg2 = None -- if pkgs1.packages.has_key(name): -+ if name in pkgs1.packages: - pkg1 = pkgs1.packages[name] -- if pkgs2.packages.has_key(name): -+ if name in pkgs2.packages: - pkg2 = pkgs2.packages[name] - if pkg1 and pkg2 and pkg1.version != pkg2.version: - print("CHANGED: %s from version %s to %s (%s)" % (pkg1.package, pkg1.version, pkg2.version, pkg2.maintainer)) -diff --git a/opkg-make-index b/opkg-make-index -index c3a292b..2fc8a69 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -79,7 +79,7 @@ if old_filename: - sys.stderr.write("Reading package list from " + old_filename + "\n") - old_packages = opkg.Packages() - old_packages.read_packages_file(old_filename) -- for k in old_packages.packages.keys(): -+ for k in list(old_packages.packages.keys()): - p = old_packages.packages[k] - old_pkg_hash[p.filename] = p - try: -@@ -100,8 +100,8 @@ for filename in files: - basename = os.path.basename(filename) - pkg = None - fnameStat = os.stat(filename) -- if old_pkg_hash.has_key(basename): -- if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == pkgsStamps[basename]: -+ if basename in old_pkg_hash: -+ if basename in pkgsStamps and int(fnameStat.st_mtime) == pkgsStamps[basename]: - if (verbose): - sys.stderr.write("Found %s in Packages\n" % (filename,)) - pkg = old_pkg_hash[basename] -@@ -113,7 +113,7 @@ for filename in files: - sys.stderr.write("Reading info for package %s\n" % (filename,)) - pkg = opkg.Package(filename) - pkg_key = ("%s:%s" % (pkg.package, pkg.architecture)) -- if (packages.packages.has_key(pkg_key)): -+ if (pkg_key in packages.packages): - old_filename = packages.packages[pkg_key].filename - else: - old_filename = "" -@@ -139,7 +139,7 @@ for filename in files: - continue - - pkgsStampsFile = open(stamplist_filename, "w") --for f in pkgsStamps.keys(): -+for f in list(pkgsStamps.keys()): - pkgsStampsFile.write("%d %s\n" % (pkgsStamps[f], f)) - pkgsStampsFile.close() - -@@ -152,7 +152,7 @@ if packages_filename: - old_stdout = sys.stdout - tmp_packages_filename = ("%s.%d" % (packages_filename, os.getpid())) - sys.stdout = open(tmp_packages_filename, "w") --names = packages.packages.keys() -+names = list(packages.packages.keys()) - names.sort() - for name in names: - try: -@@ -193,7 +193,7 @@ if packages_filename: - if verbose: - sys.stderr.write("Generate Packages.filelist file\n") - files = {} --names = packages.packages.keys() -+names = list(packages.packages.keys()) - names.sort() - for name in names: - try: -@@ -207,13 +207,13 @@ for name in names: - for fn in fnlist: - (h,t) = os.path.split(fn) - if not t: continue -- if not files.has_key(t): files[t] = name+':'+fn -+ if t not in files: files[t] = name+':'+fn - else: files[t] = files[t] + ',' + name+':'+fn - - if filelist_filename: - tmp_filelist_filename = ("%s.%d" % (filelist_filename, os.getpid())) - sys.stdout = open(tmp_filelist_filename, "w") -- names = files.keys() -+ names = list(files.keys()) - names.sort() - for name in names: - print((name,files[name])) -diff --git a/opkg-show-deps b/opkg-show-deps -index 524d247..3f5899d 100755 ---- a/opkg-show-deps -+++ b/opkg-show-deps -@@ -40,21 +40,21 @@ def split_list(str): - r.append(ii) - return r - --for i in packages.packages.keys(): -+for i in list(packages.packages.keys()): - p = packages.packages[i] -- if not provider_hash.has_key(p.package): -+ if p.package not in provider_hash: - provider_hash[p.package] = [] - provider_hash[p.package].append(p) - if p.provides: - provides = string.split(p.provides, ",") - for prov in provides: - prov = string.strip(prov) -- if not provider_hash.has_key(prov): -+ if prov not in provider_hash: - provider_hash[prov] = [] - provider_hash[prov].append(p) - - def find_package(name): -- if provider_hash.has_key(name): -+ if name in provider_hash: - return provider_hash[name] - return None - -@@ -68,7 +68,7 @@ def recurse(pkg): - newpkgs = find_package(dep) - if newpkgs: - for newpkg in newpkgs: -- if required.has_key(newpkg.package): -+ if newpkg.package in required: - return - recurse(newpkgs[0]) - else: -@@ -82,6 +82,6 @@ for root in remaining_args: - for p in pkgs: - recurse(p) - --for pkg in required.keys(): -+for pkg in list(required.keys()): - print(pkg) - -diff --git a/opkg-update-index b/opkg-update-index -index d9c9b43..1b05875 100755 ---- a/opkg-update-index -+++ b/opkg-update-index -@@ -15,7 +15,7 @@ packages = opkg.Packages() - - packages.read_packages_file(pkg_dir + '/Packages') - --names = packages.packages.keys() -+names = list(packages.packages.keys()) - - packages.add_package(opkg.Package(pkg_filename)) - -diff --git a/opkg.py b/opkg.py -index 54060c3..75ad3d3 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -217,7 +217,7 @@ class Package: - self.size = int(value) - elif name == 'md5sum': - self.md5 = value -- elif self.__dict__.has_key(name): -+ elif name in self.__dict__: - self.__dict__[name] = value - else: - print("Lost field %s, %s" % (name,value)) -@@ -447,7 +447,7 @@ class Packages: - package = pkg.package - arch = pkg.architecture - name = ("%s:%s" % (package, arch)) -- if (not self.packages.has_key(name)): -+ if (name not in self.packages): - self.packages[name] = pkg - - if pkg.compare_version(self.packages[name]) >= 0: -@@ -470,14 +470,14 @@ class Packages: - - def write_packages_file(self, fn): - f = open(fn, "w") -- names = self.packages.keys() -+ names = list(self.packages.keys()) - names.sort() - for name in names: - f.write(self.packages[name].__repr__()) - return - - def keys(self): -- return self.packages.keys() -+ return list(self.packages.keys()) - - def __getitem__(self, key): - return self.packages[key] diff --git a/patches/opkg-utils-r4747/0013-2to3-exception-handling-fixes.patch b/patches/opkg-utils-r4747/0013-2to3-exception-handling-fixes.patch deleted file mode 100644 index 638c6ca01..000000000 --- a/patches/opkg-utils-r4747/0013-2to3-exception-handling-fixes.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 14:50:56 +0200 -Subject: [PATCH] 2to3: exception handling fixes - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - arfile.py | 4 ++-- - opkg-make-index | 4 ++-- - opkg.py | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/arfile.py b/arfile.py -index 9149387..3f797a8 100644 ---- a/arfile.py -+++ b/arfile.py -@@ -54,11 +54,11 @@ class ArFile: - return FileSection(self.f, self.directory[fname][-1], int(self.directory[fname][5])) - - if self.directoryRead: -- raise IOError, (2, "AR member not found: " + fname) -+ raise IOError("AR member not found: " + fname) - - f = self._scan(fname) - if f == None: -- raise IOError, (2, "AR member not found: " + fname) -+ raise IOError("AR member not found: " + fname) - return f - - -diff --git a/opkg-make-index b/opkg-make-index -index 2fc8a69..997f286 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -198,10 +198,10 @@ names.sort() - for name in names: - try: - fnlist = packages[name].get_file_list() -- except OSError, e: -+ except OSError as e: - sys.stderr.write("Package %s disappeared on us!\n" % (name)) - continue -- except IOError, e: -+ except IOError as e: - sys.stderr.write("Package %s disappeared on us!\n" % (name)) - continue - for fn in fnlist: -diff --git a/opkg.py b/opkg.py -index 75ad3d3..ae31794 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -176,7 +176,7 @@ class Package: - elif name == 'size': - return self._get_file_size() - else: -- raise AttributeError, name -+ raise AttributeError(name) - - def _computeFileMD5(self): - # compute the MD5. diff --git a/patches/opkg-utils-r4747/0014-opkg-make-index-show-OSError-IOError.patch b/patches/opkg-utils-r4747/0014-opkg-make-index-show-OSError-IOError.patch deleted file mode 100644 index fe0b15447..000000000 --- a/patches/opkg-utils-r4747/0014-opkg-make-index-show-OSError-IOError.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 13:56:50 +0200 -Subject: [PATCH] opkg-make-index: show OSError/IOError - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-make-index | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/opkg-make-index b/opkg-make-index -index 997f286..e0844a7 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -131,11 +131,11 @@ for filename in files: - to_morgue(basename) - if opt_s: - print(filename) -- except OSError: -- sys.stderr.write("Package %s disappeared on us!\n" % (filename)) -+ except OSError as e: -+ sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (filename, e)) - continue -- except IOError: -- sys.stderr.write("Package %s disappeared on us!\n" % (filename)) -+ except IOError as e: -+ sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (filename, e)) - continue - - pkgsStampsFile = open(stamplist_filename, "w") -@@ -173,11 +173,11 @@ for name in names: - if (verbose): - sys.stderr.write("Writing info for package %s\n" % (pkg.package,)) - print(pkg) -- except OSError: -- sys.stderr.write("Package %s disappeared on us!\n" % (name)) -+ except OSError as e: -+ sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (name, e)) - continue -- except IOError: -- sys.stderr.write("Package %s disappeared on us!\n" % (name)) -+ except IOError as e: -+ sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (name, e)) - continue - - if packages_filename: -@@ -199,10 +199,10 @@ for name in names: - try: - fnlist = packages[name].get_file_list() - except OSError as e: -- sys.stderr.write("Package %s disappeared on us!\n" % (name)) -+ sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (name, e)) - continue - except IOError as e: -- sys.stderr.write("Package %s disappeared on us!\n" % (name)) -+ sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (name, e)) - continue - for fn in fnlist: - (h,t) = os.path.split(fn) diff --git a/patches/opkg-utils-r4747/0015-opkg.py-use-string-funtcions-directly-on-string-vari.patch b/patches/opkg-utils-r4747/0015-opkg.py-use-string-funtcions-directly-on-string-vari.patch deleted file mode 100644 index 782f6d81f..000000000 --- a/patches/opkg-utils-r4747/0015-opkg.py-use-string-funtcions-directly-on-string-vari.patch +++ /dev/null @@ -1,96 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 13:44:14 +0200 -Subject: [PATCH] opkg.py: use string funtcions directly on string variable - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-make-index | 3 +-- - opkg-show-deps | 11 +++++------ - opkg.py | 5 ++--- - 3 files changed, 8 insertions(+), 11 deletions(-) - -diff --git a/opkg-make-index b/opkg-make-index -index e0844a7..898a2f6 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -5,7 +5,6 @@ from glob import glob - import subprocess - import opkg - import getopt --import string - import re - - verbose = 0 -@@ -158,7 +157,7 @@ for name in names: - try: - pkg = packages.packages[name] - if locales_dir and pkg.depends: -- depends = string.split(pkg.depends, ',') -+ depends = pkg.depends.split(',') - locale = None - for d in depends: - m = re.match('.*virtual-locale-([a-zA-Z]+).*', d) -diff --git a/opkg-show-deps b/opkg-show-deps -index 3f5899d..d188aad 100755 ---- a/opkg-show-deps -+++ b/opkg-show-deps -@@ -4,7 +4,6 @@ import sys, os, posixpath - from glob import glob - import opkg - import getopt --import string - import re - - verbose = 0 -@@ -32,11 +31,11 @@ provider_hash = {} - - def split_list(str): - r = [] -- l = string.split(str, ",") -+ l = str.split(",") - for i in l: -- ll = string.split(i, "|") -+ ll = i.split("|") - for ii in ll: -- ii = string.strip(ii) -+ ii = ii.strip() - r.append(ii) - return r - -@@ -46,9 +45,9 @@ for i in list(packages.packages.keys()): - provider_hash[p.package] = [] - provider_hash[p.package].append(p) - if p.provides: -- provides = string.split(p.provides, ",") -+ provides = p.provides.split(",") - for prov in provides: -- prov = string.strip(prov) -+ prov = prov.strip() - if prov not in provider_hash: - provider_hash[prov] = [] - provider_hash[prov].append(p) -diff --git a/opkg.py b/opkg.py -index ae31794..856e057 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -38,7 +38,6 @@ import sys - import glob - import hashlib - import re --import string - import subprocess - from stat import ST_SIZE - import arfile -@@ -203,10 +202,10 @@ class Package: - line = control.readline() - while 1: - if not line: break -- line = string.rstrip(line) -+ line = line.rstrip() - lineparts = re.match(r'([\w-]*?):\s*(.*)', line) - if lineparts: -- name = string.lower(lineparts.group(1)) -+ name = lineparts.group(1).lower() - value = lineparts.group(2) - while 1: - line = control.readline() diff --git a/patches/opkg-utils-r4747/0016-opkg.py-catch-TypeError-when-reading-control-file-to.patch b/patches/opkg-utils-r4747/0016-opkg.py-catch-TypeError-when-reading-control-file-to.patch deleted file mode 100644 index 68ddae88e..000000000 --- a/patches/opkg-utils-r4747/0016-opkg.py-catch-TypeError-when-reading-control-file-to.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 14:34:46 +0200 -Subject: [PATCH] opkg.py: catch TypeError when reading control file, to show - which one is failing - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg.py | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/opkg.py b/opkg.py -index 856e057..299e84e 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -161,7 +161,10 @@ class Package: - control = tarf.extractfile("control") - except KeyError: - control = tarf.extractfile("./control") -- self.read_control(control) -+ try: -+ self.read_control(control) -+ except TypeError as e: -+ sys.stderr.write("Cannot read control file '%s' - %s\n" % (fn, e)) - control.close() - - self.scratch_dir = None -@@ -457,9 +460,13 @@ class Packages: - - def read_packages_file(self, fn): - f = open(fn, "r") -- while 1: -+ while True: - pkg = Package() -- pkg.read_control(f) -+ try: -+ pkg.read_control(f) -+ except TypeError as e: -+ sys.stderr.write("Cannot read control file '%s' - %s\n" % (fn, e)) -+ continue - if pkg.get_package(): - self.add_package(pkg) - else: diff --git a/patches/opkg-utils-r4747/0017-arfile-fix-test.patch b/patches/opkg-utils-r4747/0017-arfile-fix-test.patch deleted file mode 100644 index 5aad82c6c..000000000 --- a/patches/opkg-utils-r4747/0017-arfile-fix-test.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 16:38:06 +0200 -Subject: [PATCH] arfile: fix test - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - arfile.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/arfile.py b/arfile.py -index 3f797a8..88ace46 100644 ---- a/arfile.py -+++ b/arfile.py -@@ -131,5 +131,8 @@ if __name__ == "__main__": - tarf = tarfile.open("control.tar.gz", "r", tarStream) - #tarf.list() - -- f2 = tarf.extractfile("control") -+ try: -+ f2 = tarf.extractfile("control") -+ except KeyError: -+ f2 = tarf.extractfile("./control") - print(f2.read()) diff --git a/patches/opkg-utils-r4747/0018-opkg-make-index-don-t-use-stdout-for-Packages-output.patch b/patches/opkg-utils-r4747/0018-opkg-make-index-don-t-use-stdout-for-Packages-output.patch deleted file mode 100644 index c606af791..000000000 --- a/patches/opkg-utils-r4747/0018-opkg-make-index-don-t-use-stdout-for-Packages-output.patch +++ /dev/null @@ -1,86 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 16:40:49 +0200 -Subject: [PATCH] opkg-make-index: don't use stdout for Packages output and use - __str__ instead of __repr__ - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-make-index | 17 +++++++++-------- - opkg.py | 4 ++-- - 2 files changed, 11 insertions(+), 10 deletions(-) - -diff --git a/opkg-make-index b/opkg-make-index -index 898a2f6..02c425f 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -148,9 +148,8 @@ if opt_s: - if verbose: - sys.stderr.write("Generating Packages file\n") - if packages_filename: -- old_stdout = sys.stdout - tmp_packages_filename = ("%s.%d" % (packages_filename, os.getpid())) -- sys.stdout = open(tmp_packages_filename, "w") -+ pkgsFile = open(tmp_packages_filename, "w") - names = list(packages.packages.keys()) - names.sort() - for name in names: -@@ -171,7 +170,10 @@ for name in names: - continue - if (verbose): - sys.stderr.write("Writing info for package %s\n" % (pkg.package,)) -- print(pkg) -+ if packages_filename: -+ pkgsFile.write(str(pkg)) -+ else: -+ print(pkg) - except OSError as e: - sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (name, e)) - continue -@@ -180,8 +182,7 @@ for name in names: - continue - - if packages_filename: -- sys.stdout.close() -- sys.stdout = old_stdout -+ pkgsFile.close() - gzip_filename = ("%s.gz" % packages_filename) - tmp_gzip_filename = ("%s.%d" % (gzip_filename, os.getpid())) - gzip_cmd = "gzip -9c < %s > %s" % (tmp_packages_filename, tmp_gzip_filename) -@@ -211,12 +212,12 @@ for name in names: - - if filelist_filename: - tmp_filelist_filename = ("%s.%d" % (filelist_filename, os.getpid())) -- sys.stdout = open(tmp_filelist_filename, "w") -+ f = open(tmp_filelist_filename, "w") - names = list(files.keys()) - names.sort() - for name in names: -- print((name,files[name])) -- sys.stdout.close() -+ f.write("%s %s\n" % (name, files[name])) -+ f.close() - if posixpath.exists(filelist_filename): - os.unlink(filelist_filename) - os.rename(tmp_filelist_filename, filelist_filename) -diff --git a/opkg.py b/opkg.py -index 299e84e..84583be 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -402,7 +402,7 @@ class Package: - ref.parsed_version = parse_version(ref.version) - return self.parsed_version.compare(ref.parsed_version) - -- def __repr__(self): -+ def __str__(self): - out = "" - - # XXX - Some checks need to be made, and some exceptions -@@ -506,7 +506,7 @@ if __name__ == "__main__": - package.set_description("A test of the APIs.") - - print("<") -- sys.stdout.write(package) -+ sys.stdout.write(str(package)) - print(">") - - package.write_package("/tmp") diff --git a/patches/opkg-utils-r4747/0019-opkg.py-cast-lines-from-controlfile-as-string.patch b/patches/opkg-utils-r4747/0019-opkg.py-cast-lines-from-controlfile-as-string.patch deleted file mode 100644 index e2ee06094..000000000 --- a/patches/opkg-utils-r4747/0019-opkg.py-cast-lines-from-controlfile-as-string.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 16:43:04 +0200 -Subject: [PATCH] opkg.py: cast lines from controlfile as string - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/opkg.py b/opkg.py -index 84583be..6c39616 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -206,7 +206,7 @@ class Package: - while 1: - if not line: break - line = line.rstrip() -- lineparts = re.match(r'([\w-]*?):\s*(.*)', line) -+ lineparts = re.match(r'([\w-]*?):\s*(.*)', str(line)) - if lineparts: - name = lineparts.group(1).lower() - value = lineparts.group(2) diff --git a/patches/opkg-utils-r4747/0020-opkg.py-computeFileMD5-only-when-we-have-fn-otherwis.patch b/patches/opkg-utils-r4747/0020-opkg.py-computeFileMD5-only-when-we-have-fn-otherwis.patch deleted file mode 100644 index d2963ee39..000000000 --- a/patches/opkg-utils-r4747/0020-opkg.py-computeFileMD5-only-when-we-have-fn-otherwis.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 22:43:30 +0200 -Subject: [PATCH] opkg.py: computeFileMD5 only when we have fn, otherwise fails - to read None file - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg.py | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) - -diff --git a/opkg.py b/opkg.py -index 6c39616..9daff9e 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -182,14 +182,17 @@ class Package: - - def _computeFileMD5(self): - # compute the MD5. -- f = open(self.fn, "rb") -- sum = hashlib.md5() -- while True: -- data = f.read(1024) -- if not data: break -- sum.update(data) -- f.close() -- self.md5 = sum.hexdigest() -+ if not self.fn: -+ self.md5 = 'Unknown' -+ else: -+ f = open(self.fn, "rb") -+ sum = hashlib.md5() -+ while True: -+ data = f.read(1024) -+ if not data: break -+ sum.update(data) -+ f.close() -+ self.md5 = sum.hexdigest() - - def _get_file_size(self): - if not self.fn: diff --git a/patches/opkg-utils-r4747/0021-opkg.py-fix-write_package-when-called-from-main-test.patch b/patches/opkg-utils-r4747/0021-opkg.py-fix-write_package-when-called-from-main-test.patch deleted file mode 100644 index 029ccc48a..000000000 --- a/patches/opkg-utils-r4747/0021-opkg.py-fix-write_package-when-called-from-main-test.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 22:47:50 +0200 -Subject: [PATCH] opkg.py: fix write_package when called from main test - -* there is no self.meta_dir before self._setup_scratch_area -* control file needs to be closed before packing it with tar, otherwise it could be empty - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/opkg.py b/opkg.py -index 9daff9e..ad3a695 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -344,11 +344,11 @@ class Package: - return self.file_ext_opk - - def write_package(self, dirname): -- buf = self.render_control() -+ self._setup_scratch_area() - file = open("%s/control" % self.meta_dir, 'w') -- file.write(buf) -+ file.write(str(self)) -+ file.close() - -- self._setup_scratch_area() - cmd = "cd %s ; tar cvfz %s/control.tar.gz control" % (self.meta_dir, - self.scratch_dir) - diff --git a/patches/opkg-utils-r4747/0022-opkg.py-use-textwrap-for-description-writing.patch b/patches/opkg-utils-r4747/0022-opkg.py-use-textwrap-for-description-writing.patch deleted file mode 100644 index 68f87941e..000000000 --- a/patches/opkg-utils-r4747/0022-opkg.py-use-textwrap-for-description-writing.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 23:35:51 +0200 -Subject: [PATCH] opkg.py: use textwrap for description writing - -* description field in oe-core sometimes has extra line-feeds and is long -* extra line-feeds breaks read_control, because empty line means next Package -* long descriptions should be wrapped and properly indented, so they are parsed back properly - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/opkg.py b/opkg.py -index ad3a695..2294160 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -42,6 +42,7 @@ import subprocess - from stat import ST_SIZE - import arfile - import tarfile -+import textwrap - - class Version: - """A class for holding parsed package version information.""" -@@ -427,7 +428,9 @@ class Package: - if self.installed_size: out = out + "InstalledSize: %d\n" % int(self.installed_size) - if self.filename: out = out + "Filename: %s\n" % (self.filename) - if self.source: out = out + "Source: %s\n" % (self.source) -- if self.description: out = out + "Description: %s\n" % (self.description) -+ if self.description: -+ printable_description = textwrap.dedent(self.description).strip() -+ out = out + "Description: %s\n" % textwrap.fill(printable_description, width=74, initial_indent=' ', subsequent_indent=' ') - if self.oe: out = out + "OE: %s\n" % (self.oe) - if self.homepage: out = out + "HomePage: %s\n" % (self.homepage) - if self.license: out = out + "License: %s\n" % (self.license) diff --git a/patches/opkg-utils-r4747/0023-opkg.py-improve-test-so-it-prints-temporary-control-.patch b/patches/opkg-utils-r4747/0023-opkg.py-improve-test-so-it-prints-temporary-control-.patch deleted file mode 100644 index 7bce3973c..000000000 --- a/patches/opkg-utils-r4747/0023-opkg.py-improve-test-so-it-prints-temporary-control-.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 29 Mar 2012 23:36:56 +0200 -Subject: [PATCH] opkg.py: improve test so it prints temporary control file - with long description and then reads it back - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg.py | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/opkg.py b/opkg.py -index 2294160..27cbc2a 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -509,11 +509,21 @@ if __name__ == "__main__": - package.set_architecture("arm") - package.set_maintainer("Testing <testing@testing.testing>") - package.set_depends("libc") -- package.set_description("A test of the APIs.") -+ package.set_description("A test of the APIs. And very long descriptions so often used in oe-core\nfoo\n\n\nbar") - - print("<") - sys.stdout.write(str(package)) - print(">") -+ f = open("/tmp/control", "w") -+ f.write(str(package)) -+ f.close() -+ -+ f = open("/tmp/control", "r") -+ package2 = Package() -+ package2.read_control(f) -+ print("<") -+ sys.stdout.write(str(package2)) -+ print(">") - - package.write_package("/tmp") - diff --git a/patches/opkg-utils-r4747/0024-opkg-make-index-generate-complete-filelist.patch b/patches/opkg-utils-r4747/0024-opkg-make-index-generate-complete-filelist.patch deleted file mode 100644 index 32b8ea4c4..000000000 --- a/patches/opkg-utils-r4747/0024-opkg-make-index-generate-complete-filelist.patch +++ /dev/null @@ -1,124 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 5 Apr 2012 11:03:02 +0200 -Subject: [PATCH] opkg-make-index: generate complete filelist - -* when '-l Packages.filelist' option is used together with '-r Packages.old', - then only 'new' packages are processed to create Packages.filelist - packages found in Packages.old doesn't have fn set so get_file_list() - was returning empty -* now added get_file_list_dir() looks for filename in pkg_dir and if it - finds correct .ipk file it will use that to read its filelist, but it - also means that it will always unpack *all* Packages - very slow. -* it would be nice to add new param for Packages.filelist.old and then - filter filelist for packages used from Packages.old and merge it - together with new Packages.filelist, but that's more difficult because - of files structure. - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-make-index | 64 ++++++++++++++++++++++++++++++--------------------------- - opkg.py | 16 +++++++++++++++ - 2 files changed, 50 insertions(+), 30 deletions(-) - -diff --git a/opkg-make-index b/opkg-make-index -index 02c425f..4425107 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -190,34 +190,38 @@ if packages_filename: - os.rename(tmp_packages_filename, packages_filename) - os.rename(tmp_gzip_filename, gzip_filename) - --if verbose: -- sys.stderr.write("Generate Packages.filelist file\n") --files = {} --names = list(packages.packages.keys()) --names.sort() --for name in names: -- try: -- fnlist = packages[name].get_file_list() -- except OSError as e: -- sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (name, e)) -- continue -- except IOError as e: -- sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (name, e)) -- continue -- for fn in fnlist: -- (h,t) = os.path.split(fn) -- if not t: continue -- if t not in files: files[t] = name+':'+fn -- else: files[t] = files[t] + ',' + name+':'+fn -- - if filelist_filename: -- tmp_filelist_filename = ("%s.%d" % (filelist_filename, os.getpid())) -- f = open(tmp_filelist_filename, "w") -- names = list(files.keys()) -- names.sort() -- for name in names: -- f.write("%s %s\n" % (name, files[name])) -- f.close() -- if posixpath.exists(filelist_filename): -- os.unlink(filelist_filename) -- os.rename(tmp_filelist_filename, filelist_filename) -+ if verbose: -+ sys.stderr.write("Generate Packages.filelist file\n") -+ files = {} -+ names = list(packages.packages.keys()) -+ names.sort() -+ for name in names: -+ try: -+ if verbose: -+ sys.stderr.write("Reading filelist for package '%s'\n" % name) -+# sys.stderr.write("Package for name '%s':\n'%s'\n" % (name, packages[name])) -+ fnlist = packages[name].get_file_list_dir(pkg_dir) -+# sys.stderr.write("Filelist for package '%s': '%s'\n" % (name, fnlist)) -+ except OSError as e: -+ sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (name, e)) -+ continue -+ except IOError as e: -+ sys.stderr.write("Package %s disappeared on us!\n(%s)\n" % (name, e)) -+ continue -+ for fn in fnlist: -+ (h,t) = os.path.split(fn) -+ if not t: continue -+ if t not in files: files[t] = name+':'+fn -+ else: files[t] = files[t] + ',' + name+':'+fn -+ -+ tmp_filelist_filename = ("%s.%d" % (filelist_filename, os.getpid())) -+ f = open(tmp_filelist_filename, "w") -+ names = list(files.keys()) -+ names.sort() -+ for name in names: -+ f.write("%s %s\n" % (name, files[name])) -+ f.close() -+ if posixpath.exists(filelist_filename): -+ os.unlink(filelist_filename) -+ os.rename(tmp_filelist_filename, filelist_filename) -diff --git a/opkg.py b/opkg.py -index 27cbc2a..707a882 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -325,8 +325,24 @@ class Package: - def get_license(self, license): - return self.license - -+ def get_file_list_dir(self, directory): -+ if not self.fn: -+ try: -+ cmd = "find %s -name %s | head -n 1" % (directory, self.filename) -+ rc = subprocess.check_output(cmd, shell=True) -+ newfn = str(rc).split()[0] -+# sys.stderr.write("Package '%s' with empty fn and filename is '%s' was found in '%s', updating fn\n" % (self.package, self.filename, newfn)) -+ self.fn = newfn -+ except OSError as e: -+ sys.stderr.write("Cannot find current fn for package '%s' filename '%s' in dir '%s'\n(%s)\n" % (self.package, self.filename, directory, e)) -+ except IOError as e: -+ sys.stderr.write("Cannot find current fn for package '%s' filename '%s' in dir '%s'\n(%s)\n" % (self.package, self.filename, directory, e)) -+ return self.get_file_list() -+ -+ - def get_file_list(self): - if not self.fn: -+ sys.stderr.write("Package '%s' has empty fn returning empty filelist\n" % (self.package)) - return [] - f = open(self.fn, "rb") - ar = arfile.ArFile(f, self.fn) diff --git a/patches/opkg-utils-r4747/0025-opkg.py-get_file_list_dir-fix-empty-output-from-find.patch b/patches/opkg-utils-r4747/0025-opkg.py-get_file_list_dir-fix-empty-output-from-find.patch deleted file mode 100644 index 390e25599..000000000 --- a/patches/opkg-utils-r4747/0025-opkg.py-get_file_list_dir-fix-empty-output-from-find.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Thu, 5 Apr 2012 13:03:17 +0200 -Subject: [PATCH] opkg.py: get_file_list_dir: fix empty output from find if - package disappers - -* if .ipk disappers before parsing Packages.old then it's fine and it's not used at all -* but if it disappers between parsing Packages.old and generating Packages.filelist then - it would fail to split() empty output - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg.py | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/opkg.py b/opkg.py -index 707a882..84a8eb1 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -330,9 +330,10 @@ class Package: - try: - cmd = "find %s -name %s | head -n 1" % (directory, self.filename) - rc = subprocess.check_output(cmd, shell=True) -- newfn = str(rc).split()[0] --# sys.stderr.write("Package '%s' with empty fn and filename is '%s' was found in '%s', updating fn\n" % (self.package, self.filename, newfn)) -- self.fn = newfn -+ if rc != "": -+ newfn = str(rc).split()[0] -+# sys.stderr.write("Package '%s' with empty fn and filename is '%s' was found in '%s', updating fn\n" % (self.package, self.filename, newfn)) -+ self.fn = newfn - except OSError as e: - sys.stderr.write("Cannot find current fn for package '%s' filename '%s' in dir '%s'\n(%s)\n" % (self.package, self.filename, directory, e)) - except IOError as e: -@@ -342,7 +343,7 @@ class Package: - - def get_file_list(self): - if not self.fn: -- sys.stderr.write("Package '%s' has empty fn returning empty filelist\n" % (self.package)) -+ sys.stderr.write("Package '%s' has empty fn, returning empty filelist\n" % (self.package)) - return [] - f = open(self.fn, "rb") - ar = arfile.ArFile(f, self.fn) diff --git a/patches/opkg-utils-r4747/0026-opkg-make-index-disable-filelist-by-default.patch b/patches/opkg-utils-r4747/0026-opkg-make-index-disable-filelist-by-default.patch deleted file mode 100644 index 76ba76866..000000000 --- a/patches/opkg-utils-r4747/0026-opkg-make-index-disable-filelist-by-default.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Mon, 23 Apr 2012 10:36:25 +0200 -Subject: [PATCH] opkg-make-index: disable filelist by default - -* user has to specify filename with -l to enable it - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-make-index | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/opkg-make-index b/opkg-make-index -index 4425107..22393e8 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -37,7 +37,7 @@ def to_locale(filename, locale): - - old_filename = None - packages_filename = None --filelist_filename = "Packages.filelist" -+filelist_filename = None - stamplist_filename = "Packages.stamps" - opt_s = 0 - opt_m = 0 diff --git a/patches/opkg-utils-r4747/0027-Option-C-ist-shown-in-usage-and-implemented-but-was-.patch b/patches/opkg-utils-r4747/0027-Option-C-ist-shown-in-usage-and-implemented-but-was-.patch deleted file mode 100644 index 4a30fc770..000000000 --- a/patches/opkg-utils-r4747/0027-Option-C-ist-shown-in-usage-and-implemented-but-was-.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Ondics Githubler <githubler@ondics.de> -Date: Tue, 29 May 2012 17:34:14 +0200 -Subject: [PATCH] Option "C" ist shown in usage() and implemented, but was - missing in getopts. Added "C". - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> ---- - opkg-build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/opkg-build b/opkg-build -index 012afd3..485897a 100755 ---- a/opkg-build -+++ b/opkg-build -@@ -160,7 +160,7 @@ outer=ar - noclean=0 - opkext=0 - usage="Usage: $0 [-c] [-C] [-O] [-o owner] [-g group] <pkg_directory> [<destination_directory>]" --while getopts "cg:ho:vO" opt; do -+while getopts "cCg:ho:vO" opt; do - case $opt in - o ) owner=$OPTARG - ogargs="--owner=$owner" diff --git a/patches/opkg-utils-r4747/0028-Changed-call-to-subprocess.check_output-which-isn-t-.patch b/patches/opkg-utils-r4747/0028-Changed-call-to-subprocess.check_output-which-isn-t-.patch deleted file mode 100644 index b119dea37..000000000 --- a/patches/opkg-utils-r4747/0028-Changed-call-to-subprocess.check_output-which-isn-t-.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Chris Diamand <chris@diamand.org> -Date: Tue, 29 May 2012 17:34:15 +0200 -Subject: [PATCH] Changed call to subprocess.check_output which isn't - compatible with Python 2.6 - -subprocess.check_output is not present in Python 2.6. Since the return value -is not being used anyway, replace it with subprocess.call(), which is. - -Signed-off-by: Chris Diamand <chris@diamand.org> -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> ---- - opkg-make-index | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/opkg-make-index b/opkg-make-index -index 22393e8..1c3a8e1 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -186,7 +186,7 @@ if packages_filename: - gzip_filename = ("%s.gz" % packages_filename) - tmp_gzip_filename = ("%s.%d" % (gzip_filename, os.getpid())) - gzip_cmd = "gzip -9c < %s > %s" % (tmp_packages_filename, tmp_gzip_filename) -- rc = subprocess.check_output(gzip_cmd, shell=True) -+ subprocess.call(gzip_cmd, shell=True) - os.rename(tmp_packages_filename, packages_filename) - os.rename(tmp_gzip_filename, gzip_filename) - diff --git a/patches/opkg-utils-r4747/0029-opkg.py-Add-check_output-defintion-so-it-works-on-py.patch b/patches/opkg-utils-r4747/0029-opkg.py-Add-check_output-defintion-so-it-works-on-py.patch deleted file mode 100644 index 8f33b06d6..000000000 --- a/patches/opkg-utils-r4747/0029-opkg.py-Add-check_output-defintion-so-it-works-on-py.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Richard Purdie <richard.purdie@linuxfoundation.org> -Date: Thu, 19 Jul 2012 16:55:12 +0100 -Subject: [PATCH] opkg.py: Add check_output defintion so it works on python 2.6 - -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> ---- - opkg.py | 22 +++++++++++++++++++++- - 1 file changed, 21 insertions(+), 1 deletion(-) - -diff --git a/opkg.py b/opkg.py -index 84a8eb1..45a6119 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -326,10 +326,30 @@ class Package: - return self.license - - def get_file_list_dir(self, directory): -+ def check_output(*popenargs, **kwargs): -+ """Run command with arguments and return its output as a byte string. -+ -+ Backported from Python 2.7 as it's implemented as pure python on stdlib. -+ -+ >>> check_output(['/usr/bin/python', '--version']) -+ Python 2.6.2 -+ """ -+ process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) -+ output, unused_err = process.communicate() -+ retcode = process.poll() -+ if retcode: -+ cmd = kwargs.get("args") -+ if cmd is None: -+ cmd = popenargs[0] -+ error = subprocess.CalledProcessError(retcode, cmd) -+ error.output = output -+ raise error -+ return output -+ - if not self.fn: - try: - cmd = "find %s -name %s | head -n 1" % (directory, self.filename) -- rc = subprocess.check_output(cmd, shell=True) -+ rc = check_output(cmd, shell=True) - if rc != "": - newfn = str(rc).split()[0] - # sys.stderr.write("Package '%s' with empty fn and filename is '%s' was found in '%s', updating fn\n" % (self.package, self.filename, newfn)) diff --git a/patches/opkg-utils-r4747/0030-opkg-make-index-fix-mis-indented-else.patch b/patches/opkg-utils-r4747/0030-opkg-make-index-fix-mis-indented-else.patch deleted file mode 100644 index 68d167e6c..000000000 --- a/patches/opkg-utils-r4747/0030-opkg-make-index-fix-mis-indented-else.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Marc Olzheim <marc@iphion.nl> -Date: Thu, 4 Oct 2012 11:01:10 +0200 -Subject: [PATCH] opkg-make-index: fix mis-indented else: - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - opkg-make-index | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/opkg-make-index b/opkg-make-index -index 1c3a8e1..44fa64d 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -213,7 +213,7 @@ if filelist_filename: - (h,t) = os.path.split(fn) - if not t: continue - if t not in files: files[t] = name+':'+fn -- else: files[t] = files[t] + ',' + name+':'+fn -+ else: files[t] = files[t] + ',' + name+':'+fn - - tmp_filelist_filename = ("%s.%d" % (filelist_filename, os.getpid())) - f = open(tmp_filelist_filename, "w") diff --git a/patches/opkg-utils-r4747/0031-opkg.py-opkg-build-fix-creation-of-tar-archives.patch b/patches/opkg-utils-r4747/0031-opkg.py-opkg-build-fix-creation-of-tar-archives.patch deleted file mode 100644 index 795408042..000000000 --- a/patches/opkg-utils-r4747/0031-opkg.py-opkg-build-fix-creation-of-tar-archives.patch +++ /dev/null @@ -1,79 +0,0 @@ -From: Steffen Sledz <sledz@dresearch-fe.de> -Date: Wed, 24 Oct 2012 12:53:56 +0200 -Subject: [PATCH] opkg.py/opkg-build: fix creation of tar archives - -Since openSUSE 12.2 the installed tar uses posix instead of gnu encoding -by default. This format is not fully supported by opkg and results in -ipk packages not installable at the target. - -Collected errors: - * get_header_tar: Unknown typeflag: 0x78: Success. - * get_header_tar: Unknown typeflag: 0x78: Success. - * get_header_tar: Unknown typeflag: 0x78: Success. - * extract_archive: Don't know how to handle /var/lib/opkg/tmp/opkg-mg997m/chicken-bin-fGRvr4/PaxHeaders.17512/.: No such file or directory. - * get_header_tar: Unknown typeflag: 0x78: No such file or directory. - * get_header_tar: Unknown typeflag: 0x78: No such file or directory. - ... - -Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de> -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> ---- - opkg-build | 6 +++--- - opkg.py | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/opkg-build b/opkg-build -index 485897a..f8c6151 100755 ---- a/opkg-build -+++ b/opkg-build -@@ -233,8 +233,8 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$ - mkdir $tmp_dir - - echo $CONTROL > $tmp_dir/tarX --( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . ) --( cd $pkg_dir/$CONTROL && tar $ogargs -czf $tmp_dir/control.tar.gz . ) -+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz --format=gnu -f $tmp_dir/data.tar.gz . ) -+( cd $pkg_dir/$CONTROL && tar $ogargs -cz --format=gnu -f $tmp_dir/control.tar.gz . ) - rm $tmp_dir/tarX - - echo "2.0" > $tmp_dir/debian-binary -@@ -249,7 +249,7 @@ rm -f $pkg_file - if [ "$outer" = "ar" ] ; then - ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) - else -- ( cd $tmp_dir && tar -zcf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) -+ ( cd $tmp_dir && tar -cz --format=gnu -f $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) - fi - - rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz -diff --git a/opkg.py b/opkg.py -index 45a6119..c839100 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -387,7 +387,7 @@ class Package: - file.write(str(self)) - file.close() - -- cmd = "cd %s ; tar cvfz %s/control.tar.gz control" % (self.meta_dir, -+ cmd = "cd %s ; tar cvz --format=gnu -f %s/control.tar.gz control" % (self.meta_dir, - self.scratch_dir) - - cmd_out, cmd_in, cmd_err = os.popen3(cmd) -@@ -402,7 +402,7 @@ class Package: - bits = "control.tar.gz" - - if self.file_list: -- cmd = "cd %s ; tar cvfz %s/data.tar.gz" % (self.file_dir, -+ cmd = "cd %s ; tar cvz --format=gnu -f %s/data.tar.gz" % (self.file_dir, - self.scratch_dir) - - cmd_out, cmd_in, cmd_err = os.popen3(cmd) -@@ -417,7 +417,7 @@ class Package: - bits = bits + " data.tar.gz" - - file = "%s_%s_%s.%s" % (self.package, self.version, self.architecture, self.get_package_extension()) -- cmd = "cd %s ; tar cvfz %s/%s %s" % (self.scratch_dir, -+ cmd = "cd %s ; tar cvz --format=gnu -f %s/%s %s" % (self.scratch_dir, - dirname, - file, - bits) diff --git a/patches/opkg-utils-r4747/0032-opkg-build-Remove-bashism-in-sh-script.patch b/patches/opkg-utils-r4747/0032-opkg-build-Remove-bashism-in-sh-script.patch deleted file mode 100644 index 66ab48736..000000000 --- a/patches/opkg-utils-r4747/0032-opkg-build-Remove-bashism-in-sh-script.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Richard Purdie <richard.purdie@linuxfoundation.org> -Date: Tue, 26 Mar 2013 13:56:22 +0000 -Subject: [PATCH] opkg-build: Remove bashism in sh script - -Otherwise this fills logs with output on systems with dash as /bin/sh, -we might as well execute cleanly. - -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> ---- - opkg-build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/opkg-build b/opkg-build -index f8c6151..90a7111 100755 ---- a/opkg-build -+++ b/opkg-build -@@ -239,7 +239,7 @@ rm $tmp_dir/tarX - - echo "2.0" > $tmp_dir/debian-binary - --if (( $opkext == 1)); then -+if [ $opkext -eq 1 ]; then - pkg_file=$dest_dir/${pkg}_${version}_${arch}.opk - else - pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk diff --git a/patches/opkg-utils-r4747/0033-AUTHORS-New-file.patch b/patches/opkg-utils-r4747/0033-AUTHORS-New-file.patch deleted file mode 100644 index c37253629..000000000 --- a/patches/opkg-utils-r4747/0033-AUTHORS-New-file.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Paul Barker <paul@paulbarker.me.uk> -Date: Tue, 3 Dec 2013 13:19:19 +0000 -Subject: [PATCH] AUTHORS: New file - -Signed-off-by: Paul Barker <paul@paulbarker.me.uk> ---- - AUTHORS | 3 +++ - 1 file changed, 3 insertions(+) - create mode 100644 AUTHORS - -diff --git a/AUTHORS b/AUTHORS -new file mode 100644 -index 0000000..01df80d ---- /dev/null -+++ b/AUTHORS -@@ -0,0 +1,3 @@ -+Current maintainer: Paul Barker <paul@paulbarker.me.uk> -+ -+For a list of additional authors and contributors, see the git commit log. diff --git a/patches/opkg-utils-r4747/0034-CONTRIBUTING-New-file.patch b/patches/opkg-utils-r4747/0034-CONTRIBUTING-New-file.patch deleted file mode 100644 index 1a861c3a6..000000000 --- a/patches/opkg-utils-r4747/0034-CONTRIBUTING-New-file.patch +++ /dev/null @@ -1,138 +0,0 @@ -From: Paul Barker <paul@paulbarker.me.uk> -Date: Fri, 20 Dec 2013 17:19:03 +0000 -Subject: [PATCH] CONTRIBUTING: New file - -Added instructions for potential contributors. - -Signed-off-by: Paul Barker <paul@paulbarker.me.uk> ---- - CONTRIBUTING | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 120 insertions(+) - create mode 100644 CONTRIBUTING - -diff --git a/CONTRIBUTING b/CONTRIBUTING -new file mode 100644 -index 0000000..c76fb67 ---- /dev/null -+++ b/CONTRIBUTING -@@ -0,0 +1,120 @@ -+% Contributing to opkg-utils -+ -+## Starting off -+ -+To contribute to opkg-utils, you'll need a basic understanding of how to use -+git. You'll also need to make sure you can use `git send-email` - maybe try -+sending a few patches to your own email address first to check you've got it set -+up correctly. -+ -+If you don't have the latest opkg-utils sources, you'll need to clone the -+official repository: -+ -+ git clone git://git.yoctoproject.org/opkg-utils.git -+ -+## Developing patches -+ -+Now make and commit your changes (that bit is left as an exercize for the -+reader). Developing on a separate branch is a very good idea: -+ -+ git checkout -b my-branch -+ git add ... # As appropriate -+ git commit -s # As appropriate -+ -+Adding a "Signed-off-by" line (using the -s option to `git commit`) is very -+important and signifies acceptance of the Developer's Certificate of Origin (see -+appendix). We also accept "Cc", "Acked-by" and "Tested-by" lines as appropriate, -+as per the [submission guidelines for the Linux kernel][1]. We're not currently -+interested in "Reviewed-by", "Reported-by" or "Suggested-by" lines. -+ -+The subject (first line of the commit message) for each patch should begin with -+the submodule, file or function that is modified, followed by a short (<50 -+characters if possible) description of the change. That helps -+a lot to find anything related to a submodule or file by searching with a -+simple 'git log | grep [foo]'. -+ -+The remainder of the commit message should explain in detail what was changed -+and why. -+ -+Each patch should make a single logical change. If multiple files are changed to -+fix one bug or add one feature, that should be a single patch. If one file is -+changed to fix multiple bugs, that should be multiple patches. -+ -+[1]: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches -+ -+## Submitting patches for review -+ -+Opkg-utils is primarily used by the OpenEmbedded build system but may also be -+used by other embedded Linux projects. For now, please submit all patches to -+both the Yocto Project mailing list (yocto@yoctoproject.org), the opkg mailing -+list (opkg-devel@googlegroups.com) and Cc the maintainer -+(paul@paulbarker.me.uk), adding a subject prefix of "opkg-utils PATCH" (this -+prefix is necessary as the Yocto Project mailing list receives patches for many -+projects). Also make sure that you use the -M option on the command line or the -+"diff.renames=copy" option in your config. -+ -+That sounds like a lot to remember but if you run the following commands in your -+opkg-utils directory it will all be done automatically when you use -+`git format-patch` or `git send-email`: -+ -+ git config format.to "opkg-devel@googlegroups.com" -+ git config --add format.to "yocto@yoctoproject.org" -+ git config format.cc "paul@paulbarker.me.uk" -+ git config format.subjectprefix "opkg-utils PATCH" -+ git config diff.renames copy -+ -+To prepare your patches, assuming you took the advice before about developing on -+a separate branch: -+ -+ git format-patch master -+ -+You can add `--cover-letter` to that command if you want to include a -+descriptive email along with your patches. -+ -+Once you've checked the generated patch files, run: -+ -+ git send-email -+ -+That should result in your patches being sent to the relevant mailing lists in -+the correct format. The patches should then be reviewed and you should receive -+feedback by email. If you haven't heard anything within 2 weeks, feel free to -+send us a reminder. -+ -+If you need any further help or advice, just ask on the opkg-devel mailing list -+(opkg-devel@googlegroups.com). -+ -+## Commit Access -+ -+If you have commit access to the opkg-utils git repository, it is assumed that -+you know what you're doing. You can bypass the mailing list and push your -+changes directly to the public repository, just make sure that you test things -+properly and sign off your patches! -+ -+Appendix: Developer's Certificate of Origin -+=========================================== -+ -+ Developer's Certificate of Origin 1.1 -+ -+ By making a contribution to this project, I certify that: -+ -+ (a) The contribution was created in whole or in part by me and I -+ have the right to submit it under the open source license -+ indicated in the file; or -+ -+ (b) The contribution is based upon previous work that, to the best -+ of my knowledge, is covered under an appropriate open source -+ license and I have the right under that license to submit that -+ work with modifications, whether created in whole or in part -+ by me, under the same open source license (unless I am -+ permitted to submit under a different license), as indicated -+ in the file; or -+ -+ (c) The contribution was provided directly to me by some other -+ person who certified (a), (b) or (c) and I have not modified -+ it. -+ -+ (d) I understand and agree that this project and the contribution -+ are public and that a record of the contribution (including all -+ personal information I submit with it, including my sign-off) is -+ maintained indefinitely and may be redistributed consistent with -+ this project or the open source license(s) involved. diff --git a/patches/opkg-utils-r4747/0203-opkg-build-add-control.tar.gz-before-data.tar.gz.patch b/patches/opkg-utils-r4747/0203-opkg-build-add-control.tar.gz-before-data.tar.gz.patch deleted file mode 100644 index a0397680a..000000000 --- a/patches/opkg-utils-r4747/0203-opkg-build-add-control.tar.gz-before-data.tar.gz.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Michael Olbrich <m.olbrich@pengutronix.de> -Date: Tue, 4 Feb 2014 16:55:06 +0100 -Subject: [PATCH] opkg-build: add control.tar.gz before data.tar.gz - -This is not strictly necessary for opkg. However, dpkg now requieres this -and it can be convenient to use it (e.g. dpkg --contents <something>.ipk). - -Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> ---- - opkg-build | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/opkg-build b/opkg-build -index 646787b..68ca5e2 100755 ---- a/opkg-build -+++ b/opkg-build -@@ -250,9 +250,9 @@ if [ "$outer" = "ar" ] ; then - # chown the content to "0:0". files. This is needed as high UID values (> - # 99999) cause problems when parsing ar file headers - ( cd $tmp_dir && chown 0:0 ./debian-binary ./data.tar.gz ./control.tar.gz && -- ${CROSS_COMPILE}ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) -+ ${CROSS_COMPILE}ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.gz ) - else -- ( cd $tmp_dir && tar -cz --format=gnu -f $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) -+ ( cd $tmp_dir && tar -cz --format=gnu -f $pkg_file ./debian-binary ./control.tar.gz ./data.tar.gz ) - fi - - rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz diff --git a/patches/opkg-utils-r4747/series b/patches/opkg-utils-r4747/series deleted file mode 100644 index 10d665c6e..000000000 --- a/patches/opkg-utils-r4747/series +++ /dev/null @@ -1,43 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -#tag:upstream --start-number 1 -0001-opkg-compare-versions-Adapted-to-the-latest-opkg-ups.patch -0002-opkg-make-index-don-t-error-out-when-some-package-di.patch -0003-opkg-make-index-convert-mtime-to-int-before-comparin.patch -0004-opkg.py-Add-knowledge-about-License-field-in-ipk-hea.patch -0005-arfile.py-handle-six-digit-UIDs.patch -0006-Use-python-via-the-PATH-rather-than-hardcoding-usr-b.patch -0007-opkg.py-use-hashlib-instead-of-old-md5-module.patch -0008-opkg.py-arfile.py-report-which-file-has-wrong-format.patch -0009-arfile-decode-read-lines-as-ascii-string-before-gett.patch -0010-2to3-use-subprocess-instead-of-commands.patch -0011-2to3-print-fixes.patch -0012-2to3-dictionary-fixes.patch -0013-2to3-exception-handling-fixes.patch -0014-opkg-make-index-show-OSError-IOError.patch -0015-opkg.py-use-string-funtcions-directly-on-string-vari.patch -0016-opkg.py-catch-TypeError-when-reading-control-file-to.patch -0017-arfile-fix-test.patch -0018-opkg-make-index-don-t-use-stdout-for-Packages-output.patch -0019-opkg.py-cast-lines-from-controlfile-as-string.patch -0020-opkg.py-computeFileMD5-only-when-we-have-fn-otherwis.patch -0021-opkg.py-fix-write_package-when-called-from-main-test.patch -0022-opkg.py-use-textwrap-for-description-writing.patch -0023-opkg.py-improve-test-so-it-prints-temporary-control-.patch -0024-opkg-make-index-generate-complete-filelist.patch -0025-opkg.py-get_file_list_dir-fix-empty-output-from-find.patch -0026-opkg-make-index-disable-filelist-by-default.patch -0027-Option-C-ist-shown-in-usage-and-implemented-but-was-.patch -0028-Changed-call-to-subprocess.check_output-which-isn-t-.patch -0029-opkg.py-Add-check_output-defintion-so-it-works-on-py.patch -0030-opkg-make-index-fix-mis-indented-else.patch -0031-opkg.py-opkg-build-fix-creation-of-tar-archives.patch -0032-opkg-build-Remove-bashism-in-sh-script.patch -0033-AUTHORS-New-file.patch -0034-CONTRIBUTING-New-file.patch -#tag:ptx --start-number 200 -0200-opkg-make-ar-deterministic.patch -0201-opkg-build-use-CROSS_COMPILE-ar.patch -0202-Fill-out-Installed-Size.patch -0203-opkg-build-add-control.tar.gz-before-data.tar.gz.patch -# 89314d5345534e41a0e59195bef10ccc - git-ptx-patches magic diff --git a/rules/host-opkg-utils.make b/rules/host-opkg-utils.make index d0cbaee32..19fa98257 100644 --- a/rules/host-opkg-utils.make +++ b/rules/host-opkg-utils.make @@ -16,11 +16,11 @@ HOST_PACKAGES-$(PTXCONF_HOST_OPKG_UTILS) += host-opkg-utils # # Paths and names # -HOST_OPKG_UTILS_VERSION := r4747 -HOST_OPKG_UTILS_MD5 := 0dfe19a4a127bcea8e91a1735580841d +HOST_OPKG_UTILS_VERSION := 0.3.5 +HOST_OPKG_UTILS_MD5 := 4696b1381d9fd2a5df9ca7f5c079588a HOST_OPKG_UTILS := opkg-utils-$(HOST_OPKG_UTILS_VERSION) -HOST_OPKG_UTILS_SUFFIX := tar.gz -HOST_OPKG_UTILS_URL := http://www.novatech-llc.com/files/$(HOST_OPKG_UTILS).$(HOST_OPKG_UTILS_SUFFIX) +HOST_OPKG_UTILS_SUFFIX := tar.bz2 +HOST_OPKG_UTILS_URL := https://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/snapshot/$(HOST_OPKG_UTILS).$(HOST_OPKG_UTILS_SUFFIX) HOST_OPKG_UTILS_SOURCE := $(SRCDIR)/$(HOST_OPKG_UTILS).$(HOST_OPKG_UTILS_SUFFIX) HOST_OPKG_UTILS_DIR := $(HOST_BUILDDIR)/$(HOST_OPKG_UTILS) HOST_OPKG_UTILS_LICENSE := GPL-2.0 @@ -30,7 +30,6 @@ HOST_OPKG_UTILS_LICENSE := GPL-2.0 # ---------------------------------------------------------------------------- HOST_OPKG_UTILS_CONF_TOOL := NO -HOST_OPKG_UTILS_MAKE_OPT := PREFIX= $(HOST_ENV_CC) -HOST_OPKG_UTILS_INSTALL_OPT := $(HOST_OPKG_UTILS_MAKE_OPT) install +HOST_OPKG_UTILS_MAKE_ENV := PREFIX= # vim: syntax=make |