Bug 6819

Summary: opkg: remove pkg with --force-removal-of-dependent-packages failed
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Hongxu Jia <hongxu.jia>
Component: coreAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, sgw
Version: 1.8   
Target Milestone: 1.8   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

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)