diff options
Diffstat (limited to 'meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch')
-rw-r--r-- | meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch new file mode 100644 index 0000000000..e4a548156f --- /dev/null +++ b/meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | If we're building an image and some package rebuilds while this is happening | ||
2 | some package can be removed/added to the ipk deploy directory. The image will | ||
3 | not depend on this package so we can safely ignore these cases rather than | ||
4 | error out. | ||
5 | |||
6 | RP - 26/8/09 | ||
7 | |||
8 | Index: opkg-utils/opkg-make-index | ||
9 | =================================================================== | ||
10 | --- opkg-utils.orig/opkg-make-index 2009-08-26 17:21:26.000000000 +0100 | ||
11 | +++ opkg-utils/opkg-make-index 2009-08-27 16:11:22.000000000 +0100 | ||
12 | @@ -96,6 +96,7 @@ | ||
13 | files=glob(pkg_dir + '/*.ipk') + glob(pkg_dir + '/*.deb') | ||
14 | files.sort() | ||
15 | for filename in files: | ||
16 | + try: | ||
17 | basename = os.path.basename(filename) | ||
18 | pkg = None | ||
19 | fnameStat = os.stat(filename) | ||
20 | @@ -130,6 +131,12 @@ | ||
21 | to_morgue(basename) | ||
22 | if opt_s: | ||
23 | print filename | ||
24 | + except OSError: | ||
25 | + sys.stderr.write("Package %s disappeared on us!\n" % (filename)) | ||
26 | + continue | ||
27 | + except IOError: | ||
28 | + sys.stderr.write("Package %s disappeared on us!\n" % (filename)) | ||
29 | + continue | ||
30 | |||
31 | pkgsStampsFile = open(stamplist_filename, "w") | ||
32 | for f in pkgsStamps.keys(): | ||
33 | @@ -148,6 +155,7 @@ | ||
34 | names = packages.packages.keys() | ||
35 | names.sort() | ||
36 | for name in names: | ||
37 | + try: | ||
38 | pkg = packages.packages[name] | ||
39 | if locales_dir and pkg.depends: | ||
40 | depends = string.split(pkg.depends, ',') | ||
41 | @@ -165,6 +173,13 @@ | ||
42 | if (verbose): | ||
43 | sys.stderr.write("Writing info for package %s\n" % (pkg.package,)) | ||
44 | print pkg | ||
45 | + except OSError: | ||
46 | + sys.stderr.write("Package %s disappeared on us!\n" % (name)) | ||
47 | + continue | ||
48 | + except IOError: | ||
49 | + sys.stderr.write("Package %s disappeared on us!\n" % (name)) | ||
50 | + continue | ||
51 | + | ||
52 | if packages_filename: | ||
53 | sys.stdout.close() | ||
54 | sys.stdout = old_stdout | ||