mirror of
https://git.yoctoproject.org/git/opkg-utils
synced 2026-05-07 00:47:07 +02:00
opkg.py/__init__: Compatible for ipk which outer is tar
Signed-off-by: Zhu Mumu <zhumumu@gmail.com> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
This commit is contained in:
committed by
Alejandro del Castillo
parent
c75797c01f
commit
9ac94576bb
8
opkg.py
8
opkg.py
@@ -164,8 +164,12 @@ class Package(object):
|
||||
|
||||
## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,))
|
||||
|
||||
ar = arfile.ArFile(f, fn)
|
||||
tarStream = ar.open("control.tar.gz")
|
||||
if tarfile.is_tarfile(fn):
|
||||
tar = tarfile.open(fn, "r", f)
|
||||
tarStream = tar.extractfile("./control.tar.gz")
|
||||
else:
|
||||
ar = ArFile(f, fn)
|
||||
tarStream = ar.open("control.tar.gz")
|
||||
tarf = tarfile.open("control.tar.gz", "r", tarStream)
|
||||
try:
|
||||
control = tarf.extractfile("control")
|
||||
|
||||
Reference in New Issue
Block a user