Skip to contentSkip to conversation

opkg-utils: ignore packages disapperaring filelist generation

PATCH Superseded Dmitry Eremin-Solenikov 1 participant 2 messages Aug 25, 2011 – Aug 26, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opkg-utils: ignore packages disapperaring filelist generation

Package files disappearing during index generation don't cause a fatal error. Make package file disappearing during filelist generation also a non-fatal error.

---
 .../opkg-utils/no-ioerror-during-filelist.patch    |   31 ++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    3 +-
 2 files changed, 33 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patch
meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patch new file +31 -0
new file mode 100644
index 0000000..dc85cb6
@@ -0,0 +1,31 @@
+From: Dmitry Eremin-Solenikov <[email protected]>
+Subject: Ignore IOError errors while populating filelist
+Upstream-Status: Pending/Not-Applicable
+
+While populating Packages.filelist there is a possibility that the package file
+will disappear while reading. So ignore errors during filelist generation.
+
+
+Signed-off-by: Dmitry Eremin-Solenikov <[email protected]>
+
+Index: opkg-utils/opkg-make-index
+===================================================================
+--- opkg-utils.orig/opkg-make-index	2011-08-25 16:45:41.000000000 +0400
++++ opkg-utils/opkg-make-index	2011-08-25 17:38:57.000000000 +0400
+@@ -197,7 +197,15 @@
+ 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(e)
++          continue
++     except IOError, e:
++          sys.stderr.write(e)
++          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
meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb +2 -1
index fd2b5e6..7659465 100644
@@ -8,12 +8,13 @@ RDEPENDS_${PN} = "python"
 RDEPENDS_${PN}_virtclass-native = ""
 SRCREV = "4747"
 PV = "0.1.8+svnr${SRCPV}"
-PR = "r4"
+PR = "r5"
 
 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 \
+           file://no-ioerror-during-filelist.patch \
            "
 
 S = "${WORKDIR}/opkg-utils"
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 3 lines · Dmitry Eremin-Solenikov

Package files disappearing during index generation don't cause a fatal error. Make package file disappearing during filelist generation also a non-fatal error.

Please ignore this, I'll send a V2 soon.

Quoted 75 lines
---
 .../opkg-utils/no-ioerror-during-filelist.patch    |   31
++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    3 +-
 2 files changed, 33 insertions(+), 1 deletions(-)
 create mode 100644

meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patch

diff --git a/meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patch b/meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patch new file mode 100644
index 0000000..dc85cb6

meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patch new file +5 -0
@@ -0,0 +1,31 @@
+From: Dmitry Eremin-Solenikov <[email protected]>
+Subject: Ignore IOError errors while populating filelist
+Upstream-Status: Pending/Not-Applicable
+
+While populating Packages.filelist there is a possibility that the package

file

meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patch new file +26 -0
+will disappear while reading. So ignore errors during filelist generation.
+
+
+Signed-off-by: Dmitry Eremin-Solenikov <[email protected]>
+
+Index: opkg-utils/opkg-make-index
+===================================================================
+--- opkg-utils.orig/opkg-make-index	2011-08-25 16:45:41.000000000 +0400
++++ opkg-utils/opkg-make-index	2011-08-25 17:38:57.000000000 +0400
+@@ -197,7 +197,15 @@
+ 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(e)
++          continue
++     except IOError, e:
++          sys.stderr.write(e)
++          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
meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb +2 -1
index fd2b5e6..7659465 100644
@@ -8,12 +8,13 @@ RDEPENDS_${PN} = "python"
 RDEPENDS_${PN}_virtclass-native = ""
 SRCREV = "4747"
 PV = "0.1.8+svnr${SRCPV}"
-PR = "r4"
+PR = "r5"
 
 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 \
+           file://no-ioerror-during-filelist.patch \
            "
 

S = "${WORKDIR}/opkg-utils"
--
1.7.2.5

Signature · 2 lines
With best wishes
Dmitry