summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch39
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.2.2.bb1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch b/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch
new file mode 100644
index 0000000000..5e5eafcd97
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch
@@ -0,0 +1,39 @@
1From 41425d67d3589b1912416a17f740d6407c7834f2 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 8 Oct 2014 19:53:13 +0800
4Subject: [PATCH] libopkg/opkg_remove.c: avoid remove pkg repeatly with option
5 --force-removal-of-dependent-packages
6
7While remove pkg with '--force-removal-of-dependent-packages',
8pkg may be added to pkgs remove list multiple times, add status
9check to make sure pkg only be removed once.
10
11Upstream-Status: Backport
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13
14---
15 libopkg/opkg_remove.c | 8 ++++++++
16 1 file changed, 8 insertions(+)
17
18diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c
19index 34f9154..a225e41 100644
20--- a/libopkg/opkg_remove.c
21+++ b/libopkg/opkg_remove.c
22@@ -250,6 +250,14 @@ opkg_remove_pkg(pkg_t *pkg, int from_upgrade)
23 if ((parent_pkg = pkg->parent) == NULL)
24 return 0;
25
26+ /* While remove pkg with '--force-removal-of-dependent-packages',
27+ pkg may be added to remove list multiple times, add status
28+ check to make sure pkg only be removed once. */
29+ if (conf->force_removal_of_dependent_packages &&
30+ pkg->state_flag & SF_FILELIST_CHANGED &&
31+ pkg->state_status == SS_NOT_INSTALLED)
32+ return 0;
33+
34 /* only attempt to remove dependent installed packages if
35 * force_depends is not specified or the package is being
36 * replaced.
37--
381.9.1
39
diff --git a/meta/recipes-devtools/opkg/opkg_0.2.2.bb b/meta/recipes-devtools/opkg/opkg_0.2.2.bb
index 3dd74898b3..867ff7a8ee 100644
--- a/meta/recipes-devtools/opkg/opkg_0.2.2.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.2.2.bb
@@ -4,6 +4,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
4 file://no-install-recommends.patch \ 4 file://no-install-recommends.patch \
5 file://add-exclude.patch \ 5 file://add-exclude.patch \
6 file://opkg-configure.service \ 6 file://opkg-configure.service \
7 file://libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch \
7" 8"
8 9
9S = "${WORKDIR}/${BPN}-${PV}" 10S = "${WORKDIR}/${BPN}-${PV}"