Bug 6819 - opkg: remove pkg with --force-removal-of-dependent-packages failed
Summary: opkg: remove pkg with --force-removal-of-dependent-packages failed
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.8
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.8
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-10-08 12:07 UTC by Hongxu Jia
Modified: 2014-11-05 02:28 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hongxu Jia 2014-10-08 12:07:38 UTC
1. vim local.conf
...
PACKAGE_CLASSES ?= "package_ipk"
IMAGE_INSTALL_append = " perl-modules"
IMAGE_FEATURES += "package-management ssh-server-dropbear"
...

2. bitbake core-image-minimal

3. runqemu qemux86

4. ssh target

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
...
Comment 1 Hongxu Jia 2014-11-05 02:28:31 UTC
Merged into master:

commit 99b0f382f98102272206d448e3394f2e660a9a57
Author: Hongxu Jia <hongxu.jia@windriver.com>
Date:   Wed Oct 8 20:16:36 2014 +0800

    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)