Patchwork [2/2] opkg-utils: Print out License field

login
register
mail settings
Submitter Khem Raj
Date July 14, 2011, 6:31 a.m.
Message ID <1310625080-30964-2-git-send-email-raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/7589/
State New, archived
Headers show

Comments

Khem Raj - July 14, 2011, 6:31 a.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../opkg-utils/opkg-utils/add-license-field.patch  |   39 ++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    3 +-
 2 files changed, 41 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/add-license-field.patch
Richard Purdie - July 14, 2011, 1:55 p.m.
On Wed, 2011-07-13 at 23:31 -0700, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  .../opkg-utils/opkg-utils/add-license-field.patch  |   39 ++++++++++++++++++++
>  meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    3 +-
>  2 files changed, 41 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/add-license-field.patch

Merged to master (along with patch 1/2), thanks.

Richard

Patch

diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/add-license-field.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/add-license-field.patch
new file mode 100644
index 0000000..0d33459
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/add-license-field.patch
@@ -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"
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb
index 897fe11..fd2b5e6 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb
@@ -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"