* patch for ipkg-utils
@ 2009-03-14 1:05 Philip Black
0 siblings, 0 replies; only message in thread
From: Philip Black @ 2009-03-14 1:05 UTC (permalink / raw)
To: openembedded-devel
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]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-14 1:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-14 1:05 patch for ipkg-utils Philip Black
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.