5

We have an old development server running Gentoo at work. I would like to update this system, but I keep running into problems with the packaging system. To me, it seems like there are dependencies on several versions of various packages, and I cannot see how to fix it.

The biggest problem is probably relating to Python and Portage. I need a newer portage, but there seems like there are cyclical dependencies going on.

I have tried various solutions, but not quite sure to go from here. Any clues that might get me further in fixing it?

Further information

The following is the (relevant bit of the) output from running emerge --update --newuse --deep @world

(lots of normal output ....)
[ebuild     U ] app-misc/mc-4.7.0.3 [4.6.1-r4] USE="edit%* -slang*" 
....
[blocks B     ] >=dev-lang/python-2.6.6 (">=dev-lang/python-2.6.6" is blocking sys-apps/portage-2.1.6.7)
[blocks B     ] <sys-apps/portage-2.1.7.16 ("<sys-apps/portage-2.1.7.16" is blocking app-shells/bash-4.1_p9)
[blocks B     ] <sys-apps/portage-2.1.9 ("<sys-apps/portage-2.1.9" is blocking dev-lang/python-2.7.1-r1)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (dev-lang/python-2.7.1-r1, ebuild scheduled for merge) pulled in by
    =dev-lang/python-2* required by (dev-vcs/mercurial-1.7, ebuild scheduled for merge)
    =dev-lang/python-2*[threads] required by (dev-vcs/mercurial-1.7, ebuild scheduled for merge)
    =dev-lang/python-2* required by (dev-libs/glib-2.28.6, ebuild scheduled for merge)
    (and 1 more)

  (app-shells/bash-4.1_p9, ebuild scheduled for merge) pulled in by
    >=app-shells/bash-3.2_p17 required by (sys-apps/portage-2.1.9.42, ebuild scheduled for merge)
    app-shells/bash required by (sys-block/di-4.18, ebuild scheduled for merge)
    app-shells/bash required by (app-admin/perl-cleaner-2.7, ebuild scheduled for merge)
    (and 2 more)

  (dev-lang/python-3.1.3-r1, ebuild scheduled for merge) pulled in by
    dev-lang/python required by (app-admin/python-updater-0.9, ebuild scheduled for merge)
    >=dev-lang/python-3 required by (sys-apps/portage-2.1.9.42, ebuild scheduled for merge)
    =dev-lang/python-3.1* required by (dev-java/java-config-2.1.11-r3, ebuild scheduled for merge)

This is the relevant bit of the output when running emerge --pretend --depclean

Calculating dependencies... done!
 * Dependencies could not be completely resolved due to
 * the following required packages not being installed:
 * 
 *   >=dev-lang/python-2.4 pulled in by:
 *     sys-apps/portage-2.1.6.7
 * 
 *   dev-lang/python pulled in by:
 *     dev-java/java-config-2.1.7
 * 
 *   dev-lang/python pulled in by:
 *     dev-libs/libxml2-2.6.31
 * 
 *   <dev-lang/python-2.6.6 pulled in by:
 *     sys-apps/portage-2.1.6.7
 * 
 *   >=dev-lang/python-2.2 pulled in by:
 *     dev-libs/beecrypt-4.1.2-r1
 * 
 *   virtual/python pulled in by:
 *     dev-python/pycrypto-2.0.1-r6
 * 
 *   >=dev-lang/python-2.3 pulled in by:
 *     dev-vcs/mercurial-1.0.2
 * 
 *   >=dev-java/java-config-2.1.9-r1 pulled in by:
 *     dev-libs/beecrypt-4.1.2-r1
 * 
 *   virtual/python pulled in by:
 *     dev-lang/swig-1.3.34
 * 
 *   dev-lang/python pulled in by:
 *     net-fs/samba-3.0.28a-r1
 * 
 *   >=dev-lang/python-2.2 pulled in by:
 *     app-arch/rpm-4.4.6-r6
 * 
 *   >=virtual/python-2.2.1 pulled in by:
 *     sys-libs/libcap-1.10-r11
 * 
 *   dev-lang/python pulled in by:
 *     sys-libs/cracklib-2.8.9-r1
 * 
5
  • Will portage accept just the latest version of Python? i.e. are all those dependencies for Python version 2.x and up?
    – new123456
    Jun 28, 2011 at 14:58
  • I wonder if you can "emerge portage" first, the updating everything else? Been a while since I used portage though. May be a good question to throw on a gentoo irc channel. Jun 28, 2011 at 18:27
  • @phoenix: portage cannot be upgraded. that was the problem.
    – oligofren
    Jul 9, 2011 at 5:23
  • @new123456: I am not quite sure I follow ... you see the list of python versions right? they are all in the 2.X series, only different.
    – oligofren
    Jul 9, 2011 at 5:24
  • @oligofren The highest Python version there appears to be 2.6 - have you tried getting it?
    – new123456
    Jul 9, 2011 at 14:00

2 Answers 2

3

I faced the same problem just a few days ago. I have no exact way how to do it, but here is the generic way:

First have a look at /var/lib/portage/world. Make a backup and strip down the packages to the ones neede by your system to boot up. Here's some content to get you going:

app-admin/syslog-ng
net-firewall/iptables
net-misc/dhcpcd
sys-apps/pciutils
sys-apps/slocate
sys-apps/usbutils
sys-boot/grub
sys-kernel/gentoo-sources
sys-power/acpid
sys-process/vixie-cron
virtual/inetd

Everything else will be updated later.

The most critical part is to get portage and python to recent versions so let's focus on that.

  1. Emerge your portage dir:

    emerge --sync
    

    or:

    emerge-webrsync
    
  2. Set a valid profile

    eselect profile list
    eselect profile set <x>
    
  3. Upgrade python / portage step by step.

    Have a look at your current installed portage version. Upgrade portage to the next version higher than your current one (even if its masked by ~x86), then do the same for python. After a python upgrade make sure to run python-updater.

    Do this step by step until python/portage are up to date. (You may skip some of the minor version upgrades. You'll see for yourself which versions result in compile errors and which do.)

  4. As soon as they work try to emerge some other packages as they might help you in your task.

    app-portage/ufed
    app-portage/autounmask
    app-portage/gentoolkit
    
  5. Once python/portage are up to date you can restore your old world file and update your system.

    emerge -pvauDN world
    

    You might need to call:

    emerge ...
    emerge --depclean
    revdep-rebuild
    

    several times during the build process.

1
  • I forgot to thank you btw, mcclane. I always hate it when people ask and do not award points. Unfortunately I haven't had time to check out whether I could get it to work, so not awarding you the answer, but will upvote your for creating such a comprehensive answser. Thanks!
    – oligofren
    Sep 13, 2011 at 19:42
0

If problem in python then try running python-updater Note that you can select current version of python by command eselect

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .