[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#401317: release-notes: Chapt 4. use of aptitude etc. for upgrade



Hi,

Let me do experiment and thinking.

On Sat, Dec 02, 2006 at 11:12:46PM +0100, Frans Pop wrote:
> On Saturday 02 December 2006 15:25, Osamu Aoki wrote:
> > REFERENCE DATA:
> >   # aptitude -y -s -f --without-recommends install aptitude
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
This is not "--with-recommends upgrade" nor "--with-recommends dist-upgrade".

This was meant to upgrade only aptitude and its depending libraries such
as libc after pointing /e/a/sources.list to etch.

> > ...
> > 8 packages upgraded, 17 newly installed, 0 to remove and 118 not
> > upgraded. Need to get 0B/11.9MB of archives. After unpacking 19.6MB
> > will be used.
> >
> > This is for the mini upgrade.  20 MB is not much.  So partial upgrade
> > should not be too much of system trouble.  libc is upgraded in this
> > process.
> 
> It looks like you tried that on a fairly minimal system.

Yes.  But ...

What is wrong with upgrade under a fairly minimal system :-)

This is my kind of conclusion after trying to upgrade desktop system
chroot as below.

> For my "upgrade test system", which has the Sarge Desktop task installed 
> (i.e. Gnome and KDM desktops), I get 197 packages to remove with that 
> command, including most of Gnome and the 2.4 kernel (without 
> replacement)...
> 
> 43 packages upgraded, 41 newly installed, 197 to remove and 554 not
> upgraded. Need to get 50.9MB of archives. After unpacking 428MB
> will be freed.
> 
> So far the only working method I've been able to find to upgrade that is 
> to use aptitude interactively (i.e. the frontend, not from the 
> commandline).

I see your point if upgrade is done with these big Gnome/KDE things.
Interactive dependency resolution is much better with etch version.  So
if I have to do it, I would rather use etch version of aptitude.

Basically I thought required steps should be as follows.

Step 1. Kernel upgrade in sarge (2.2, 2.4 --> 2.6 with udev)
Step 2. Point /e/a/sources.list to etch (include nonfree contrib
        if GFDL doc packages and others are needed.)
Step 3. Partial upgrade to etch (aptitude and its deps.)
  # aptitude --without-recommends install aptitude
Step 4. Full conservative upgrade to etch using etch aptitude.
  # aptitude --without-recommends upgrade
  ... press "e" to do interactive
Step 5. Full complete upgrade to etch using etch aptitude.
  # aptitude --with-recommends dist-upgrade
  ... press "e" to do interactive

Let me test this in sarge chroot (except step 1) using "pbuilder login
--basetgz sarge".

I installed all desktop, mail server, print server, and file server
tasks using sarge aptitude (plus "screen", "mc")  to this chroot
environment to simulate you.  This was big chunk of downloads since
local cache for pbuilder was empty for most sarge packages this time :-)
...
dpkg: dependency problems prevent configuration of kdessh:
 kdessh depends on ssh; however:
  Package ssh is not configured yet.
dpkg: error processing kdessh (--configure):
 dependency problems - leaving unconfigured
...
Errors were encountered while processing:
 ssh
 uw-imapd
 kdessh
 kdeutils
 kde
Oh, well.  It is chroot.  Let's move on.

I wanted to run aptitude in "screen" session on pbuilder login shell
which is in gnome-terminal(parent) from here on.  Oops, screen does not
work in chroot.  OK, let's move on.

For Step 2, I did not includ nonfree and contrib just to make situation
worse. So just s/sarge/etch/ .

For step 3:
root@dambo:/# aptitude update; aptitude --without-recommends install aptitude
...
46 packages upgraded, 46 newly installed, 423 to remove and 534 not upgraded.
Need to get 11.6MB/50.2MB of archives. After unpacking 773MB will be freed.
Do you want to continue? [Y/n/?] y
...

This is almost same situation as you said.  I intensionally did "Y" here
to simulate your experience further.

