Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Major System Upgrades - Post III - World Domination
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Fri Mar 19, 2010 1:24 am    Post subject: HOWTO: Major System Upgrades - Post III - World Domination Reply with quote

Pre-Introduction -3) Huh?!?!?

This is the third of a series four posts describing and walking through the complete process of performing a Major Upgrade on a Gentoo based system. The other posts are:

Chapter 9) - Emerge @World

At this point, the target PC has an up-to-date base system, current configuration settings and is prepared to emerge it's CPU fan to pieces.

Finally!! Execute:
Code:
#emerge -uND world

If any of the previous Chapters seemed time consuming, this chapter is the real deal. This chapter will consume the most time by far.

On the example laptop, 790 packages were selected for ugrading/installing/re-installing. Of these, about 280 were KDE-4.4.1 packages.

The problem with this Chapter isn't so much that it's time consuming, but rather that it requires constant periodic monitoring. Despite all the cleanups noted above, there are exceptions which will cause your emerge to fail not once, but multiple times. Don't worry, we'll deal {by example} with those as they happen.

Because I know there will be problems raising their ugly heads during this phase, I expressly choose not to use the emerge flag "--keepgoing". The rationale is because many problems can be solved simply and immediately. Therefore, an "emerge --resume" will suffice to continue.

Let's see some examples:

1) Problem: Failure due to deprecated package configuration
Code:
>>> Emerging (1 of 1) media-sound/alsa-utils-1.0.22-r1
 * alsa-utils-1.0.22.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                                        [ ok ]
 * alsa-driver-1.0.22.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                                     [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                               [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                              [ ok ]
 * CPV:  media-sound/alsa-utils-1.0.22-r1
 * REPO: gentoo
 * USE:  elibc_glibc kernel_linux nls userland_GNU x86
 * Obsolete config /etc/modprobe.d/alsa found.
 * ERROR: media-sound/alsa-utils-1.0.22-r1 failed:
 *   Move /etc/modprobe.d/alsa to /etc/modprobe.d/alsa.conf.

1) Solution:
Code:
# mv /etc/modprobe.d/alsa /etc/modprobe.d/alsa.conf
# emerge --resume

2) Problem: Missing or incorrect perl macro/method
Code:
>>> Emerging (1 of 1) dev-perl/glib-perl-1.222
 * Glib-1.222.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                                                                                                                [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                               [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                              [ ok ]
 * CPV:  dev-perl/glib-perl-1.222
 * REPO: gentoo
 * USE:  elibc_glibc kernel_linux userland_GNU x86
>>> Unpacking source...
>>> Unpacking Glib-1.222.tar.gz to /var/tmp/portage/dev-perl/glib-perl-1.222/work
>>> Source unpacked in /var/tmp/portage/dev-perl/glib-perl-1.222/work
>>> Preparing source in /var/tmp/portage/dev-perl/glib-perl-1.222/work/Glib-1.222 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-perl/glib-perl-1.222/work/Glib-1.222 ...
 * Using ExtUtils::MakeMaker
Can't locate ExtUtils/PkgConfig.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.1/i686-linux /usr/lib/perl5/site_perl/5.10.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.10.1/i686-linux /usr/lib/perl5/vendor_perl/5.10.1 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.10.1/i686-linux /usr/lib/perl5/5.10.1 .) at (eval 6) line 1.
BEGIN failed--compilation aborted at (eval 6) line 1.

2) Solution:

Perl scripts with the same name will appear in different places. This is evident in the list of places {variable @INC}. I don't do perl so I don't understand what's going here. Understanding does not preclude solving the problem. In this situation, open a second terminal session using either the CTL, ALT and F# method or as a new tab in a terminal session from another PC. In that new session, execute:
Code:
# equery b PkgConfig.pm
# emerge extutils-pkgconfig

After the above merge completes, go back to the orginal terminal session and execute:
Code:
# emerge --resume

3) Problem: Another missing perl macro/method

{emerge of gnome-icon-theme-2.28.0 fails for XML/Simple.pm missing}

3) Solution:

In secondary terminal session, execute:
Code:
# equery b Simple.pm

This is exactly the same type error as problem 2). This time, I was able to capture a bit more of what was happening. Note the line containing "5.8.8". The perl script "Simple.pm" included with package XML-Simple is based on perl-5.8.8 and needs to be upgraded.
Code:
 * Searching for Simple.pm ...
