Gentoo update tips when updating packages with blocks and masked files

Author:

It’s not so rear to have

blocks or masked files

when using Gentoo emerge system, but it is not complex and in most cases it is easy to resolve

To summarize it up at the beginning and then we are going to show you other articles using these advises here where you’ll see what are the steps we took to resolve the conflicts and masked packages:

  • Use verbose,verbose-conflicts and backtrack with emerge
  • Remove only big GUI packages, which have really big dependency graph like office suites or development IDEs
  • Remove obsolete packages – you do not need them, they can just make problems when updating, because emerge will take into consideration their requirements and dependencies and your update could be impossible!
  • Do not update everything with one line, you could update only the base libraries like QT, which are very important for the Linux GUI in general
  • Include explicitly packages, which block our updates in the emerge line! You could specify packages with the versions.
  • use tools like “equery” (part of app-portage/gentoolkit) for checking dependencies and/or which packages depend on the queried package. You can use it with specific version for the package. “qlist” (part of app-portage/portage-utils) also is a handful tool.
  • Sometimes when updating a group or a package with big dependency graph it is much easier to drop the -“u” update argument and to rebuild some packages with the updates.
  • In rear cases you can use “–nodeps” when updating or installing a new package (we do not need and show this one here!)
  • Do NOT rebuild the entire system with “emerge -v world” every time when you rebuild glibc, gcc, it is not mandatory to do it to have a healthy system.
  • Add or remove USE flags if needed – emerge will show you information about it. Use package.use, package.mask, package.unmask and so on.
  • use qlist to update/re(build) to pull currently installed packages with some name or category (categories)
    emerge -v $(qlist -IC|grep <NAME>)
    

    and for update just add “u” to “-v”:

    emerge -vu $(qlist -IC|grep <NAME>)
    

Here are the articles, which use our tips:

  1. Gentoo – update dev-libs/icu on a desktop box with KDE GUI and many masked packages
  2. Gentoo updating perl with many masked and blocked packages
  3. Gentoo updating KDE – package blocks

How to update some of the big and/or important packages in your system

We use a lot this construction (just remove “-u” from the arguments):

emerge -uv $(qlist -IC|grep )

  • GCC or glibc – when updating GCC or glibc rebuild the other
    emerge -vu gcc
    gcc-config -l
    gcc-config x86_64-pc-linux-gnu-7.2.0
    source .
    emerge -v glibc
    emerge -v gcc
    

    Build the GCC, then select the new one is from different major branch you must set it as the default explicitly. Then rebuild GLIBC and GCC again.

  • Xorg server – xorg server and the drivers, most major releases come with new xorg drivers.
    emerge -vu xorg-server $(qlist -IC|grep x11-drivers/)
    
  • Kernel update – always update the new kernel headers (sys-kernel/linux-headers) and rebuild glibc if there is a new one
    emerge -v --nodeps sys-kernel/gentoo-sources sys-kernel/linux-headers sys-libs/glibc
    
  • QT libraries – update or rebuild, QT does not have a meta package, which will pull all the QT packages, so the best way is to use “qlist”.
    emerge -vu $(qlist -IC|grep dev-qt|sort|uniq)
    
  • KDE Platform, Plasma, Apps – emerge -v $(qlist -IC|grep kde|sort|uniq) – update or rebuild (just remove “-u” from the arguments). KDE has several meta packages
    emerge -v $(qlist -IC|grep kde|sort|uniq)
    

    Gentoo KDE meta packages:

    kde-apps/kdeaccessibility-meta
    kde-apps/kdeadmin-meta
    kde-apps/kde-apps-meta
    kde-apps/kdecore-meta
    kde-apps/kdeedu-meta
    kde-apps/kdegames-meta
    kde-apps/kdegraphics-meta
    kde-apps/kde-meta
    kde-apps/kdemultimedia-meta
    kde-apps/kdenetwork-meta
    kde-apps/kdeutils-meta
    kde-apps/plasma-telepathy-meta
    kde-plasma/plasma-meta
    

    The problem with the meta package is that it will pull all the packages, but you may want one some of them, so the “qlist” way of only currently installed packages is the better way.

  • Xfce – update or re(build)
    emerge -vu $(qlist -IC|grep xfce)
    

    There is a meta package, too – “xfce-base/xfce4-meta”

  • selinux
    emerge -vu $(qlist -IC|grep selinux|sort|uniq)
    

Or if you do not want to include a single packet:

emerge -v $(qlist -IC|grep |grep -v )

Some updates are like this:

emerge -vu $(qlist -IC|grep kde|grep -v kde4-l10n)
emerge -vu $(qlist -IC|grep kde|sort|uniq|grep -v kross-interpreters)

Two commands to update kde, first to remove the package kde4-l10n from selected and the second one to remove kross-interpreters from selected. Probably after the update you should remove the excluded package(s).
Or in some cases as we wrote above you might want to explicitly include packages:

emerge -vu $(qlist -IC|grep dev-qt/qt) net-libs/webkit-gtk

3 thoughts on “Gentoo update tips when updating packages with blocks and masked files”

Leave a Reply

Your email address will not be published. Required fields are marked *