Modify

Opened 3 years ago

Last modified 22 months ago

#18320 new defect

opkg fails with "NULL tmp_unpack_dir" when removing multiple packages

Reported by: luizluca@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Barrier Breaker 14.07
Keywords: Cc:

Description

Hello,

While trying to remove multiple ipkg using --force-removal-of-dependent-packages, opkg looses the contents of tmp_unpack_dir.

# opkg install ruby-stdlib
(downloads many ipkg)
# opkg remove libruby --force-removal-of-dependent-packages
Removing package ruby-stdlib from root...
Removing package ruby-logger from root...
Removing package ruby-gems from root...
Removing package ruby-zlib from root...
Removing package ruby-rss from root...
Removing package ruby-nkf from root...
Removing package ruby-dl from root...
Removing package ruby-fiddle from root...
Removing package ruby-testunit from root...
Removing package ruby-minitest from root...
Removing package ruby-xmlrpc from root...
Removing package ruby-webrick from root...
Removing package ruby-rdoc from root...
Removing package ruby-rake from root...
Removing package ruby-mkmf from root...
Removing package ruby-rbconfig from root...
Removing package ruby-shell from root...
Removing package ruby-readline from root...
Removing package ruby-json from root...
Removing package ruby-csv from root...
Removing package ruby-yaml from root...
Removing package ruby-psych from root...
Removing package ruby-net from root...
Removing package ruby-datetime from root...
Removing package ruby-minitest 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: ruby-minitest has a NULL tmp_unpack_dir.
 * opkg_remove_pkg: not removing package "ruby-minitest", prerm script failed
#root@router:/mnt/usb-dados/tmp/ruby/root-ar71xx# opkg remove libruby --force-removal-of-dependent-packages
Removing package ruby-dbm from root...
Removing package ruby-erb from root...
Removing package ruby-cgi from root...
Removing package ruby-rinda from root...
Removing package ruby-drb from root...
Removing package ruby-irb from root...
Removing package ruby-filelib from root...
Removing package ruby-pstore from root...
Removing package ruby-digest from root...
Removing package ruby-rinda 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: ruby-rinda has a NULL tmp_unpack_dir.
 * opkg_remove_pkg: not removing package "ruby-rinda", prerm script failed
#root@router:/mnt/usb-dados/tmp/ruby/root-ar71xx# opkg remove libruby --force-removal-of-dependent-packages
Removing package ruby-racc from root...
Removing package ruby-math from root...
Removing package ruby-gdbm from root...
Removing package ruby-uri from root...
Removing package ruby-enc-extra from root...
Removing package ruby-openssl from root...
Removing package ruby-rexml from root...
Removing package ruby-enc from root...
Removing package ruby-ripper from root...
Removing package ruby-sdbm from root...
Removing package ruby-optparse from root...
Removing package ruby-uri 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: ruby-uri has a NULL tmp_unpack_dir.
 * opkg_remove_pkg: not removing package "ruby-uri", prerm script failed
#root@router:/mnt/usb-dados/tmp/ruby/root-ar71xx# opkg remove libruby --force-removal-of-dependent-packages
Removing package ruby-debuglib from root...
Removing package ruby-prettyprint from root...
Removing package ruby-io-console from root...
Removing package ruby-bigdecimal from root...
Removing package ruby-patterns from root...
Removing package ruby-socket from root...
Removing package ruby-multithread from root...
Removing package ruby-debuglib 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: ruby-debuglib has a NULL tmp_unpack_dir.
 * opkg_remove_pkg: not removing package "ruby-debuglib", prerm script failed
#root@router:/mnt/usb-dados/tmp/ruby/root-ar71xx# opkg remove libruby --force-removal-of-dependent-packages
Removing package ruby-misc from root...
Removing package ruby from root...
Removing package libruby from root...

The workaround is just to retry the command.

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by luizluca@…

No news?

The problem is just opkg tries to remove a dep ipkg twice if it there is multiple ipkg that depends on it.

comment:2 Changed 22 months ago by anonymous

Probably related to that:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=6819

Afaik Yocto maintains opkg nowadays, maybe this made it into OpenWrt?

comment:3 Changed 22 months ago by luizluca@…

Yes, it might be the bug.

OpenWRT do already get opkg from yocto but it uses a release from 2011-04-08. OpenWRT do have some extra patches but I guess they are focused on adding/removing features for OpenWRT and not cherry-picking Yocto commits.

I don't know what core devs things about syncing with Yocto opkg. Maybe I'll ping openwrt-devel.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.