From b8c68ffd294ba82ae973a0af5e9166b846601b6c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 29 May 2007 11:02:39 +0000 Subject: ipkg-utils: Support reading both "control" and "./control" from tar archives. * Fixes #2381. --- packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb | 2 +- packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch | 7 +++++-- packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb b/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb index f6d051b9be..c57c14333a 100644 --- a/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb +++ b/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb @@ -1,7 +1,7 @@ require ipkg-utils_${PV}.bb RDEPENDS = "" -PR = "r12" +PR = "r13" inherit native diff --git a/packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch b/packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch index 94c57f63f2..25eb2cce6f 100644 --- a/packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch +++ b/packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch @@ -158,7 +158,7 @@ Index: ipkg-utils/ipkg.py class Version: """A class for holding parsed package version information.""" -@@ -131,78 +133,58 @@ class Package: +@@ -131,78 +133,61 @@ class Package: self.section = None self.filename_header = None self.file_list = [] @@ -232,7 +232,10 @@ Index: ipkg-utils/ipkg.py + tarStream = ar.open("control.tar.gz") + tarf = tarfile.open("control.tar.gz", "r", tarStream) + -+ control = tarf.extractfile("control") ++ try: ++ control = tarf.extractfile("control") ++ except KeyError: ++ control = tarf.extractfile("./control") + self.read_control(control) control.close() - if self.isdeb: diff --git a/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb b/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb index 6ffe6fe679..e8f52b65a4 100644 --- a/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb +++ b/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb @@ -5,7 +5,7 @@ LICENSE = "GPL" CONFLICTS = "ipkg-link" RDEPENDS = "python" SRCDATE = "20050404" -PR = "r14" +PR = "r15" SRC_URI = "${HANDHELDS_CVS};module=ipkg-utils \ file://ipkg-utils-fix.patch;patch=1 \ -- cgit v1.2.3