summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch49
-rw-r--r--meta/recipes-devtools/opkg/opkg_svn.bb3
2 files changed, 51 insertions, 1 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch b/meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
new file mode 100644
index 0000000000..f1be7b89ae
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
@@ -0,0 +1,49 @@
1From 3340b120909ea353440cfffe01fed43c55387a00 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Wed, 19 Sep 2012 17:31:45 +0200
4Subject: [PATCH 7/7] merge newpkg->provides even when oldpkg->provides
5 existed
6
7* introduced in http://code.google.com/p/opkg/source/diff?spec=svn277&r=277&format=side&path=/trunk/libopkg/pkg.c
8* the problem happens when oldpkg provide 1 and newpkg provide 2
9 provides_count is merged to 2, but oldpkg->provides has only 1 entry
10 causing SIGSEGV:
11 pkg_formatted_field (fp=fp@entry=0x1444ce0, pkg=pkg@entry=0x120c620, field=<optimized out>, field@entry=0x7ffff7bd2abe "Provides") at pkg.c:739
12 739 fprintf(fp, "%s %s", i == 1 ? "" : ",",
13 (gdb) bt
14 #0 pkg_formatted_field (fp=fp@entry=0x1444ce0, pkg=pkg@entry=0x120c620, field=<optimized out>, field@entry=0x7ffff7bd2abe "Provides") at pkg.c:739
15 #1 0x00007ffff7bc32fc in pkg_print_status (pkg=0x120c620, file=0x1444ce0) at pkg.c:887
16 #2 0x00007ffff7bbff59 in opkg_conf_write_status_files () at opkg_conf.c:400
17 #3 0x00007ffff7bbad8a in write_status_files_if_changed () at opkg_cmd.c:65
18 #4 0x00007ffff7bbb73e in opkg_upgrade_cmd (argc=<optimized out>, argv=<optimized out>) at opkg_cmd.c:577
19 #5 0x00007ffff7bbbcc2 in opkg_cmd_exec (cmd=cmd@entry=0x7ffff7dda080, argc=argc@entry=1, argv=argv@entry=0x7fffffffe768) at opkg_cmd.c:1319
20 #6 0x000000000040165f in main (argc=3, argv=0x7fffffffe758) at opkg-cl.c:377
21
22Upstream-Status: Submitted
23http://code.google.com/p/opkg/issues/detail?id=93
24
25Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
26---
27 libopkg/pkg.c | 6 ++----
28 1 file changed, 2 insertions(+), 4 deletions(-)
29
30diff --git a/libopkg/pkg.c b/libopkg/pkg.c
31index be486ee..255c673 100644
32--- a/libopkg/pkg.c
33+++ b/libopkg/pkg.c
34@@ -377,10 +377,8 @@ pkg_merge(pkg_t *oldpkg, pkg_t *newpkg)
35 oldpkg->provides_count = newpkg->provides_count;
36 newpkg->provides_count = 0;
37
38- if (!oldpkg->provides) {
39- oldpkg->provides = newpkg->provides;
40- newpkg->provides = NULL;
41- }
42+ oldpkg->provides = newpkg->provides;
43+ newpkg->provides = NULL;
44 }
45
46 if (!oldpkg->conflicts_count) {
47--
481.7.12
49
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 03ed103744..9a03f2efa8 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -7,6 +7,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
7 file://0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch \ 7 file://0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch \
8 file://0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch \ 8 file://0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch \
9 file://0006-detect-circular-dependencies.patch \ 9 file://0006-detect-circular-dependencies.patch \
10 file://0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch \
10" 11"
11 12
12S = "${WORKDIR}/trunk" 13S = "${WORKDIR}/trunk"
@@ -14,4 +15,4 @@ S = "${WORKDIR}/trunk"
14SRCREV = "633" 15SRCREV = "633"
15PV = "0.1.8+svnr${SRCPV}" 16PV = "0.1.8+svnr${SRCPV}"
16 17
17PR = "${INC_PR}.2" 18PR = "${INC_PR}.3"