Skip to content

Instantly share code, notes, and snippets.

@zeldin
Created October 1, 2021 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeldin/e63325956b2b812b85f8a63ea78ccab8 to your computer and use it in GitHub Desktop.
Save zeldin/e63325956b2b812b85f8a63ea78ccab8 to your computer and use it in GitHub Desktop.
Unmerging with and without UNINSTALL_IGNORE in one level riscv profile
vanadis ~ # cat /usr/local/portage/app-misc/twoleveltest/twoleveltest-0.ebuild
EAPI=7
SLOT=0
KEYWORDS="riscv"
S="${WORKDIR}"
src_install() {
  echo "hello" > foobar
  insinto /usr/lib64/lp64d
  doins foobar
}
vanadis ~ # 
vanadis ~ # ln -s . /usr/lib64/lp64d
vanadis ~ # emerge -1q app-misc/twoleveltest
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) app-misc/twoleveltest-0::zeldin
>>> Installing (1 of 1) app-misc/twoleveltest-0::zeldin
vanadis ~ # ls -ld /usr/lib64/lp64d
lrwxrwxrwx 1 root root 1 Oct  1 07:41 /usr/lib64/lp64d -> .
vanadis ~ # ls -ld /usr/lib64/foobar
-rw-r--r-- 1 root root 6 Oct  1 07:43 /usr/lib64/foobar
vanadis ~ # time emerge -c app-misc/twoleveltest

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

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

All selected packages: =app-misc/twoleveltest-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/twoleveltest-0...
 * 
 * Directory symlink(s) may need protection:
 * 
 *      /usr/lib64/lp64d
 * 
 * Use the UNINSTALL_IGNORE variable to exempt specific symlinks
 * from the following search (see the make.conf man page).
 * 
 * Searching all installed packages for files installed via above symlink(s)...
 * 
 * The above directory symlink(s) are all safe to remove. Removing them now...
 * 
Packages installed:   333
Packages in world:    31
Packages in system:   43
Required packages:    333
Number removed:       1

 * Messages for package app-misc/twoleveltest-0:

 * 
 * Directory symlink(s) may need protection:
 * 
 *      /usr/lib64/lp64d
 * 
 * Use the UNINSTALL_IGNORE variable to exempt specific symlinks
 * from the following search (see the make.conf man page).
 * 
 * Searching all installed packages for files installed via above symlink(s)...
 * 
 * The above directory symlink(s) are all safe to remove. Removing them now...
 * 

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

real    3m43,471s
user    3m36,803s
sys     0m1,872s
vanadis ~ # ls -ld /usr/lib64/lp64d
ls: cannot access '/usr/lib64/lp64d': No such file or directory
vanadis ~ # ls -ld /usr/lib64/foobar
ls: cannot access '/usr/lib64/foobar': No such file or directory
vanadis ~ #
vanadis ~ # ln -s . /usr/lib64/lp64d
vanadis ~ # UNINSTALL_IGNORE="/usr/local/lib64/lp64d /usr/lib64/lp64d /lib64/lp64d" emerge -1q app-misc/twoleveltest
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) app-misc/twoleveltest-0::zeldin
>>> Installing (1 of 1) app-misc/twoleveltest-0::zeldin
vanadis ~ # ls -ld /usr/lib64/lp64d
lrwxrwxrwx 1 root root 1 Oct  1 07:50 /usr/lib64/lp64d -> .
vanadis ~ # ls -ld /usr/lib64/foobar
-rw-r--r-- 1 root root 6 Oct  1 07:51 /usr/lib64/foobar
vanadis ~ # UNINSTALL_IGNORE="/usr/local/lib64/lp64d /usr/lib64/lp64d /lib64/lp64d" time emerge -c app-misc/twoleveltest
bash: time: command not found
vanadis ~ # UNINSTALL_IGNORE="/usr/local/lib64/lp64d /usr/lib64/lp64d /lib64/lp64d" sh -c 'time emerge -c app-misc/twoleveltest'

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

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

All selected packages: =app-misc/twoleveltest-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/twoleveltest-0...
Packages installed:   333
Packages in world:    31
Packages in system:   43
Required packages:    333
Number removed:       1

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

real    3m27,354s
user    3m20,840s
sys     0m1,708s
vanadis ~ # ls -ld /usr/lib64/lp64d
lrwxrwxrwx 1 root root 1 Oct  1 07:50 /usr/lib64/lp64d -> .
vanadis ~ # ls -ld /usr/lib64/foobar
ls: cannot access '/usr/lib64/foobar': No such file or directory
vanadis ~ # 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment