opkg-utils: Print out License field

(From OE-Core rev: 31d69f6e8c0a4b0a96568799ff398a31e15a158c)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2011-07-13 23:31:20 -07:00 committed by Richard Purdie
parent 653f19543d
commit 4678e7ac30
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,39 @@
Add knowledge about License field in ipk headers
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: opkg-utils/opkg.py
===================================================================
--- opkg-utils.orig/opkg.py 2010-11-01 04:52:35.000000000 -0700
+++ opkg-utils/opkg.py 2011-07-13 15:18:03.900037344 -0700
@@ -145,6 +145,7 @@
self.priority = None
self.tags = None
self.fn = fn
+ self.license = None
if fn:
# see if it is deb format
@@ -319,6 +320,12 @@
def get_section(self, section):
return self.section
+ def set_license(self, license):
+ self.license = license
+
+ def get_license(self, license):
+ return self.license
+
def get_file_list(self):
if not self.fn:
return []
@@ -425,6 +432,7 @@
if self.description: out = out + "Description: %s\n" % (self.description)
if self.oe: out = out + "OE: %s\n" % (self.oe)
if self.homepage: out = out + "HomePage: %s\n" % (self.homepage)
+ if self.license: out = out + "License: %s\n" % (self.license)
if self.priority: out = out + "Priority: %s\n" % (self.priority)
if self.tags: out = out + "Tags: %s\n" % (self.tags)
out = out + "\n"

View File

@ -8,11 +8,12 @@ RDEPENDS_${PN} = "python"
RDEPENDS_${PN}_virtclass-native = ""
SRCREV = "4747"
PV = "0.1.8+svnr${SRCPV}"
PR = "r3"
PR = "r4"
SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=opkg-utils;proto=http \
file://index-ignore-filenotfound.patch \
file://mtime-int.patch \
file://add-license-field.patch \
"
S = "${WORKDIR}/opkg-utils"