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

Re: Different weird update by apt-get and aptitude



Florian Lindner wrote:
> I have a virtual server with a minimal debian wheezy image provided by the 
> hoster.

Wheezy.  Gotcha.

> Right after setup of the image:
> 
> root@xxx:~# aptitude full-upgrade
> ...
> root@xxx:~# apt-get dist-upgrade
> ...

You don't show it.  Did you update first?  Please do this before doing
anything else.  I expect that this might clear up the issue.  (Without
explaining it.)

  apt-get update

> root@xxx:~# aptitude full-upgrade
> No packages will be installed, upgraded, or removed.
> but apt-get
> root@xxx:~# apt-get dist-upgrade
> The following packages will be REMOVED:
>   upstart
> The following NEW packages will be installed:
>   e2fsprogs libss2 sysvinit
> 0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
> Why do aptitude and apt-get give different answers? 

The results will often be different because the resolution algorithms
in the two different programs are different from each other.  This is
why at different times in history Debian has officially recommended
one or the other.  They have not been completely interchangeable with
each other.

> If I approve the updates it renders the virtual server
> inoperable.

Inoperable in what way?  Your VM already has upstart installed.
Installing sysvinit would make it more similar to the zillions of VMs
running a default installation.

> Sorry for being confused but why is upstart installed in
> the first place?

Only your hosting company can say why they have installed upstart.  It
is a choice that they made.  A default wheezy installation will have
sysvinit installed.  Therefore someone there actively chose to install
upstart.

I will guess that someone there at the hosting company who set up the
images isn't really a Debian person so much as an Ubuntu person.  In
Ubuntu upstart is the default.  If they were much more familiar with
it then they might prefer it.  By installing upstart on Debian they
would make it much more similar to Ubuntu and therefore more familiar
to them.  The devil you know always seems better than the devil you
don't know as well.  Just a guess.  In theory both should work fine.

> It also seem to be used:
> # service cron status: [ ok ] cron is running.

The service command is not part of upstart.  The service command
actually derives from Red Hat but is now standard in Debian too.  I
always recommend using the service command to start daemons because it
cleans the environment prior to launching the daemon and that can
avoid some problems due to environment variables.  Using service is in
that way similar to 'env -i'.  It also changes the current working
directory to "/" before launching.

> Is the image from my hoster broken or is it my debian knowledge?

To debug the apt-get/aptitude differences I would start by making sure
the package lists are updated with 'apt-get update' and then I would
query looking to see what versions are to be installed.  I like the
apt-get family of commands so I will show this.

  apt-cache policy upstart
  apt-cache policy sysvinit

The result will probably indicate why apt-get wants to upgrade sysvinit.

Undoubtedly others will contribute various aptitude commands to
resolve this interactively with aptitude.

Since you didn't say what was broken when you actually installed
sysvinit I can't guess at a reason for your trouble there.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: