summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2018-10-09 11:43:00 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-10-09 11:46:10 +0200
commit35f0ce952563221b5774efe4873d8c2a9c6f967c (patch)
tree624fd2bd6b880111bf707be68428b77b4c2ce961
parentcb801c7c1ea5211eaaaeed38223104c5d401fe4c (diff)
downloadptxdist-35f0ce952563221b5774efe4873d8c2a9c6f967c.tar.gz
ptxdist-35f0ce952563221b5774efe4873d8c2a9c6f967c.tar.xz
opkg-utils: propagate Installed-Size properly
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/opkg-utils-0.3.6/0002-Fill-out-Installed-Size.patch39
-rw-r--r--patches/opkg-utils-0.3.6/0100-opkg-build-use-CROSS_COMPILE-ar.patch (renamed from patches/opkg-utils-0.3.6/0001-opkg-build-use-CROSS_COMPILE-ar.patch)0
-rw-r--r--patches/opkg-utils-0.3.6/0101-Update-Installed-Size-properly.patch34
-rw-r--r--patches/opkg-utils-0.3.6/0102-opkg-build-in-ptxdist-the-maxium-UID-for-system-user.patch (renamed from patches/opkg-utils-0.3.6/0003-opkg-build-in-ptxdist-the-maxium-UID-for-system-user.patch)0
-rw-r--r--patches/opkg-utils-0.3.6/series10
5 files changed, 39 insertions, 44 deletions
diff --git a/patches/opkg-utils-0.3.6/0002-Fill-out-Installed-Size.patch b/patches/opkg-utils-0.3.6/0002-Fill-out-Installed-Size.patch
deleted file mode 100644
index 34fa96b80..000000000
--- a/patches/opkg-utils-0.3.6/0002-Fill-out-Installed-Size.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From: George McCollister <george.mccollister@gmail.com>
-Date: Fri, 23 Mar 2012 13:13:41 -0500
-Subject: [PATCH] Fill out Installed-Size
-
-Fill out Installed-Size so opkg can check to make sure there is enough
-space to install the package before attempting to do so.
-
-Signed-off-by: George McCollister <george.mccollister@gmail.com>
----
- opkg.py | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/opkg.py b/opkg.py
-index 153b62c7e7fa..0ee9853b2ba6 100644
---- a/opkg.py
-+++ b/opkg.py
-@@ -169,9 +169,13 @@ class Package(object):
- if tarfile.is_tarfile(fn):
- tar = tarfile.open(fn, "r", f)
- tarStream = tar.extractfile("./control.tar.gz")
-+ dataTarStream = tar.extractfile("./data.tar.gz")
- else:
- ar = arfile.ArFile(f, fn)
- tarStream = ar.open("control.tar.gz")
-+ dataTarStream = ar.open("data.tar.gz")
-+ tarf = tarfile.open("data.tar.gz", "r", dataTarStream)
-+ self.installed_size = sum([f.size for f in tarf.getmembers()])
- tarf = tarfile.open("control.tar.gz", "r", tarStream)
- try:
- control = tarf.extractfile("control")
-@@ -482,7 +486,7 @@ class Package(object):
- if self.maintainer: out = out + "Maintainer: %s\n" % (self.maintainer)
- if self.md5: out = out + "MD5Sum: %s\n" % (self.md5)
- if self.size: out = out + "Size: %d\n" % int(self.size)
-- if self.installed_size: out = out + "InstalledSize: %d\n" % int(self.installed_size)
-+ if self.installed_size: out = out + "Installed-Size: %d\n" % int(self.installed_size)
- if self.filename: out = out + "Filename: %s\n" % (self.filename)
- if self.source: out = out + "Source: %s\n" % (self.source)
- if self.description: out = out + "Description: %s\n" % (self.description)
diff --git a/patches/opkg-utils-0.3.6/0001-opkg-build-use-CROSS_COMPILE-ar.patch b/patches/opkg-utils-0.3.6/0100-opkg-build-use-CROSS_COMPILE-ar.patch
index 9efe07581..9efe07581 100644
--- a/patches/opkg-utils-0.3.6/0001-opkg-build-use-CROSS_COMPILE-ar.patch
+++ b/patches/opkg-utils-0.3.6/0100-opkg-build-use-CROSS_COMPILE-ar.patch
diff --git a/patches/opkg-utils-0.3.6/0101-Update-Installed-Size-properly.patch b/patches/opkg-utils-0.3.6/0101-Update-Installed-Size-properly.patch
new file mode 100644
index 000000000..f5ecd3967
--- /dev/null
+++ b/patches/opkg-utils-0.3.6/0101-Update-Installed-Size-properly.patch
@@ -0,0 +1,34 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 9 Oct 2018 11:19:37 +0200
+Subject: [PATCH] Update Installed-Size properly
+
+Convert '-' to '_' to match the variable name 'installed_size' and use the
+correct property name 'Installed-Size'.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ opkg.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/opkg.py b/opkg.py
+index 153b62c7e7fa..f5cb9b86a773 100644
+--- a/opkg.py
++++ b/opkg.py
+@@ -230,7 +230,7 @@ class Package(object):
+ lineparts = re.match(r'([\w-]*?):\s*(.*)', line)
+ if lineparts:
+ name = lineparts.group(1)
+- name_lowercase = name.lower()
++ name_lowercase = name.lower().replace('-',"_")
+ value = lineparts.group(2)
+ while 1:
+ line = control.readline().rstrip()
+@@ -482,7 +482,7 @@ class Package(object):
+ if self.maintainer: out = out + "Maintainer: %s\n" % (self.maintainer)
+ if self.md5: out = out + "MD5Sum: %s\n" % (self.md5)
+ if self.size: out = out + "Size: %d\n" % int(self.size)
+- if self.installed_size: out = out + "InstalledSize: %d\n" % int(self.installed_size)
++ if self.installed_size: out = out + "Installed-Size: %d\n" % int(self.installed_size)
+ if self.filename: out = out + "Filename: %s\n" % (self.filename)
+ if self.source: out = out + "Source: %s\n" % (self.source)
+ if self.description: out = out + "Description: %s\n" % (self.description)
diff --git a/patches/opkg-utils-0.3.6/0003-opkg-build-in-ptxdist-the-maxium-UID-for-system-user.patch b/patches/opkg-utils-0.3.6/0102-opkg-build-in-ptxdist-the-maxium-UID-for-system-user.patch
index 09f9a4880..09f9a4880 100644
--- a/patches/opkg-utils-0.3.6/0003-opkg-build-in-ptxdist-the-maxium-UID-for-system-user.patch
+++ b/patches/opkg-utils-0.3.6/0102-opkg-build-in-ptxdist-the-maxium-UID-for-system-user.patch
diff --git a/patches/opkg-utils-0.3.6/series b/patches/opkg-utils-0.3.6/series
index 4e7d32fae..d5eb3538a 100644
--- a/patches/opkg-utils-0.3.6/series
+++ b/patches/opkg-utils-0.3.6/series
@@ -4,8 +4,8 @@
0001-opkg-build-improve-ipk-package-reproducibility.patch
0002-Only-use-sort-name-on-versions-of-tar-which-support-.patch
0003-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
-#tag:ptx --start-number 1
-0001-opkg-build-use-CROSS_COMPILE-ar.patch
-0002-Fill-out-Installed-Size.patch
-0003-opkg-build-in-ptxdist-the-maxium-UID-for-system-user.patch
-# b7f8b3116c68b3731292e7065c4ce1f6 - git-ptx-patches magic
+#tag:ptx --start-number 100
+0100-opkg-build-use-CROSS_COMPILE-ar.patch
+0101-Update-Installed-Size-properly.patch
+0102-opkg-build-in-ptxdist-the-maxium-UID-for-system-user.patch
+# e0f4c3592faf999298db116925fe26a3 - git-ptx-patches magic