Checking /usr/local/ before upgrading

Vincenzo Ciancia ciancia at di.unipi.it
Wed Oct 24 16:29:08 BST 2007


Hi all,

I just upgraded a box from feisty to gutsy. Everything seemed broken,
update-manager was crashing, dpkg --configure -a was bailing out for too
many errors, apt-get -f install asked me to run dpkg --configure -a,
trying to configure packages manually one by one resulted in finding
"half-installed" packages.

Then I started crying and there was no Mommy with me :)

Then I discovered that libxml2 was getting an error about an undefined
symbol in libz. In #ubuntu+1, kind people told me to check if I had and
old copy of libz in /usr/local, and it was the case. Now I had this
system running from edgy, it's a desktop machine which also serves an
internal website, and it can happen to have libraries in /usr/local and
forget about those (also, I have other users who are admins).

Similar issues might happen if one has something in /usr/local/bin, so
wouldn't it be wise to ask, in the upgrade program, if user wants to
temporarily rename /usr/local to /usr/local.upgraded during upgrade, so
things are safer? Or, similarly to what is done for sources.list,
perhaps /usr/local/lib could be removed from the library path, and
/usr/local/bin from the executable path.

I hope something like this will make its way in hardy.

Vincenzo



More information about the Ubuntu-devel-discuss mailing list