summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-03 17:18:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-06 23:52:58 +0000
commitcc01ffeee757738c169f8970fd89bf0933e93532 (patch)
treede4364bc2cab52fa8cb9bfcbef6d121fd456aa39
parente89cd308792f613e5b4765dc0f7f21569aaaab6f (diff)
downloadopenembedded-core-cc01ffeee757738c169f8970fd89bf0933e93532.tar.gz
openembedded-core-cc01ffeee757738c169f8970fd89bf0933e93532.tar.bz2
openembedded-core-cc01ffeee757738c169f8970fd89bf0933e93532.zip
createrepo: Fix stat floating timestamps
When reading the mtime from disk, the system can get a floating point value. Convert this to an int for comparision purposes, else some packages always get reindexed as the value in the index is an int. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/createrepo/createrepo/fixstat.patch19
-rw-r--r--meta/recipes-support/createrepo/createrepo_0.4.11.bb1
2 files changed, 20 insertions, 0 deletions
diff --git a/meta/recipes-support/createrepo/createrepo/fixstat.patch b/meta/recipes-support/createrepo/createrepo/fixstat.patch
new file mode 100644
index 0000000000..d34eb56a8e
--- /dev/null
+++ b/meta/recipes-support/createrepo/createrepo/fixstat.patch
@@ -0,0 +1,19 @@
+When reading the mtime from disk, the system can get a floating point
+value. Convert this to an int for comparision purposes, else some
+packages always get reindexed as the value in the index is an int.
+RP 2016/3/2
+Upstream-Status: Pending
+
+Index: createrepo-0.4.11/readMetadata.py
+===================================================================
+--- createrepo-0.4.11.orig/readMetadata.py
++++ createrepo-0.4.11/readMetadata.py
+@@ -126,7 +126,7 @@ class MetadataIndex(object):
+ if self.opts.get('verbose'):
+ print _("Size (%i -> %i) changed for file %s") % (size,st.st_size,filepath)
+ return
+- if st.st_mtime != mtime:
++ if int(st.st_mtime) != mtime:
+ if self.opts.get('verbose'):
+ print _("Modification time changed for %s") % filepath
+ return
diff --git a/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
index 5f9ecf65f3..2a3231b3a4 100644
--- a/meta/recipes-support/createrepo/createrepo_0.4.11.bb
+++ b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
@@ -19,6 +19,7 @@ SRC_URI = "http://createrepo.baseurl.org/download/${BP}.tar.gz \
file://createrepo-dbpath.patch \
file://dumpMetadata-disable-signature-validation.patch \
file://rpm-createsolvedb.py \
+ file://fixstat.patch \
"
SRC_URI[md5sum] = "3e9ccf4abcffe3f49af078c83611eda2"