| Submitter | lumag |
|---|---|
| Date | Aug. 25, 2011, 1:52 p.m. |
| Message ID | <1314280367-22179-1-git-send-email-dbaryshkov@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/10535/ |
| State | New, archived |
| Headers | show |
Comments
On 8/25/11, Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> wrote: > 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. > > Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> > --- > .../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 > --- /dev/null > +++ b/meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patch > @@ -0,0 +1,31 @@ > +From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> > +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 <dbaryshkov@gmail.com> > + > +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 > diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb > b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb > index fd2b5e6..7659465 100644 > --- a/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb > +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb > @@ -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 > >
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 --- /dev/null +++ b/meta/recipes-devtools/opkg-utils/no-ioerror-during-filelist.patch @@ -0,0 +1,31 @@ +From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> +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 <dbaryshkov@gmail.com> + +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 diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb index fd2b5e6..7659465 100644 --- a/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb @@ -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"
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 <dbaryshkov@gmail.com> --- .../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