dev-lang/perl-5.10.1 (/usr/lib/perl5/5.10.1/Log/Message/Simple.pm)
dev-lang/perl-5.10.1 (/usr/lib/perl5/5.10.1/Pod/Simple.pm)
dev-lang/perl-5.10.1 (/usr/lib/perl5/5.10.1/Test/Simple.pm)
dev-lang/perl-5.10.1 (/usr/lib/perl5/5.10.1/Locale/Maketext/Simple.pm)
dev-lang/perl-5.10.1 (/usr/lib/perl5/5.10.1/Filter/Simple.pm)
dev-perl/XML-Simple-2.18 (/usr/lib/perl5/vendor_perl/5.8.8/XML/Simple.pm)
dev-perl/libwww-perl-5.834-r1 (/usr/lib/perl5/vendor_perl/5.10.1/LWP/Simple.pm)
perl-core/Test-Simple-0.94 (/usr/lib/perl5/vendor_perl/5.10.1/Test/Simple.pm)

Still in the secondary terminal session, execute:
Code:
# emerge -pv XML-Simple

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-perl/XML-Simple-2.18  70 kB

Total: 1 package (1 reinstall), Size of downloads: 70 kB

Note that portage had made no determination to re-emerge this package before trying to emerge gnome-icon-theme. To fix this, still in the same secondary terminal session, execute:
Code:
# emerge XML-Simple

After the above merge completes, go back to the orginal terminal session and execute:
Code:
# emerge --resume

I will skip the remaining examples of perl macro version mismatches.

4) Problem: Missing .la problem

{sox, "The swiss army knife of sound packages" fails on missing libogg.la file}

4) Solution:

In a secondary terminal session, execute:
Code:
# equery b libogg.la

This shows the needed package is 'libogg'. Execute:
Code:
# emerge libogg

   ... snipped for brevity ...

* Messages for package media-libs/libogg-1.1.4:

 * This version of libogg has stopped installing .la files. This may
 * cause compilation failures in other packages. To fix this problem,
 * install dev-util/lafilefixer and run:
 * lafilefixer --justfixit

Still in the secondary terminal session, execute:
Code:
# emerge -s lafilefixer

Searching...   
[ Results for search key : lafilefixer ]
[ Applications found : 1 ]

*  dev-util/lafilefixer
      Latest version available: 0.5
      Latest version installed: [ Not Installed ]
      Size of files: 0 kB
      Homepage:      http://www.gentoo.org/
      Description:   Utility to fix your .la files
      License:       MIT

Still in the secondary terminal session, execute:
Code:

# emerge lafilefixer
# lafilefixer --justfixit

After the above merge and fix process completes, go back to the orginal terminal session and execute:
Code:
# emerge --resume

You may have recalled earlier that I indicated the importance of emerging 'lafilefixer' and running it. I had not been aware of that when I ran through the upgrade process on the example laptop. I included the example problem here to a) show that while it's nice to clean these things up ahead of time, it's not critical and b) to show that I didn't have all my ducks lined up either. ;)

5) Problem: Package fails on lack of needed kernel setting

{ndiswrapper fails on kernel setting}
Code:
* Checking for suitable kernel configuration options...
*   CONFIG_WIRELESS_EXT:        is not set when it should be.


5) Solution:

In this case, not only was I not prepared to deal with ndsiwrapper issues, but I no longer need ndsiwrapper for this laptop. The solution was ignore ndiswrapper altogether and execute:
Code:
# emerge --resume --skipfirst

'ndsiwrapper' should be unmerged either from a seondary terminal session or later at your convienence.

6) Problem: kdepim-runtime-4.4.1 fails for file conflicts with kdemaildir-4.2.0

6 ) Solution:

This is one of the few kde packages not picked up during kde cleanup in Chapter 6). On a secondary terminal session, execute:
Code:
# emerge -C kdemaildir-4.2.0

After the above merge completes, go back to the orginal terminal session and execute:
Code:
# emerge --resume


Chapter 10) - {@Preserved or Revdep} -Rebuild

During Chapter 9), the example laptop had it's "emerge -uND world" process abort all of 11 times while emerging 790 packages. This is, in my opinion, truly excellent. Each of the times required only a simple fix to restart the process.

