[oe-commits] Enrico Scholz : ipkg-utils: convert mtime to int before comparing it

git version control git at git.openembedded.org
Thu Jul 15 09:49:00 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 49e11b32906fc1becd9218bb3125f6fc8fa03fa4
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=49e11b32906fc1becd9218bb3125f6fc8fa03fa4

Author: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
Date:   Tue Jun 15 14:43:54 2010 +0200

ipkg-utils: 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 at sigma-chemnitz.de>

---

 .../ipkg-utils-native_1.6+cvs20050404.bb           |    2 +-
 .../ipkg-utils/ipkg-make-index-track-stamps.patch  |    2 +-
 recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/recipes/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb b/recipes/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
index 19eb6f8..3a6aaed 100644
--- a/recipes/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
+++ b/recipes/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
@@ -1,7 +1,7 @@
 require ipkg-utils_${PV}.bb
 
 RDEPENDS_${PN} = ""
-PR = "r24"
+PR = "r25"
 
 inherit native
 
diff --git a/recipes/ipkg-utils/ipkg-utils/ipkg-make-index-track-stamps.patch b/recipes/ipkg-utils/ipkg-utils/ipkg-make-index-track-stamps.patch
index ad6df4f..68758ed 100644
--- a/recipes/ipkg-utils/ipkg-utils/ipkg-make-index-track-stamps.patch
+++ b/recipes/ipkg-utils/ipkg-utils/ipkg-make-index-track-stamps.patch
@@ -53,7 +53,7 @@ Index: ipkg-utils/ipkg-make-index
 +     fnameStat = os.stat(filename)
       if old_pkg_hash.has_key(basename):
 -          if (verbose):
-+          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]
diff --git a/recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb b/recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
index 440c3e0..42653fd 100644
--- a/recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
+++ b/recipes/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
@@ -5,7 +5,7 @@ LICENSE = "GPL"
 CONFLICTS = "ipkg-link"
 RDEPENDS_${PN} = "python"
 SRCDATE = "20050930"
-PR = "r26"
+PR = "r27"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 





More information about the Openembedded-commits mailing list