All of lore.kernel.org
 help / color / mirror / Atom feed
* [opkg-utils][PATCH 0/5] Import patches from oe-core
@ 2012-03-29  9:13 Martin Jansa
  2012-03-29  9:13 ` [opkg-utils][PATCH 1/5] opkg-make-index: don't error out when some package disappears Martin Jansa
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Martin Jansa @ 2012-03-29  9:13 UTC (permalink / raw)
  To: yocto; +Cc: Enrico Scholz

The following changes since commit 002d29bc605d7c2d02e4cf20a43c5277c15f5597:

  [opkg-utils] fix install fail problem  Thanks for khorben's patch :-)  https://docs.openmoko.org/trac/attachment/ticket/2072/patch-opkg-utils_Makefile_install_path.diff (2008-11-03 03:59:59 +0000)

are available in the git repository at:
  git://github.com/shr-project/opkg-utils jansa/pull
  https://github.com/shr-project/opkg-utils/tree/jansa/pull

Christopher Larson (1):
  Use python via the PATH, rather than hardcoding /usr/bin/python

Enrico Scholz (1):
  opkg-make-index: convert mtime to int before comparing it

Khem Raj (1):
  opkg.py: Add knowledge about License field in ipk headers

Richard Purdie (1):
  opkg-make-index: don't error out when some package disappears

Scott Anderson (1):
  arfile.py: handle six digit UIDs

 arfile.py         |    7 ++++++-
 opkg-list-fields  |    2 +-
 opkg-make-index   |   29 ++++++++++++++++++++++++++---
 opkg-show-deps    |    2 +-
 opkg-unbuild      |    2 +-
 opkg-update-index |    2 +-
 opkg.py           |    8 ++++++++
 7 files changed, 44 insertions(+), 8 deletions(-)

-- 
1.7.8.5



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [opkg-utils][PATCH 1/5] opkg-make-index: don't error out when some package disappears
  2012-03-29  9:13 [opkg-utils][PATCH 0/5] Import patches from oe-core Martin Jansa
@ 2012-03-29  9:13 ` Martin Jansa
  2012-03-29  9:13 ` [opkg-utils][PATCH 2/5] opkg-make-index: convert mtime to int before comparing it Martin Jansa
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2012-03-29  9:13 UTC (permalink / raw)
  To: yocto

From: Richard Purdie <richard.purdie@linuxfoundation.org>

* If we're building an image and some package rebuilds while this is
  happening some package can be removed/added to the ipk deploy
  directory. The image will not depend on this package so we can
  safely ignore these cases rather than error out.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 opkg-make-index |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index
index ae829e6..2f1ae17 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -96,6 +96,7 @@ if (verbose):
 files=glob(pkg_dir + '/*.opk') + glob(pkg_dir + '/*.deb') + glob(pkg_dir + '/*.ipk')
 files.sort()
 for filename in files:
+  try:
      basename = os.path.basename(filename)
      pkg = None
      fnameStat = os.stat(filename)
@@ -130,6 +131,12 @@ for filename in files:
                to_morgue(basename)
           if opt_s:
                print filename
+  except OSError:
+      sys.stderr.write("Package %s disappeared on us!\n" % (filename))
+      continue
+  except IOError:
+      sys.stderr.write("Package %s disappeared on us!\n" % (filename))
+      continue
 
 pkgsStampsFile = open(stamplist_filename, "w")
 for f in pkgsStamps.keys():
@@ -148,6 +155,7 @@ if packages_filename:
 names = packages.packages.keys()
 names.sort()
 for name in names:
+  try:
      pkg = packages.packages[name]
      if locales_dir and pkg.depends:
          depends = string.split(pkg.depends, ',')
@@ -165,6 +173,13 @@ for name in names:
      if (verbose):
           sys.stderr.write("Writing info for package %s\n" % (pkg.package,))
      print pkg
+  except OSError:
+      sys.stderr.write("Package %s disappeared on us!\n" % (name))
+      continue
+  except IOError:
+      sys.stderr.write("Package %s disappeared on us!\n" % (name))
+      continue
+
 if packages_filename:
      sys.stdout.close()
      sys.stdout = old_stdout
@@ -182,7 +197,15 @@ files = {}
 names = packages.packages.keys()
 names.sort()
 for name in names:
-     for fn in packages[name].get_file_list():
+     try:
+          fnlist = packages[name].get_file_list()
+     except OSError, e:
+          sys.stderr.write("Package %s disappeared on us!\n" % (name))
+          continue
+     except IOError, e:
+          sys.stderr.write("Package %s disappeared on us!\n" % (name))
+          continue
+     for fn in fnlist:
           (h,t) = os.path.split(fn)
           if not t: continue
           if not files.has_key(t): files[t] = name+':'+fn
-- 
1.7.8.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [opkg-utils][PATCH 2/5] opkg-make-index: convert mtime to int before comparing it
  2012-03-29  9:13 [opkg-utils][PATCH 0/5] Import patches from oe-core Martin Jansa
  2012-03-29  9:13 ` [opkg-utils][PATCH 1/5] opkg-make-index: don't error out when some package disappears Martin Jansa
