summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMing Liu <liu.ming50@gmail.com>2019-04-05 16:22:15 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-22 00:31:48 +0100
commitcba849c25b95a685eade176bf7774be16c80b14b (patch)
tree1dee76b69592088c86aae19b0e636932e5e8ddf9 /meta
parent522b0d8615cdc6645f6dc37a03ea7584f19c7bfc (diff)
downloadpoky-cba849c25b95a685eade176bf7774be16c80b14b.tar.gz
opkg-utils: backport a patch to fix a sstate timestamp issue
When using sstate, two parallel builds can produce two packages with the same mtime but different checksums. When later one of those two builds fetches the others ipk, the package index does not get udpated properly (since mtime matches). This ends up with messages such as: Downloading file:/../tmp/work/../image/...ipk. Removing corrupt package file /../sysroot/../var/cache/opkg/volatile/...ipk However, in that case, ctime is different. Use ctime instead of mtime to prevent failures like this. (From OE-Core rev: 6351f52609af51055786f7b3b24aee722b4dcea4) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-make-index-use-ctime-instead-of-mtime.patch59
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb1
2 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-make-index-use-ctime-instead-of-mtime.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-make-index-use-ctime-instead-of-mtime.patch
new file mode 100644
index 0000000000..19778acd2b
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-make-index-use-ctime-instead-of-mtime.patch
@@ -0,0 +1,59 @@
1From 0cd38bb1bdcdbfc091014a1f39d015a1586a33e6 Mon Sep 17 00:00:00 2001
2From: Stefan Agner <stefan.agner@toradex.com>
3Date: Fri, 19 Oct 2018 17:38:21 +0200
4Subject: [PATCH] opkg-make-index: use ctime instead of mtime
5
6Upstream-Status: Backport
7
8When using sstate, two parallel builds can produce two packages
9with the same mtime but different checksums. When later one of
10those two builds fetches the others ipk, the package index does
11not get udpated properly (since mtime matches). This ends up with
12messages such as:
13 Downloading file:/../tmp/work/../image/...ipk.
14 Removing corrupt package file /../sysroot/../var/cache/opkg/volatile/...ipk
15
16However, in that case, ctime is different. Use ctime instead of
17mtime to prevent failures like this.
18
19Suggested-by: Khem Raj <raj.khem@gmail.com>
20Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
21Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22Acked-by: Khem Raj <raj.khem@gmail.com>
23Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
24Signed-off-by: Ming Liu <liu.ming50@gmail.com>
25---
26 opkg-make-index | 6 +++---
27 1 file changed, 3 insertions(+), 3 deletions(-)
28
29diff --git a/opkg-make-index b/opkg-make-index
30index 3227fc0..db7bf64 100755
31--- a/opkg-make-index
32+++ b/opkg-make-index
33@@ -115,12 +115,12 @@ for abspath in files:
34 pkg = None
35 fnameStat = os.stat(abspath)
36 if filename in old_pkg_hash:
37- if filename in pkgsStamps and int(fnameStat.st_mtime) == pkgsStamps[filename]:
38+ if filename in pkgsStamps and int(fnameStat.st_ctime) == pkgsStamps[filename]:
39 if (verbose):
40 sys.stderr.write("Found %s in Packages\n" % (filename,))
41 pkg = old_pkg_hash[filename]
42 else:
43- sys.stderr.write("Found %s in Packages, but mtime differs - re-reading\n" % (filename,))
44+ sys.stderr.write("Found %s in Packages, but ctime differs - re-reading\n" % (filename,))
45
46 if not pkg:
47 if (verbose):
48@@ -137,7 +137,7 @@ for abspath in files:
49 else:
50 old_filename = ""
51 s = packages.add_package(pkg, opt_a)
52- pkgsStamps[filename] = fnameStat.st_mtime
53+ pkgsStamps[filename] = fnameStat.st_ctime
54 if s == 0:
55 if old_filename:
56 # old package was displaced by newer
57--
582.7.4
59
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
index 4c41774c39..41cf11c2dd 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
@@ -14,6 +14,7 @@ SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV
14 file://threaded-xz.patch \ 14 file://threaded-xz.patch \
15 file://pigz.patch \ 15 file://pigz.patch \
16 file://0001-update-alternatives-Fix-link-relocation-support.patch \ 16 file://0001-update-alternatives-Fix-link-relocation-support.patch \
17 file://0001-opkg-make-index-use-ctime-instead-of-mtime.patch \
17" 18"
18SRC_URI_append_class-native = " file://tar_ignore_error.patch" 19SRC_URI_append_class-native = " file://tar_ignore_error.patch"
19UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" 20UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"