apt reinstalls same package from '~ppa1' again and again

Bug #152317 reported by Daniel Hahler
14
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: apt

apt appears to handle the "bash" package differently then e.g. bash-static, though both are from the same source package:
"apt-get upgrade" keeps re-installing the same "bash" package (3.2-0ubuntu12~ppa1) from my Launchpad PPA (again and again).

apt reports the correct version installed, in /var/lib/dpkg/status, yet still tries to reinstall it.

I guess this is related to "bash" being a essential package.

Note, how "apt-cache policy" for "bash" differs from "bash-static" (or any other package):

$ LANG=C apt-cache policy bash
bash:
  Installed: 3.2-0ubuntu12~ppa1
  Candidate: 3.2-0ubuntu12~ppa1
  Version table:
     3.2-0ubuntu12~ppa1 0
        500 http://ppa.launchpad.net gutsy/main Packages
 *** 3.2-0ubuntu12~ppa1 0
        100 /var/lib/dpkg/status
     3.2-0ubuntu11 0
        500 http://de.archive.ubuntu.com gutsy/main Packages
        500 http://archive.ubuntu.com gutsy/main Packages

$ LANG=C apt-cache policy bash-static
bash-static:
  Installed: 3.2-0ubuntu12~ppa1
  Candidate: 3.2-0ubuntu12~ppa1
  Version table:
 *** 3.2-0ubuntu12~ppa1 0
        500 http://ppa.launchpad.net gutsy/main Packages
        100 /var/lib/dpkg/status
     3.2-0ubuntu11 0
        500 http://de.archive.ubuntu.com gutsy/universe Packages
        500 http://archive.ubuntu.com gutsy/universe Packages

To test this, you might want to add
deb http://ppa.launchpad.net/blueyed/ubuntu gutsy main restricted universe multiverse
to your /etc/apt/sources.list.

This is with apt 0.7.6ubuntu13 from Ubuntu Gutsy.

Daniel Hahler (blueyed)
description: updated
description: updated
Revision history for this message
Cedric Schieli (cschieli) wrote :

I saw exactly the same behaviour with several other packages in various PPAs (which are not always essential)

For example in my ppa vmware-player keeps reinstalling, but not vmware-player-kernel-modules and vmware-player-kernel-modules-2.6.14-* whereas they are built from the same source package.

Daniel Hahler (blueyed)
Changed in apt:
status: New → Confirmed
Revision history for this message
Daniel Bonniot de Ruisselet (bonniot-users) wrote :

A workaround is to edit /var/lib/dpkg/status and bump the installed version number. For instance for vmware-player, I edited to:
Version: 1:2.0.2-1~ppa5.0.1

Cedric, just move to something higher than that next version, please ;-) And thanks a lot for the packaging.

Still it would be nice to have this bug fixed...

Changed in apt:
importance: Undecided → Medium
Revision history for this message
Cedric Schieli (cschieli) wrote :

I think I found what's happening :

I compared various /var/lib/dpkg/status and /var/lib/apt/lists/ppa*_Packages entries.
All the packages that keep reinstalling have a Pre-Depend field in the status file but not in the Packages file.
Manually adding it in the Packages does the trick.

It seems soyuz is removing the Pre-Depend field...

Revision history for this message
James Westby (james-w) wrote :

Hi Cedric,

> I think I found what's happening :

> I compared various /var/lib/dpkg/status and /var/lib/apt/lists/ppa*_Packages entries.
> All the packages that keep reinstalling have a Pre-Depend field in the status file but not in the Packages file.
> Manually adding it in the Packages does the trick.

> It seems soyuz is removing the Pre-Depend field...

Thanks for your investigations.

You say the "Pre-Depend" field, but this is usually "Pre-Depends",
is it the former that you are having trouble with?

I haven't been able to reproduce this by uploading
packages with a Pre-Depends to my PPA, the Packages file
lists the Pre-Depends just fine.

Thanks,

James

Revision history for this message
Cedric Schieli (cschieli) wrote :

Yes, I meant Pre-Depends

So maybe it is fixed for newly built packages. That would be good news. I'll try by re-uploading some of my packages.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

This is not a bug in apt, the way apt works is that it will try to reinstall a package from the archive if the meta-data of the archive is different than the meta-data on the local install (the assumption is that the local install got corrupted). The problem is (or used to be) that the PPA packages file was not in sync with the local data (a soyuz/ppa bug) and that lead apt to reinstall the same package over and over again.

Cheers,
 Michael

Changed in apt:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.