@ 2012-03-29  9:13 ` Martin Jansa
  2012-03-29  9:13 ` [opkg-utils][PATCH 3/5] opkg.py: Add knowledge about License field in ipk headers Martin Jansa
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2012-03-29  9:13 UTC (permalink / raw)
  To: yocto

From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>

* The st_mtime attribute (which is a float) is compared against a value
  from the timestamp database, which was stored as an integer there.

* When working on a filesystem with precise timestamps the comparision
  will fail nearly everytime hence.

* Although it might be possible to enhance the database to store the
  fractional part too, this will complicate things more than we would
  gain by this change.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 opkg-make-index |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index
index 2f1ae17..dc98c63 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -101,7 +101,7 @@ for filename in files:
      pkg = None
      fnameStat = os.stat(filename)
      if old_pkg_hash.has_key(basename):
-          if pkgsStamps.has_key(basename) and fnameStat.st_mtime == pkgsStamps[basename]:
+          if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == pkgsStamps[basename]:
             if (verbose):
                sys.stderr.write("Found %s in Packages\n" % (filename,))
             pkg = old_pkg_hash[basename]
-- 
1.7.8.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [opkg-utils][PATCH 3/5] opkg.py: Add knowledge about License field in ipk headers
  2012-03-29  9:13 [opkg-utils][PATCH 0/5] Import patches from oe-core Martin Jansa
  2012-03-29  9:13 ` [opkg-utils][PATCH 1/5] opkg-make-index: don't error out when some package disappears Martin Jansa
  2012-03-29  9:13 ` [opkg-utils][PATCH 2/5] opkg-make-index: convert mtime to int before comparing it Martin Jansa
@ 2012-03-29  9:13 ` Martin Jansa
  2012-03-29  9:13 ` [opkg-utils][PATCH 4/5] arfile.py: handle six digit UIDs Martin Jansa
  2012-03-29  9:13 ` [opkg-utils][PATCH 5/5] Use python via the PATH, rather than hardcoding /usr/bin/python Martin Jansa
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2012-03-29  9:13 UTC (permalink / raw)
  To: yocto

From: Khem Raj <raj.khem@gmail.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 opkg.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/opkg.py b/opkg.py
index 3fda9b5..8ddc8b8 100644
--- a/opkg.py
+++ b/opkg.py
@@ -145,6 +145,7 @@ class Package:
         self.priority = None
         self.tags = None
         self.fn = fn
+        self.license = None
 
         if fn:
             # see if it is deb format
@@ -319,6 +320,12 @@ class Package:
     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 @@ class Package:
         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"
-- 
1.7.8.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [opkg-utils][PATCH 4/5] arfile.py: handle six digit UIDs
  2012-03-29  9:13 [opkg-utils][PATCH 0/5] Import patches from oe-core Martin Jansa
                   ` (2 preceding siblings ...)
  2012-03-29  9:13 ` [opkg-utils][PATCH 3/5] opkg.py: Add knowledge about License field in ipk headers Martin Jansa
@ 2012-03-29  9:13 ` Martin Jansa
  2012-03-29  9:13 ` [opkg-utils][PATCH 5/5] Use python via the PATH, rather than hardcoding /usr/bin/python Martin Jansa
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2012-03-29  9:13 UTC (permalink / raw)
  To: yocto

From: Scott Anderson <o2e@saaworld.com>

* Essentially, the problem is that arfile.py is splitting the ar header with
  white-space instead of fixed-width fields, so two fields would get treated
  as a single field.  This makes things better than before as it now honors
  the fixed field widths.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 arfile.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arfile.py b/arfile.py
index 22548af..8291a2d 100644
--- a/arfile.py
+++ b/arfile.py
@@ -75,7 +75,12 @@ class ArFile:
                 l = self.f.readline()
                 if not l: break
             l = l.replace('`', '')
-            descriptor = l.split()
+            # Field lengths from /usr/include/ar.h:
+            ar_field_lens = [ 16, 12, 6, 6, 8, 10, 2 ]
+            descriptor = []
+            for field_len in ar_field_lens:
+                descriptor.append(l[:field_len].strip())
+                l = l[field_len:]
 #            print descriptor
             size = int(descriptor[5])
             memberName = descriptor[0][:-1]
-- 
1.7.8.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [opkg-utils][PATCH 5/5] Use python via the PATH, rather than hardcoding /usr/bin/python
  2012-03-29  9:13 [opkg-utils][PATCH 0/5] Import patches from oe-core Martin Jansa
                   ` (3 preceding siblings ...)
  2012-03-29  9:13 ` [opkg-utils][PATCH 4/5] arfile.py: handle six digit UIDs Martin Jansa
@ 2012-03-29  9:13 ` Martin Jansa
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2012-03-29  9:13 UTC (permalink / raw)
  To: yocto

From: Christopher Larson <kergoth@gmail.com>

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 opkg-list-fields  |    2 +-
 opkg-make-index   |    2 +-
 opkg-show-deps    |    2 +-
 opkg-unbuild      |    2 +-
 opkg-update-index |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/opkg-list-fields b/opkg-list-fields
index d263b90..da78d53 100755
--- a/opkg-list-fields
+++ b/opkg-list-fields
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, opkg
 
diff --git a/opkg-make-index b/opkg-make-index
index dc98c63..b65dc6e 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, posixpath
 from glob import glob
diff --git a/opkg-show-deps b/opkg-show-deps
index a6681f4..9de1aac 100755
--- a/opkg-show-deps
+++ b/opkg-show-deps
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, posixpath
 from glob import glob
diff --git a/opkg-unbuild b/opkg-unbuild
index eff604b..b5c5227 100755
--- a/opkg-unbuild
+++ b/opkg-unbuild
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, re
 
diff --git a/opkg-update-index b/opkg-update-index
index 807f8f4..3864fa5 100755
--- a/opkg-update-index
+++ b/opkg-update-index
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.1
+#!/usr/bin/env python
 
 import sys, os
 from glob import glob
-- 
1.7.8.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-29  9:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-29  9:13 [opkg-utils][PATCH 0/5] Import patches from oe-core Martin Jansa
2012-03-29  9:13 ` [opkg-utils][PATCH 1/5] opkg-make-index: don't error out when some package disappears Martin Jansa
2012-03-29  9:13 ` [opkg-utils][PATCH 2/5] opkg-make-index: convert mtime to int before comparing it Martin Jansa
2012-03-29  9:13 ` [opkg-utils][PATCH 3/5] opkg.py: Add knowledge about License field in ipk headers Martin Jansa
2012-03-29  9:13 ` [opkg-utils][PATCH 4/5] arfile.py: handle six digit UIDs Martin Jansa
2012-03-29  9:13 ` [opkg-utils][PATCH 5/5] Use python via the PATH, rather than hardcoding /usr/bin/python Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.