Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913905 - portage temp unmerge directory is removed after prerm failure
Summary: portage temp unmerge directory is removed after prerm failure
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-09 22:20 UTC by Oskari Pirhonen
Modified: 2023-09-15 11:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oskari Pirhonen 2023-09-09 22:20:37 UTC
While working on bug #704866 I decided to test what happens on pre/postrm failures as well (thanks mgorny). It looks like the prerm error message references /var/tmp/portage/._unmerge_/* despite it being wiped clean.

Running from git, HEAD is currently at 3e56f8a6498cd90a7d5fe472febf586455c3bad7.

$ emerge --root=/tmp/test_root/ --ask=n --depclean app-misc/foo
FEATURES variable contains unknown value(s): jobserver
FEATURES variable contains unknown value(s): jobserver

Calculating dependencies ... done!
>>> Calculating removal order...

>>> Using system located in ROOT tree /tmp/test_root/

 app-misc/foo
    selected: 0 
   protected: none 
     omitted: none 

All selected packages: =app-misc/foo-0

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1>>> Unmerging (1 of 1) app-misc/foo-0...

Packages installed:   0
Packages in world:    1
Packages in system:   56
Required packages:    0
Number removed:       1
 * Messages for package app-misc/foo-0 merged to /tmp/test_root/:
 * prerm called, will die: 1
 * ERROR: app-misc/foo-0::debug-shit failed (prerm phase):
 *   die requested
 * 
 * Call stack:
 *     ebuild.sh, line 136:  Called pkg_prerm
 *   environment, line 497:  Called die
 * The specific snippet of code:
 *           die 'die requested';
 * 
 * If you need support, post the output of `emerge --info '=app-misc/foo-0::debug-shit'`,
 * the complete build log and the output of `emerge -pqv '=app-misc/foo-0::debug-shit'`.
 * The complete build log is located at '/var/tmp/portage/._unmerge_/app-misc/foo-0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/._unmerge_/app-misc/foo-0/temp/environment'.
 * Working directory: '/var/tmp/portage/._unmerge_/app-misc/foo-0/empty'
 * S: '/var/tmp/portage/._unmerge_/app-misc/foo-0/work/foo-0'
 * postrm called, will die: 0



 * GNU info directory index is up-to-date.

 * IMPORTANT: 4 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

$ ls -alF /var/tmp/portage/._unmerge_
total 16
drwxrwxr-x. 1 portage portage  0 Sep  9 16:47 ./
drwxrwxr-x. 1 portage portage 20 Sep  9 16:45 ../