Skip to contentSkip to conversation

opkg-utils: port arfile.py patch to opkg-utils, bump PR

PATCH In review [email protected] 2 participants 3 messages May 19, 2011 – May 26, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opkg-utils: port arfile.py patch to opkg-utils, bump PR

From: Bernhard Guillon <[email protected]>

We need this patch for opkg as well

original commit b3da649ee25374f284d03ebce5843b6326559f73 original Author: Scott Anderson <[email protected]> original commit message:
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.

---
 .../opkg-utils/arfile_header_split.patch           |   17 +++++++++++++++++
 recipes/opkg-utils/opkg-utils_svn.bb               |    3 ++-
 2 files changed, 19 insertions(+), 1 deletions(-)
 create mode 100644 recipes/opkg-utils/opkg-utils/arfile_header_split.patch
recipes/opkg-utils/opkg-utils/arfile_header_split.patch new file +17 -0
new file mode 100644
index 0000000..4640367
@@ -0,0 +1,17 @@
+--- 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
+             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]
recipes/opkg-utils/opkg-utils_svn.bb +2 -1
index 6b8d3ea..a8f2cb7 100644
@@ -6,10 +6,11 @@ RDEPENDS_${PN} = "python"
 RDEPENDS_${PN}_virtclass-native = ""
 SRCREV = "4747"
 PV = "0.1.8+svnr${SRCPV}"
-PR = "r6"
+PR = "r7"
 
 SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=opkg-utils;proto=http \
            file://index-ignore-filenotfound.patch \
+           file://arfile_header_split.patch \
            file://mtime-int.patch"
 
 S = "${WORKDIR}/opkg-utils"
Signature · 1 line
1.7.0.4
#1 lore raw

Hi all,

please give me an ACK or NACK.

If no one complains I will push this patch this thursday :)

best regards
Bernhard

Quoted 51 lines · On 19.05.2011 23:50, [email protected] wrote:

From: Bernhard Guillon<[email protected]>

We need this patch for opkg as well

original commit b3da649ee25374f284d03ebce5843b6326559f73 original Author: Scott Anderson<[email protected]> original commit message:
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.

---
  .../opkg-utils/arfile_header_split.patch           |   17 +++++++++++++++++
  recipes/opkg-utils/opkg-utils_svn.bb               |    3 ++-
  2 files changed, 19 insertions(+), 1 deletions(-)

create mode 100644 recipes/opkg-utils/opkg-utils/arfile_header_split.patch

recipes/opkg-utils/opkg-utils/arfile_header_split.patch new file +17 -0
new file mode 100644
index 0000000..4640367
@@ -0,0 +1,17 @@
+--- 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
+             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]
recipes/opkg-utils/opkg-utils_svn.bb +0 -0
index 6b8d3ea..a8f2cb7 100644
@@ -6,10 +6,11 @@ RDEPENDS_${PN} = "python"
  RDEPENDS_${PN}_virtclass-native = ""
  SRCREV = "4747"

recipes/opkg-utils/opkg-utils_svn.bb RDEPENDS_${PN} = "python" · line 16

Quoted 10 lines
recipes/opkg-utils/opkg-utils_svn.bb +2 -1
  PV = "0.1.8+svnr${SRCPV}"
-PR = "r6"
+PR = "r7"
 
  SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=opkg-utils;proto=http \
             file://index-ignore-filenotfound.patch \
+           file://arfile_header_split.patch \
             file://mtime-int.patch"
 
  S = "${WORKDIR}/opkg-utils"

--
Scanned by MailScanner.

#2 lore raw
Quoted 5 lines · Bernhard Guillon

Hi all,

please give me an ACK or NACK.

If no one complains I will push this patch this thursday :)

Ok, pushed...

Best regards
Bernhard