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

Bug#664209: marked as done (apt_preferences: package of higher prio not choosen?!)



Your message dated Fri, 16 Mar 2012 18:54:45 +0100
with message-id <CAAZ6_fDiuP575eYJgH21DwTb8Axj4_6NVAunYRygfsAFySnqBg@mail.gmail.com>
and subject line Re: Bug#664209: apt_preferences: package of higher prio not choosen?!
has caused the Debian Bug report #664209,
regarding apt_preferences: package of higher prio not choosen?!
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
664209: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=664209
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 0.8.15.10
Severity: minor


Hi.

I have some weird problem, either a bug, a documentation ambiguity or my misunderstanding...
(probably the later ^^).

apt_preferences(5) says:
       APT then applies the following rules, listed in order of precedence, to determine which version of a package to install.
       ·   Never downgrade unless the priority of an available version exceeds 1000. ("Downgrading" is installing a less recent version of a package in place of
           a more recent version. Note that none of APT's default priorities exceeds 1000; such high priorities can only be set in the preferences file. Note
           also that downgrading a package can be risky.)
       ·   Install the highest priority version.
       ·   If two or more versions have the same priority, install the most recent one (that is, the one with the higher version number).
       ·   If two or more versions have the same priority and version number but either the packages differ in some of their metadata or the --reinstall option
           is given, install the uninstalled one.

Now what I want to do is the following: I have the normal Debian stable archive in my sources.list.
In addition I have personal APT repo at the institute. Occasionally I rebuild (with the SAME version number as used in Debian)
Debian packages and place them in that repo.

The goal is that, when ever the Debian version is the same as of my rebuild, my rebuild should win and get installed/upgraded.
If however, Debian releases a newer version (e.g. security update), then this should win again (until I rebuild it).

I thought this could be easily done via:
Package: *
Pin: release l=LMU LCG Tier-2 Archive
Pin-Priority: 501

(given that LMU LCG Tier-2 Archive is the label of my own repo)

