fedora core 3, ATrpms, and dist-upgrade

Todd Allen <[email protected]> Mon, 24 Jan 2005 17:51:21 -0700
Newsgroups gmane.linux.conectiva.apt-rpm
Message-ID <[email protected]>
Hi.

I've got a situation where apt-get dist-upgrade isn't behaving as I'd
expected.  I'd like to know if this sounds like a bug, and/or if there's a
way to make it stop doing what it's doing.

This is a Fedora Core 3 system (actually two systems with the same behavior),
with several apt repositories configured.  Here are the non-comment lines
from /etc/apt/sources.list:

---8<---------------------------------------------------------------------------
rpm     http://ayo.freshrpms.net fedora/linux/3/i386 core updates freshrpms
rpm     http://toad.ccur.com/Todd all/en/i386 todd extras
rpm     http://toad.ccur.com/Todd fc3/en/i386 override extras
rpm     http://hyena.ccur.com/apt plde/en/i386 plde internal devel sms
rpm     http://mirrors.kernel.org/fedora.us/ fedora/fedora/3/i386 updates
rpm     http://mirrors.kernel.org/fedora.us/ fedora/fedora/3/i386 extras
rpm-src http://mirrors.kernel.org/fedora.us/ fedora/fedora/3/i386 extras
rpm     http://greysector.rangers.eu.org/apt/ fc2 stable testing unstable
rpm     http://apt.sw.be fedora/3/en/i386 dag
rpm     http://apt.physik.fu-berlin.de fedora/3/en/i386 at-testing
rpm-src http://apt.physik.fu-berlin.de fedora/3/en/i386 at-testing
rpm     http://newrpms.sunsite.dk/apt/ redhat/en/i386/fc3 newrpms
rpm-src http://newrpms.sunsite.dk/apt/ redhat/en/i386/fc3 newrpms
rpm     http://sluglug.ucsc.edu/macromedia/apt fedora/3 macromedia
rpm-src http://sluglug.ucsc.edu/macromedia/apt fedora/3 macromedia
rpm     http://rpm.livna.org/ fedora/3/i386 stable
rpm-src http://rpm.livna.org/ fedora/3/i386 stable
rpm     http://ccrma.stanford.edu/planetccrma/apt fedora/3/i386 planetccrma
rpm     http://ccrma.stanford.edu/planetccrma/apt fedora/3/i386 planetcore
rpm     ftp://jpackage.hmdc.harvard.edu/JPackage/ 1.6/fedora-3 free
rpm-src ftp://jpackage.hmdc.harvard.edu/JPackage/ 1.6/fedora-3 free
rpm     http://www.nrpms.net/downloads/apt/ fedora-3-i386 production
rpm-src http://www.nrpms.net/downloads/apt/ fedora-3-i386 production
rpm     http://dries.studentenweb.org apt/fedora/fc3/i386 dries
rpm-src http://dries.studentenweb.org apt/fedora/fc3/i386 dries
---8<---------------------------------------------------------------------------

I've assigned priorities to repositories to achieve certain goals.  Here are
the relevant goals:
   1) (almost) nothing should ever cause a stock Fedora Core package to be
      replaced, except with a Fedora Core update package.
   2) FreshRpms, ATrpms, Dag, or NewRPMS are preferred sources for extra
      packages.
   3) Fedora Stable is the 2nd tier preference for new packages.

Here's the /etc/apt/preferences that tries to achieve that:

---8<---------------------------------------------------------------------------
Package: *
Pin: release o=toad.ccur.com, c=override
Pin-Priority: 999

Package: *
Pin: release o=toad.ccur.com, c=todd
Pin-Priority: 509

Package: *
Pin: release o=toad.ccur.com, c=extras
Pin-Priority: 500

Package: *
Pin: release o=hyena.ccur.com
Pin-Priority: 991

Package: *
Pin: release o=ayo.freshrpms.net, c=updates
Pin-Priority: 990

Package: *
Pin: release o=ayo.freshrpms.net, c=core
Pin-Priority: 990

Package: *
Pin: release o=ayo.freshrpms.net, c=os
Pin-Priority: 990

Package: *
Pin: release o=ayo.freshrpms.net, c=freshrpms
Pin-Priority: 502

Package: *
Pin: release o=ATrpms
Pin-Priority: 502

Package: *
Pin: release o=dag.wieers.com
Pin-Priority: 502

Package: *
Pin: release o=newrpms.sunsite.dk
Pin-Priority: 502

Package: *
Pin: origin sluglug.ucsc.edu
Pin-Priority: 502

Package: *
Pin: release o=Fedora, c=stable
Pin-Priority: 501

Package: *
Pin: release o=Fedora Core, c=updates
Pin-Priority: 501

Package: *
Pin: release o=Fedora, c=testing
Pin-Priority: 99

Package: *
Pin: release o=Dominik Mierzejewski, c=stable
Pin-Priority: 499

Package: *
Pin: release o=Dominik Mierzejewski, c=testing
Pin-Priority: -1

Package: *
Pin: release o=Dominik Mierzejewski, c=unstable
Pin-Priority: -1

Package: *
Pin: release o=Livna.org
Pin-Priority: 498

Package: *
Pin: release o=Planet CCRMA
Pin-Priority: 497

Package: *
Pin: release o=Planet CCRMA Core
Pin-Priority: 497

Package: *
Pin: release o=http://www.jpackage.org/
Pin-Priority: 497

Package: *
Pin: release o=NyQuist
Pin-Priority: 497

