summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-10-08 20:16:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-04 10:27:09 +0000
commit99b0f382f98102272206d448e3394f2e660a9a57 (patch)
tree997149b7c480210e4848f8d553186486506d90ff /meta
parentb19d01469cca60e561c4b60cbc5f2c1adc4897b8 (diff)
downloadpoky-99b0f382f98102272206d448e3394f2e660a9a57.tar.gz
opkg: fix remove pkg with --force-removal-of-dependent-packages failed
opkg remove perl --force-removal-of-dependent-packages ... Removing package perl-module-extutils-mm-dos from root... ... Removing package perl-module-extutils-mm-dos from root... You can force removal of packages with failed prerm scripts with the option: --force-remove No packages removed. Collected errors: * pkg_run_script: Internal error: perl-module-extutils-mm-dos has a NULL tmp_unpack_dir. * opkg_remove_pkg: not removing package "perl-module-extutils-mm-dos", prerm script failed ... While remove pkg with '--force-removal-of-dependent-packages', pkg may be added to remove list multiple times, add status check to make sure pkg only be removed once. [YOCTO #6819] (From OE-Core rev: 476f864b1564265469b5c9074c1f262bce21f119) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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}"