ipkg-utils: Add ipkg-list-fields python script needed for sdk generation
authorRichard Purdie <richard@openedhand.com>
Wed, 13 Jun 2007 23:33:43 +0000 (23:33 +0000)
committerRichard Purdie <richard@openedhand.com>
Wed, 13 Jun 2007 23:33:43 +0000 (23:33 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1931 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
meta/packages/ipkg-utils/ipkg-utils/fields_tweaks.patch [new file with mode: 0644]
meta/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb

diff --git a/meta/packages/ipkg-utils/ipkg-utils/fields_tweaks.patch b/meta/packages/ipkg-utils/ipkg-utils/fields_tweaks.patch
new file mode 100644 (file)
index 0000000..2b08e47
--- /dev/null
@@ -0,0 +1,70 @@
+---
+ Makefile         |    2 ++
+ ipkg-list-fields |   13 +++++++++++++
+ ipkg.py          |    8 +++++++-
+ 3 files changed, 22 insertions(+), 1 deletion(-)
+
+Index: ipkg-utils/Makefile
+===================================================================
+--- ipkg-utils.orig/Makefile   2007-06-13 22:45:47.000000000 +0100
++++ ipkg-utils/Makefile        2007-06-13 22:46:50.000000000 +0100
+@@ -15,6 +15,8 @@ install: ${UTILS}
+       python setup.py install
+       chmod agu+rx ipkg-make-index
+       cp -f ipkg-make-index $(PREFIX)/bin
++      chmod agu+rx ipkg-list-fields
++      cp -f ipkg-list-fields $(PREFIX)/bin
+ binary: build
+       mkdir -p ipkg-build-binary/usr/bin
+Index: ipkg-utils/ipkg-list-fields
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ ipkg-utils/ipkg-list-fields        2007-06-13 22:43:32.000000000 +0100
+@@ -0,0 +1,13 @@
++#!/usr/bin/python
++
++import sys, ipkg
++
++def usage():
++     sys.stderr.write("%s ipk\n" % (sys.argv[0],))
++     sys.exit(-1)
++
++if (len(sys.argv) < 2):
++     usage()
++
++print ipkg.Package(sys.argv[1])
++
+Index: ipkg-utils/ipkg.py
+===================================================================
+--- ipkg-utils.orig/ipkg.py    2007-06-13 22:44:50.000000000 +0100
++++ ipkg-utils/ipkg.py 2007-06-13 22:39:44.000000000 +0100
+@@ -139,6 +139,9 @@ class Package:
+         self.installed_size = None
+         self.filename = None
+         self.isdeb = 0
++        self.homepage = None
++        self.oe = None
++        self.priority = None
+         self.fn = fn
+       if fn:
+@@ -211,7 +214,7 @@ class Package:
+                 elif self.__dict__.has_key(name):
+                     self.__dict__[name] = value
+               else:
+-                  #print "Lost field %s, %s" % (name,value)
++                  print "Lost field %s, %s" % (name,value)
+                     pass
+                 if line and line[0] == '\n':
+@@ -402,6 +405,9 @@ class Package:
+         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)
++        if self.oe: out = out + "OE: %s\n" % (self.oe)
++        if self.homepage: out = out + "HomePage: %s\n" % (self.homepage)
++        if self.priority: out = out + "Priority: %s\n" % (self.priority)
+       out = out + "\n"
+       return out
index e8f52b6..cdf5efd 100644 (file)
@@ -5,17 +5,18 @@ LICENSE = "GPL"
 CONFLICTS = "ipkg-link"
 RDEPENDS = "python"
 SRCDATE = "20050404"
-PR = "r15"
+PR = "r16"
 
 SRC_URI = "${HANDHELDS_CVS};module=ipkg-utils \
            file://ipkg-utils-fix.patch;patch=1 \
            file://ipkg-py-sane-vercompare.patch;patch=1 \
            file://ipkg-py-tarfile.patch;patch=1 \
-           file://ipkg-make-index-track-stamps.patch;patch=1"
+           file://ipkg-make-index-track-stamps.patch;patch=1 \
+           file://fields_tweaks.patch;patch=1 "
 
 S = "${WORKDIR}/ipkg-utils"
 
-INSTALL = "ipkg-build ipkg-deb-unbuild ipkg-unbuild ipkg-compare-versions ipkg-upload ipkg-make-index ipkg-link ipkg.py"
+INSTALL = "ipkg-build ipkg-deb-unbuild ipkg-unbuild ipkg-compare-versions ipkg-upload ipkg-make-index ipkg-link ipkg.py ipkg-list-fields"
 
 do_compile() {
        oe_runmake ipkg-compare-versions