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

Re: Apt-Get is Not Working (Was Upgrading KDE)

David R. Litwin wrote:
> So, why have I now written such a long message? Well, I feel obliged
> to explain my self. (I also apologise if my Drastic sounded a bit...
> Drastic. But, it is a good word. And I do love words.)


> Earlier in this thread was written the following:
> KDEVER=$(dpkg --status kdelibs4 | awk '/^Version:/{print$2}')
> grep-status -F Version $KDEVER | grep-dctrl -F Status -s Package -n -r "^install"
> which was to "...return a list of installed packages that match the
> present version number of kdelibs4.". However, when I tried it, it did
> not work.

What exactly did it do?

Let's break it down into pieces.  On my system:

  dpkg --status kdelibs4 | awk '/^Version:/{print$2}'

So my version of kdelibs4 is 4:3.3.2-6.1 (sarge version).  By saving
that in a shell variable I can use it later.

  KDEVER=$(dpkg --status kdelibs4 | awk '/^Version:/{print$2}')

  echo $KDEVER

The grep-status command is actually in the grep-dctl package.  It is
not required to be installed but several other packages do depend upon
it so it is likely to be installed.  This is mostly what I would guess
would go wrong.  You may need to install it.

  apt-get update
  apt-get install grep-dctrl

  grep-status -F Version $KDEVER | grep-dctrl -F Status -s Package -n -r "^install"

This is the same as specifying the version inline.  But by using the
variable it would dynamically be whatever it is on your system.

  grep-status -F Version 4:3.3.2-6.1 | grep-dctrl -F Status -s Package -n -r "^install"
  ...and on and on...

Actually I don't personally use KDE.  So that list above really is all
that is installed on my sytem.  But I administer many other machines
which do have KDE installed and on those the list goes on and on.

But I see the problem now while testing this out.  Prior to the
release of Sarge all of the KDE packages had the same version.  That
is they were all 4:3.3.2-1 or some such.  But I can now see that there
are various different versions such as the above 4:3.3.2-6.1 which is
a non-maintainer upload.  There was some drift as individual packages
were uploaded to get Sarge released.   Hmm...  That is going to cause
problems with my example above.

> In addition, this was mentioned: "Normally all of KDE would
> have the same version.  In your particular case because you have
> partially upgraded they won't all be the same."

An 'upgrade' means packages must match exactly.  If you have packages
A, B, and C installed and then 'upgrade' you will end up with exactly
A, B, and C installed after the upgrade.  If package C depends upon a
new package D then the 'uprade' will not upgrade C and it will be held
back.  The 'upgrade' cannot install a new package D.  The list of
packages will be the same before and after when using 'upgrade'.  This
means that A and B will be new but C will be the previous version.
This what I was referring to when I said it would be mixed versions.
But additionally I see now that it will be mixed versions anyway due
to NMUs and other things which are perfectly fine.  Just mistaken
assumptions on my part.

A 'dist-upgrade' against a system with A, B, and C where C now depends
upon a new package D will allow the system to change the list of
installed packages.  It will pull in D to meet the dependencies.  Also
if D conflicts with some other package it will allow the other package
to be removed.  Generally if you are tracking testing or unstable you
will always use dist-upgrade exclusively.  Generally when tracking
stable and only getting security updates you will use upgrade
exclusively.  But because they do slightly different things sometimes
you will use one or the other to achieve the desired effect.

> Why do I not have a FULL KDE 3.4.1? How can I make sure of this? Via
> the command above?  How can I get a whole KDE 3.4.1?

Point to the new depot.

  apt-get dist-upgrade


  aptitude dist-upgrade

If that is clean then you have the full KDE available from the depot
on your system.  Just note that as yet there may not be a full set of
packages in the new depot.  KDE 3.4 is not yet released and is not yet
in sid/unstable.  It is still experimental.  As such it may not be
completely consistent.  But most reports I have read are that it is
mostly working fine for people.  YMMV.


Attachment: signature.asc
Description: Digital signature

Reply to: