diff options
Diffstat (limited to 'meta/recipes-devtools/opkg-utils/opkg-utils')
-rw-r--r-- | meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch new file mode 100644 index 0000000000..fdbce21e4e --- /dev/null +++ b/meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | Convert mtime to int before comparing it | ||
2 | |||
3 | The st_mtime attribute (which is a float) is compared against a value | ||
4 | from the timestamp database, which was stored as an integer there. | ||
5 | |||
6 | When working on a filesystem with precise timestamps the comparision | ||
7 | will fail nearly everytime hence. | ||
8 | |||
9 | Although it might be possible to enhance the database to store the | ||
10 | fractional part too, this will complicate things more than we would | ||
11 | gain by this change. | ||
12 | |||
13 | Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | |||
17 | Index: opkg-utils/opkg-make-index | ||
18 | =================================================================== | ||
19 | --- opkg-utils.orig/opkg-make-index | ||
20 | +++ opkg-utils/opkg-make-index | ||
21 | @@ -100,7 +100,7 @@ for filename in files: | ||
22 | pkg = None | ||
23 | fnameStat = os.stat(filename) | ||
24 | if old_pkg_hash.has_key(basename): | ||
25 | - if pkgsStamps.has_key(basename) and fnameStat.st_mtime == pkgsStamps[basename]: | ||
26 | + if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == pkgsStamps[basename]: | ||
27 | if (verbose): | ||
28 | sys.stderr.write("Found %s in Packages\n" % (filename,)) | ||
29 | pkg = old_pkg_hash[basename] | ||