Now I have the following:
(please ignore that I do some pinning of packages from testing, I guess this shouldn't touch my issue)
# apt-cache policy 
Package files:
 100 /var/lib/dpkg/status
     release a=now
   1 http://lcg-lrz-admin.grid.lrz.de/lmu-lcg-tier-2-package-archive/ testing/non-free amd64 Packages
     release o=Ludwig-Maximilians-Universität München,a=testing,n=squeeze,l=LMU LCG Tier-2 Archive,c=non-free
     origin lcg-lrz-admin.grid.lrz.de
   1 http://lcg-lrz-admin.grid.lrz.de/lmu-lcg-tier-2-package-archive/ testing/contrib amd64 Packages
     release o=Ludwig-Maximilians-Universität München,a=testing,n=squeeze,l=LMU LCG Tier-2 Archive,c=contrib
     origin lcg-lrz-admin.grid.lrz.de
   1 http://lcg-lrz-admin.grid.lrz.de/lmu-lcg-tier-2-package-archive/ testing/main amd64 Packages
     release o=Ludwig-Maximilians-Universität München,a=testing,n=squeeze,l=LMU LCG Tier-2 Archive,c=main
     origin lcg-lrz-admin.grid.lrz.de
 501 http://lcg-lrz-admin.grid.lrz.de/lmu-lcg-tier-2-package-archive/ stable/non-free amd64 Packages
     release o=Ludwig-Maximilians-Universität München,a=stable,n=lenny,l=LMU LCG Tier-2 Archive,c=non-free
     origin lcg-lrz-admin.grid.lrz.de
 501 http://lcg-lrz-admin.grid.lrz.de/lmu-lcg-tier-2-package-archive/ stable/contrib amd64 Packages
     release o=Ludwig-Maximilians-Universität München,a=stable,n=lenny,l=LMU LCG Tier-2 Archive,c=contrib
     origin lcg-lrz-admin.grid.lrz.de
 501 http://lcg-lrz-admin.grid.lrz.de/lmu-lcg-tier-2-package-archive/ stable/main amd64 Packages
     release o=Ludwig-Maximilians-Universität München,a=stable,n=lenny,l=LMU LCG Tier-2 Archive,c=main
     origin lcg-lrz-admin.grid.lrz.de
   1 http://security.debian.org/debian-security/ testing/updates/non-free amd64 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian-Security,c=non-free
     origin security.debian.org
   1 http://security.debian.org/debian-security/ testing/updates/contrib amd64 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian-Security,c=contrib
     origin security.debian.org
   1 http://security.debian.org/debian-security/ testing/updates/main amd64 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian-Security,c=main
     origin security.debian.org
 500 http://security.debian.org/debian-security/ stable/updates/non-free amd64 Packages
     release v=6.0,o=Debian,a=stable,n=squeeze,l=Debian-Security,c=non-free
     origin security.debian.org
 500 http://security.debian.org/debian-security/ stable/updates/contrib amd64 Packages
     release v=6.0,o=Debian,a=stable,n=squeeze,l=Debian-Security,c=contrib
     origin security.debian.org
 500 http://security.debian.org/debian-security/ stable/updates/main amd64 Packages
     release v=6.0,o=Debian,a=stable,n=squeeze,l=Debian-Security,c=main
     origin security.debian.org
 500 http://debian.mirror.lrz.de/debian/ testing/non-free Translation-en
 500 http://debian.mirror.lrz.de/debian/ testing/main Translation-en
 500 http://debian.mirror.lrz.de/debian/ testing/contrib Translation-en
   1 http://debian.mirror.lrz.de/debian/ testing/non-free amd64 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian,c=non-free
     origin debian.mirror.lrz.de
   1 http://debian.mirror.lrz.de/debian/ testing/contrib amd64 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian,c=contrib
     origin debian.mirror.lrz.de
   1 http://debian.mirror.lrz.de/debian/ testing/main amd64 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian,c=main
     origin debian.mirror.lrz.de
 500 http://debian.mirror.lrz.de/debian/ stable-updates/non-free amd64 Packages
     release o=Debian,a=stable-updates,n=squeeze-updates,l=Debian,c=non-free
     origin debian.mirror.lrz.de
 500 http://debian.mirror.lrz.de/debian/ stable-updates/contrib amd64 Packages
     release o=Debian,a=stable-updates,n=squeeze-updates,l=Debian,c=contrib
     origin debian.mirror.lrz.de
 500 http://debian.mirror.lrz.de/debian/ stable-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=squeeze-updates,l=Debian,c=main
     origin debian.mirror.lrz.de
 500 http://debian.mirror.lrz.de/debian/ stable/non-free amd64 Packages
     release v=6.0.4,o=Debian,a=stable,n=squeeze,l=Debian,c=non-free
     origin debian.mirror.lrz.de
 500 http://debian.mirror.lrz.de/debian/ stable/contrib amd64 Packages
     release v=6.0.4,o=Debian,a=stable,n=squeeze,l=Debian,c=contrib
     origin debian.mirror.lrz.de
 500 http://debian.mirror.lrz.de/debian/ stable/main amd64 Packages
     release v=6.0.4,o=Debian,a=stable,n=squeeze,l=Debian,c=main
     origin debian.mirror.lrz.de
Pinned packages:
     multiarch-support -> 2.13-27
     fetch-crl -> 3.0.8-1
     openssl -> 1.0.0h-1
     libssl1.0.0 -> 1.0.0h-1


But:
(obviously nagios-nrpe-server is the rebuild package with the same version as in Debian)
# apt-cache policy nagios-nrpe-server
nagios-nrpe-server:
  Installed: 2.12-4
  Candidate: 2.12-4
  Version table:
     2.12-5 0
          1 http://debian.mirror.lrz.de/debian/ testing/main amd64 Packages
 *** 2.12-4 0
        500 http://debian.mirror.lrz.de/debian/ stable/main amd64 Packages
        100 /var/lib/dpkg/status
     2.12-4 0
        501 http://lcg-lrz-admin.grid.lrz.de/lmu-lcg-tier-2-package-archive/ stable/main amd64 Packages

# apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


=> So the candiate version is NOT the one I want?



What does this mean now? Is there a bug (guess not)?
Does the term "downgrade" include "reinstalling the same version", which should then be
included in the manpage (or did I miss the place?)?
Or am I just as dumb as I feel right now ;-)

Any help would be greatly appreciated.


Chris.



--- End Message ---
--- Begin Message ---
Hi Christoph,

On Fri, Mar 16, 2012 at 17:53, Christoph Anton Mitterer
<calestyo@scientia.net> wrote:
> What does this mean now? Is there a bug (guess not)?

No and i am sorry to tell you that is a subtle user misunderstanding.
(and i am therefore closing this bugreport. Feel free to contact next-time
 the debian-user mailinglist(s) first if you are unsure)


> Does the term "downgrade" include "reinstalling the same version", which should then be
> included in the manpage (or did I miss the place?)?

Your problem is that you think that it is the same version. Just because it
has the same version number doesn't mean that it is the same version.
APT has in your case three versions with the same version number:
- the one from debian
- the one from you
- the one you have installed

APT detects that the one you have installed and the one from debian are
identical as they have the same information attached (same size, same
dependencies, …) so you have only two different versions with the same
version number.

For these two we need to choose one to be above the other, for us it is the
version which is parsed at first, so move the deb-line for your archive above
the one for debian and you should be "fine".

I would recommend to avoid the practice of rebuilding with the same version-
number through. It's harder to find out if its an official or a self-build
package in case of a bug and you have problems like this one.

Especially, it gets insane if you have applied a patch but for some strange
reasons the package ends up having the same metadata as the one from
debian - APT will then think that these are the same versions …


Which versionnumbers to choose depends a bit on what you do, but there
is always a established practice findable for it as you are properly not
the only one with your "specific" needs.


Best regards

David Kalnischkies


--- End Message ---

Reply to: