FAQ Blocked Package

From Gentoo Linux Wiki

Jump to: navigation, search
This article is part of the FAQ series.
General Portage Wiki

Contents

[edit] Introduction

Packages which are blocked are often set so because they will overwrite files provided by another package providing similar functionality.

[edit] Why are some packages blocked?

Most packages are blocked because of one of 3 reasons.:

  1. The KEYWORD variable in all available ebuilds for that package is missing or set testing(~) for your arch type.
  2. The package is hard masked in /usr/portage/profiles/package.mask
  3. The package is blocked by another package that is installed.

[edit] Unblocking KEYWORD masked packages

For keyword masked files you only need to add a CPV dep entry in /etc/portage/package.keywords or if its missing, copy the ebuild and needed files into your overlay and edit the KEYWORD value.

File: /etc/portage/package.keywords
>=net-misc/curl-7.11.0 ~x86

To unmask a package once only set ACCEPT_KEYWORDS prior to running emerge. e.g.

File:
 ACCEPT_KEYWORDS="~x86" emerge vmware-server

This is particularly useful when combined with -p pretend flag as it allows you to see everything required in the emerge without needing to modify the files mentioned above.

[edit] Unblocking hard masked packages

To unmask hard masked packages just add its CPV dep string to /etc/portage/package.unmask

File: /etc/portage/package.unmask
net-im/skype


[edit] Unblocking packages by removing a blocking package

The workaround is to remove the old package and emerge the new package. The goal is to do it safely.

emerge --buildpkgonly --nodeps BLOCKEDPACKAGE && emerge -C BLOCKINGPACKAGE && emerge --usepkgonly BLOCKEDPACKAGE
  1. Build new, blocked package first using --buildpkgonly --nodeps.
  2. Only if that was successful do we unmerge the old, blocking package.
  3. Finally we install the new package with --usepkgonly
File: unblock.sh
#!/bin/bash

BLOCKER=$1
BLOCKED=$2

if [[ "$BLOCKED" == "" ]]; then
 echo "unblock <blocker> <blocked>"
 exit;
fi

emerge --buildpkgonly --nodeps $BLOCKED && emerge -C $BLOCKER && emerge --usepkgonly $BLOCKED
Personal tools