[oe] patch for ipkg-utils
Philip Black
phil.black at hillcrestlabs.com
Sat Mar 14 01:05:57 UTC 2009
I found a bug with how the arfile.py works when parsing ar files.
Basically, the code assumed whitespace delimited when it should have
been fixed sized fields.
diff -wubr ipkg-utils.old/arfile.py ipkg-utils/arfile.py
--- ipkg-utils.old/arfile.py 2009-03-13 12:45:25.937148714 -0400
+++ ipkg-utils/arfile.py 2009-03-13 12:44:59.680250619 -0400
@@ -74,7 +74,14 @@
if l == "\n":
l = self.f.readline()
if not l: break
- descriptor = l.split()
+ descriptor = [ l[0:15].strip() # filename
+ , l[16:27].strip() # timestamp
+ , l[28:33].strip() # owner ID
+ , l[34:39].strip() # gid
+ , l[40:47].strip() # mode
+ , l[48:57].strip() # size in bytes
+ , l[58:59].strip() # file magic
+ ]
# print descriptor
size = int(descriptor[5])
memberName = descriptor[0][:-1]
More information about the Openembedded-devel
mailing list