blob: 364e2f052d65e254aa680c8215b4b5fd1433a538 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Date: Thu, 29 Mar 2012 10:44:16 +0200
Subject: [PATCH] opkg-make-index: convert mtime to int before comparing it
* The st_mtime attribute (which is a float) is compared against a value
from the timestamp database, which was stored as an integer there.
* When working on a filesystem with precise timestamps the comparision
will fail nearly everytime hence.
* Although it might be possible to enhance the database to store the
fractional part too, this will complicate things more than we would
gain by this change.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
opkg-make-index | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opkg-make-index b/opkg-make-index
index 2f1ae17..dc98c63 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -101,7 +101,7 @@ for filename in files:
pkg = None
fnameStat = os.stat(filename)
if old_pkg_hash.has_key(basename):
- if pkgsStamps.has_key(basename) and fnameStat.st_mtime == pkgsStamps[basename]:
+ if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == pkgsStamps[basename]:
if (verbose):
sys.stderr.write("Found %s in Packages\n" % (filename,))
pkg = old_pkg_hash[basename]
|