opkg-utils: ignore packages disapperaring filelist generation
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.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>
--- .../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
@@ -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
@@ -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
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
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>--- .../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.patchdiff --git
a/meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patchb/meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patchnew file mode 100644
index 0000000..dc85cb6meta/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 packagefile
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+':'+fnmeta/recipes-devtools/opkg-utils/opkg-utils_svn.bb +2
-1@@ -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