As I look into new aptitude interactively, I see no desktop task.  Now
we have obscurely located gnome-desktop and kde-desktop.  No wonder it
was removing so much.  I set "gnome-desktop" and "kde-desktop" tasks to
be installed by pressing with "+" over them.  (Next time, I should set
all task selected packages not as "A" by pressing "m" in sarge.)  Now I
have RED resolver prompt screen.  Let me press "e" for examine.

Looks like it removes xlibs... Oh, well bang "!" and "g" to move on.  It
installs many packages.  I guess next round of action is to use "U" or
issue dist-upgrade and done.  Well let me try again with cooler head.

********************************************************************

With big changes between old stable to new stable, things like GCC ABI
changes etc. will happen.  Under this condition, even if we try to do
just partial upgrade of aptitude in full system, this upgrade will pull
in libc6 and all other C++ libraries.  Then these libraries have
"conflict" set with older packages.  Then they get upgraded unless we
allow them to be broken relationship.  That is not so easy with sarge
aptitude.

********************************************************************
So what is the better option.  KISS!

Any desktop system packages are going to be upgraded.  Why have them!

As long as we do not purge those packages, we are suppose to keep
package configutration.  Unlike our normal daily/weekly sid upgrades,
the old stable to new stable transition may be better done under fairly
minimal services.

Step 1. Kernel upgrade in sarge (2.2, 2.4 --> 2.6 with udev)
Step 2. Remove all Desktop Environment in Tasksel placing "-" over it
        and do "g".  This removes many files but at least you know what
        have been removed. You never need these while upgrading.
        (Actually cyclic dependency keeps some packages)
Step 3. Point /e/a/sources.list to etch (include nonfree contrib
        if GFDL doc packages and others are needed.)
        and do "aptitide update". (Do not worry about warning)
Step 4. Partial upgrade to etch (aptitude, tasksel and its deps.)
  # aptitude install aptitude tasksel
  (See below.  It is decent situation "13 packages upgraded, 12 newly
  installed, 1 to remove and 321 not upgraded." is manageable things.)
Step 5. Start new aptitude and set Desktop thingy.
  # aptitude
  ... press "+" over "End-user" in "Tasks".  So we get new full
      etch desktop. 
  ... press "U" to upgrade all and try resolving with "e" and "!" "g"
  ... press "Y" for `/etc/dpkg/dpkg.cfg'
  ... After everythng, do it again. press "+" over "End-user". 
  ... No problem (no red resolver).  "g"
  ... Hmmm... Let's remove Obsolete interactively.  "g".

This was much saner upgrade than upgrade with Desktop.  

I guess going down dependency chain from DEsktop Task may be needed if
some packages were not marked as automatic.  I do not know if I should
force to mark "libs" etc.  Probaable yes.

Anyway, I hope this helps.

--- HERE is log ----
root@dambo:/# aptitude install aptitude tasksel
...
Reading task descriptions... Done
The following NEW packages will be automatically installed:
  debian-archive-keyring dmidecode gcc-4.1-base gnupg gpgv laptop-detect
  libdb4.4 libsigc++-2.0-0c2a libusb-0.1-4 readline-common tasksel-data
  tzdata
The following packages will be automatically REMOVED:
  base-config
The following packages have been kept back:
  ...
The following NEW packages will be installed:
  debian-archive-keyring dmidecode gcc-4.1-base gnupg gpgv laptop-detect
  libdb4.4 libsigc++-2.0-0c2a libusb-0.1-4 readline-common tasksel-data
  tzdata
The following packages will be REMOVED:
  base-config
The following packages will be upgraded:
  apt apt-utils aptitude debconf libc6 libc6-dev libgcc1 libncurses5
  libncursesw5 libreadline5 libstdc++6 locales tasksel
The following packages are RECOMMENDED but will NOT be installed:
  aptitude-doc-en
13 packages upgraded, 12 newly installed, 1 to remove and 321 not upgraded.
Need to get 4447kB/20.5MB of archives. After unpacking 12.7MB will be used.
Do you want to continue? [Y/n/?]
--------------------

In conclusion, concept should be:
 * remove (not purge) all Desktop packaes.
 * upgrade aptitude and tasksel first.
 * Then go all the way.

I hope this helps to shape Release note.

Osamu










Reply to: