emerge

Emerge: How to prevent packages from being upgraded

This page aims to document various ways to prevent certain packages to be upgraded, and also the reasons why a user might want to prevent an upgrade, possibly offering a better solution to solve a given problem.

emerge --exclude

man emerge:

       --exclude ATOMS
              A space separated list of package names or slot atoms.
              Emerge won't install any ebuild or binary package that
              matches any of the given package atoms.

/etc/portage/make.profile is not a symlink and will probably prevent most merges.

Table of Contents

Error

Sample error message:

!!! /etc/portage/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /mnt/old.kubuntu/scratch/portage/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)


!!! Your current profile is invalid. If you have just changed your profile
!!! configuration, you should revert back to the previous configuration.
!!! Allowed actions are limited to --help, --info, --search, --sync, and
!!! --version.

Solutions

Select profile

Portage: blocking

User information

Sometimes, during emerge, there are some packages blocking other packages.
https://wiki.gentoo.org/wiki/Handbook:X86/Working/Portage#Blocked_packag...

For example:

[blocks B      ] kde-apps/kdepimlibs:4 ("kde-apps/kdepimlibs:4" is blocking kde-apps/akonadi-mime-17.04.3, kde-apps/kmailtransport-17.04.3)
[blocks B      ] kde-apps/akonadi:4 ("kde-apps/akonadi:4" is blocking kde-apps/akonadi-17.04.3-r1)
[blocks B      ] kde-apps/kdepimlibs ("kde-apps/kdepimlibs" is blocking kde-apps/akonadi-17.04.3-r1)

Fuller output:

emerge: downgrade package

Say you want to downgrade mysql from mysql 5.6 to mysql 5.5.
The basic workflow would be:

// Remove currently installed package:
# emerge -C dev-db/mysql
// Check what versions exist:
# equery meta dev-db/mysql
...
// Emerge the exact version you want:
# emerge -a =dev-db/mysql-5.5.54
// Mask greater versions, to prevent an automatic upgrade:
# echo ">dev-db/mysql-5.5.54" >> /etc/portage/package.mask

Syndicate content