But, we're not done yet. Due to "the nature of the beast" such as circular dependencies etc, there will be packages which are broken after Chapter 9) completes. For unstable branch portage users, a similar listing as below is produced. To be honest, I don't remember what stable branch portage users would see.
Code:
>>> package: sys-devel/libperl-5.10.1
 *  - /usr/lib/libperl.so.1
 *  - /usr/lib/libperl.so.1.5.8
 *      used by /usr/lib/libnetsnmpagent.so.15.1.1 (net-analyzer/net-snmp-5.4.1.1)
 *      used by /usr/lib/libnetsnmphelpers.so.15.1.1 (net-analyzer/net-snmp-5.4.1.1)
 *      used by /usr/lib/libnetsnmpmibs.so.15.1.1 (net-analyzer/net-snmp-5.4.1.1)
 *      used by 3 other files
>>> package: dev-db/mysql-5.1.44-r1
 *  - /usr/lib/libmysqlclient.so.15
 *  - /usr/lib/libmysqlclient.so.15.0
 *  - /usr/lib/libmysqlclient.so.15.0.0
 *  - /usr/lib/mysql/libmysqlclient.so.15
 *  - /usr/lib/mysql/libmysqlclient.so.15.0.0
 *      used by /usr/bin/w3c (net-libs/libwww-5.4.0-r7)
 *      used by /usr/bin/webbot (net-libs/libwww-5.4.0-r7)
 *      used by /usr/bin/www (net-libs/libwww-5.4.0-r7)
 *      used by 25 other files
>>> package: sys-libs/e2fsprogs-libs-1.41.10
 *  - /lib/libblkid.so
 *      used by /bin/mount (sys-apps/util-linux-2.17.1)
 *      used by /bin/umount (sys-apps/util-linux-2.17.1)
 *      used by /sbin/blkid (sys-apps/util-linux-2.17.1)
 *      used by 14 other files
>>> package: net-nds/openldap-2.4.19-r1
 *  - /usr/lib/libldap-2.3.so.0
 *  - /usr/lib/libldap-2.3.so.0.2.31
 *      used by /usr/bin/ogg123 (media-sound/vorbis-tools-1.2.0-r2)
 *      used by /usr/bin/sudo (app-admin/sudo-1.7.0)
 *      used by /usr/bin/sudoedit (app-admin/sudo-1.7.0)
 *      used by /usr/lib/libnfsidmap_umich_ldap.so.0.0.0 (net-libs/libnfsidmap-0.21-r1)
 *  - /usr/lib/liblber-2.3.so.0
 *  - /usr/lib/liblber-2.3.so.0.2.31
 *      used by /usr/bin/ogg123 (media-sound/vorbis-tools-1.2.0-r2)
 *      used by /usr/bin/sudo (app-admin/sudo-1.7.0)
 *      used by /usr/bin/sudoedit (app-admin/sudo-1.7.0)
 *      used by /usr/lib/libnfsidmap_umich_ldap.so.0.0.0 (net-libs/libnfsidmap-0.21-r1)

The problem is that depending packages may have unavoidably been upgraded before some of the second order {read: not immediate} dependencies were upgraded. The need is therefore to identify those packages which still rely on older libraries and re-emerge them.

For people running the unstable branch of portage, this is performed by executing:
Code:
# emerge @preserved-rebuild

For people running the stable branch of portage, this is performed by executing:
Code:
# revdep-rebuild

The example laptop set up 69 packages to re-emerge via "emerge @preserved-rebuild"

Chapter 11) Final Details and Wrap Up

Now is the time to whip out the handy-dandy list of packages to manually re-install and re-install them.

In the case of the example laptop, I executed:
Code:
# emerge k3b amarok koffice-meta vmware-workstation nvidia-drivers

It's taken a pretty fair amount of time and effort to put this together. There are aspects I should probably report as possible bugzilla entries. Things like the perl version script issue, the ndiswrapper kernel configuration and the kde version clean up process come to mind.

On the other hand, I don't know of any other distributions which permit you to "upgrade" a complete system {operating system and all application packages} at one time.

As far as the example laptop goes, if I may paraphrase: "Houstin, we have login."

You can now continue to Post Mortem.

Suggestions either here or through PM are welcome. It's been a learning experience and I intend to repeat it as I deem appropriate. There are fine tuning wrap things to include in this post as well as a list of thing to check for or remember. I'll edit these in soon.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum