[oe-commits] Scott Anderson : ipkg-utils: Make arfile.py handle six digit UIDs

git version control git at git.openembedded.org
Tue Oct 5 19:45:57 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: b3da649ee25374f284d03ebce5843b6326559f73
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=b3da649ee25374f284d03ebce5843b6326559f73

Author: Scott Anderson <o2e at saaworld.com>
Date:   Sun Oct  3 21:57:04 2010 -0700

ipkg-utils: Make 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: Scott Anderson <o2e at saaworld.com>
Acked-by: Tom Rini <tom_rini at mentor.com>

---

 .../ipkg-utils/arfile_header_split.patch           |   16 ++++++++++++++++
 recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb   |    3 ++-
 2 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/recipes/ipkg-utils/ipkg-utils/arfile_header_split.patch b/recipes/ipkg-utils/ipkg-utils/arfile_header_split.patch
new file mode 100644
index 0000000..ce1993b
--- /dev/null
+++ b/recipes/ipkg-utils/ipkg-utils/arfile_header_split.patch
@@ -0,0 +1,16 @@
+--- ipkg-utils/arfile.py.orig	2010-09-29 13:38:15.000000000 -0700
++++ ipkg-utils/arfile.py	2010-10-01 16:06:00.000000000 -0700
+@@ -74,7 +74,12 @@
+             if l == "\n":
+                 l = self.f.readline()
+                 if not l: break
+-            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/recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb b/recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
index 42653fd..d22fd26 100644
--- a/recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
+++ b/recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
@@ -5,7 +5,7 @@ LICENSE = "GPL"
 CONFLICTS = "ipkg-link"
 RDEPENDS_${PN} = "python"
 SRCDATE = "20050930"
-PR = "r27"
+PR = "r28"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
@@ -17,6 +17,7 @@ SRC_URI = "${HANDHELDS_CVS};module=ipkg-utils \
            file://ipkg-make-index-track-stamps.patch \
            file://fields_tweaks.patch \
            file://ipkg-env.patch \
+           file://arfile_header_split.patch \
 	   "
 
 S = "${WORKDIR}/ipkg-utils"





More information about the Openembedded-commits mailing list