From: Michael Olbrich 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 --- 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)