Package: *
Pin: origin dries.studentenweb.org
Pin-Priority: 497

Package: *
Pin: origin gstreamer.net
Pin-Priority: 497

Package: *
Pin: origin rpms.subpop.net
Pin-Priority: 497

Package: gramps
Pin: version 0.98.0-1
Pin-Priority: 999
---8<---------------------------------------------------------------------------

The system(s)'s apt databases are internally consistent.  That is, "apt-get
check" reports no problems, nor do other apt-get commands:

   # apt-get check
   Reading Package Lists... Done
   Building Dependency Tree... Done

The databases are downloaded with "apt-get update" every night, including
last night.  As of last night, an attempted "apt-get upgrade" did nothing:

   # apt-get upgrade
   Reading Package Lists... Done
   Building Dependency Tree... Done
   The following packages have been kept back
     apt apt-devel hping2
   0 upgraded, 0 newly installed, 0 removed and 3 not upgraded.

However, an attempted "apt-get dist-upgrade" attempts to install the
atrpms-package-config rpm, which unfortunately contains files that conflict
with stock Fedora Core packages:

   # apt-get update
   ... blah blah blah ...
   Reading Package Lists... Done
   Building Dependency Tree... Done
   # apt-get dist-upgrade
   Reading Package Lists... Done
   Building Dependency Tree... Done
   Calculating Upgrade... Done
   The following NEW packages will be installed:
     atrpms-package-config
   The following packages have been kept back
     apt apt-devel hping2 libcdio
   0 upgraded, 1 newly installed, 0 removed and 4 not upgraded.
   Need to get 8562B of archives.
   After unpacking 10.2kB of additional disk space will be used.
   Do you want to continue? [Y/n] y
   Get:1 http://apt.physik.fu-berlin.de fedora/3/en/i386/at-testing
   atrpms-package-config 91-1.rhfc3.at [8562B]
   Fetched 8562B in 1s (6938B/s)          
   Committing changes...
   Preparing...                ########################################### [100%]
           file /etc/sysconfig/rhn/sources from install of
   atrpms-package-config-91-1.rhfc3.at conflicts with file from package
   fedora-release-3-8
           file /etc/yum.conf from install of atrpms-package-config-91-1.rhfc3.at
   conflicts with file from package yum-2.1.12-0.fc3
           file /etc/apt/apt.conf from install of
   atrpms-package-config-91-1.rhfc3.at conflicts with file from package
   apt-0.5.15cnc6-1.1.fc3.fr
           file /etc/apt/rpmpriorities from install of
   atrpms-package-config-91-1.rhfc3.at conflicts with file from package
   apt-0.5.15cnc6-1.1.fc3.fr
           file /etc/apt/sources.list from install of
   atrpms-package-config-91-1.rhfc3.at conflicts with file from package
   apt-0.5.15cnc6-1.1.fc3.fr
           file /etc/apt/vendors.list from install of
   atrpms-package-config-91-1.rhfc3.at conflicts with file from package
   apt-0.5.15cnc6-1.1.fc3.fr
   E: Error while running transaction

The conflicting files aren't the issue (at least not the one I'm talking
about here).  What is at issue is why "apt-get dist-upgrade" is trying to
install atrpms-package-config in the first place.  There's no dependency on
it.  That's confirmed by Axel Thimm, but also it should follow from the fact
that "apt-get upgrade" did nothing, and didn't complain.

The only thing I can see is that the repository that contains it has been
given priority 502, which is higher than 500.  The description of what
dist-upgrade does is a bit vague, but I don't think it can be its logic that
*all* packages in repositories with priorities higher than 500 are to be
installed.  Certainly, if that was its logic, there are *tons* of additional
packages in ATrpms that I don't have installed, and it isn't trying to
install them.  Just atrpms-package-config.

So, currently, I suspect this is an apt-get bug.  But if not, I'd appreciate
an explanation for why it's trying to install this unnecessary package.

As a workaround, I tried pinning the atrpms-package-config package with a
priority of -1 in /etc/apt/preferences, like this:

   Package: atrpms-package-config
   Pin: release o=ATrpms
   Pin-Priority: -10

But, surprisingly, that had no effect.  Perhaps this is another bug?  Note
that negative Pin-Priority's have been working OK for me when applied to a
whole repository.  They might even work OK on individual packages in some
circumstance, although I have no evidence for or against that.  All I'm
seeing here is that this atrpms-package-config package is being installed
despite the negative Pin-Priority.  So, this could just be a ramification of
the bug that's causing it to be installed for no obvious reason.

As another workaround, I tried lowering the priorities of all the
repositories with explicit priorities by 2 so that ATrpms would have priority
500, Fedora Stable would have priority 499, etc.  That stopped apt from
trying to install atrpms-package-config.  But it had other unwanted side
effects.  apt-get then tried to upgrade several packages which were from
ATrpms/FreshRpms/Dag/NewRPMS with newer packages from Fedora Stable.
Avoiding this was the very reason that I'd given those repositories
priorities above 500.

I'm using apt 0.5.15cnc6 from FreshRpms (apt-0.5.15cnc6-1.1.fc3.fr to be
precise).

So, does anyone have any ideas on what might be going wrong here?

BTW, it's already been recommended to me that I avoid priorities because
they're not too stable or well-tested, but I'm not planning on taking that
advice.  :)  If I get desperate, I always can create an atrpms-package-config
of my own with a really high version number, and install that.  I'll use that
kludge before I give up on priorities.

Thanks in advance for any help.

-- 
Todd Allen