Safe to transition to profile 17.1 and use unsymlink-lib tool?

Anything that pertains to Portage

Moderator: Moderators

Post Reply
Growing Hen
Posts: 129
Joined: Fri Jul 20, 2012 23:15

Safe to transition to profile 17.1 and use unsymlink-lib tool?

Post by ElDuderino » Tue Nov 10, 2020 17:06


I need to emerge packages sometimes, because they are not in sabayon. This time, I get the note from portage below, about profile transition and using "unsymlink-lib" to do that. Is it safe/recommended to follow the steps described, or will it break my system?

Thanks for any help!

!!! Your current profile is deprecated and not supported anymore.
!!! Use eselect profile to update your profile.
!!! Please upgrade to the following profile if possible:


To upgrade do the following steps:

The amd64 17.1 profiles switch to a more standard 'no SYMLINK_LIB'
multilib layout, and require an explicit migration.
The migration is performed using the app-portage/unsymlink-lib tool.
The following steps can be used to upgrade your system:

1. Sync and upgrade your system to the newest package versions
to reduce the risk of issues.

2. Install the tool:
# emerge -1v app-portage/unsymlink-lib

3. Run 'unsymlink-lib --analyze' and check the output for obvious
mistakes. If you need to perform any changes to the system, remember
to run 'unsymlink-lib --analyze' again afterwards.

[past this point do not call emerge or modify /usr manually]

4. This is a very good time to make a backup.

5. Run 'unsymlink-lib --migrate'. You can add '--pretend' first to see
what is going to happen.

6. Reboot your system. Check if important programs work.
In particular, verify that e.g. 'emerge --info' works (but do not
install anything). If you hit any serious problems, you can use
'unsymlink-lib --rollback' to revert the changes and return to
step 3.

7. Run 'unsymlink-lib --finish'. You can add '--pretend' first to see
what is going to happen but note that you're going to see a very long
list of files to remove.

8. Switch the profile, e.g.:
# eselect profile set default/linux/amd64/17.1/desktop

[at this point you can start using emerge again. emerge will then
not display this message anymore, but the remaining steps are still

9. Rebuild gcc:
# emerge -1v sys-devel/gcc:9.3.0
[ repeat for other slots you will be using ]

10. If you are using a multilib profile, rebuild all 32-bit packages.
This can be done using:
# emerge -1v --deep /lib32 /usr/lib32 /usr/lib/llvm/*/lib32

11. Once the last 32-bit package is rebuilt, your package manager
should remove the orphaned /lib32 and /usr/lib32 symlinks. If that
does not happen, remove them manually:
# rm /lib32 /usr/lib32

Old Dear Hen
Posts: 765
Joined: Sun Feb 28, 2010 17:55

Re: Safe to transition to profile 17.1 and use unsymlink-lib tool?

Post by svantoviit » Sat Nov 21, 2020 23:25

Just follow the procedure for Sabayon:

Code: Select all

$ equo notice
╠ [0] [Sat, 14 Mar 2020 15:30:52 +0000] Title: Profile change
╠ [1] [Fri, 16 Sep 2016 12:09:32 +0000] Title: Sabayon Community Repositories
╠ [2] [Fri, 08 Jun 2018 10:29:14 +0000] Title: Support Sabayon on Patreon
╠ [3] [Thu, 29 Nov 2018 12:05:30 +0000] Title: Possible problems with services after recent systemd upgrade
╠ [-1] Exit
Choose one by typing its identifier: 0
╠ [0] [Sat, 14 Mar 2020 15:30:52 +0000] Title: Profile change
╠ Content:

Sabayon is based on Gentoo, and Gentoo has a concept of profiles that can be thought as distro wide configuration.
In Sabayon the profile has been switched (or will be switched when you perform an update) to default/linux/amd64/17.1/desktop, following Gentoo. From now on, no package installs to /lib32 or /usr/lib32 and /lib is no longer a symbolic link.
Profile switch has been automated to provide you a seamless experience, however there is a couple of things you may want to be aware of.
Following notice is especially directed towards power users.
Applies to all users
No package installs to /lib32 or /usr/lib32, however it is possible that you have some stale packages with files installed there. It is not required to clean them up, but you may consider doing so.
Important: do this only if you are sure that you are already on the new profile! If /lib is NOT a symbolic link, and both /lib32 and /usr/lib32 are symbolic links, you are on an updated system and can continue. Otherwise do the update first.
If in doubt, ignore this step.
a. As a sanity check of the qlist tool used in the process, verify that this command:
qlist -eC app-portage/portage-utils
produces several lines that contain some paths.
b. Find packages that install to /lib32 or /usr/lib32.
equo query list installed -qv | while read pkg; do qlist -eC "$pkg" | grep -q -E "^/lib32/|^/usr/lib32/" && echo "$pkg"; done
Note: if the list of packages exceeds 10, you are probably not updated to the new layout. Make sure to update first.
c. This command should only produce list of old and useless packages. In the first case, just remove them with equo. If you are not sure whether the package can be removed, stop at this point (and ask for help if you would like to continue).
d. Using the command from point b., confirm that there are no packages that install to these directories (execute it again). If there are none, you can remove the symbolic links: rm /lib32 /usr/lib32.
Additional information for Portage users
If you don't use Portage (emerge) you can skip this section.
Make sure to execute: eselect profile set default/linux/amd64/17.1/desktop.
There could be packages that install to lib32 directories which you emerged yourself. Rebuilding them is recommended. After doing it, you can follow steps a-d above if you like.
That's all!
Additional information from Gentoo for the curious:

╠ Link:

Growing Hen
Posts: 129
Joined: Fri Jul 20, 2012 23:15

Re: Safe to transition to profile 17.1 and use unsymlink-lib tool?

Post by ElDuderino » Mon Nov 23, 2020 13:15

Oh, didn't see that, thanks!

Post Reply