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

Bug#179868: marked as done (Manual intervention necessary for reordering of sources.list to take effect)



Your message dated Wed, 14 Sep 2011 20:27:32 +0200
with message-id <CAAZ6_fAaKAomR0kZPEiBFuGe1BnecZ1j1pqkw7auMbs_BELjYQ@mail.gmail.com>
and subject line Close: Manual intervention necessary for reordering of sources.list to take effect
has caused the Debian Bug report #179868,
regarding Manual intervention necessary for reordering of sources.list to take effect
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.)


-- 
179868: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=179868
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 0.5.4
Severity: normal
File: /usr/bin/apt-get

We are told to put cdroms at the top of sources.list if we want
priority.  however, lets explore using apt_preferences, shall we?

In even the Kleinmann version of the apt_preferences man page, we see

         A note of caution: the keyword used in the  APT  prefer-
         ences  file to select the source site is "origin".  This
         may lead one to confuse the source site with  the  "Ori-
         gin:"  of  a  release  as  specified  in a Release file.
         Recall that what follows the "Origin:" tag in a  Release
         file  generally  is  not an Internet site address but an
         author or vendor name, such as "Debian" or "Ximian".

         This second-form  entry  in  the  APT  preferences  file
         applies  only  to  groups of packages.  For example, the
         following record causes APT to assign a high priority to
         all package instances available from the local site:

         Package: *
         Pin: origin ""
         Pin-Priority: 999

however it turns out that one cannot really use it to alter the
origin beyond that, at least guessing the format as it has never been
documented, or at least for unlucky me.

I have found that
Pin: origin
will match anything
(and indeed one can use two Pin lines [documented?])
and,
Pin: origin anycharshere
will match nothing.

Proof:
$ apt-cache policy enamdict
enamdict:
  Installed: (none)
  Candidate: 2002.04.25-2
  Version Table:
     2002.04.25-2 0
        500 http://debian.linux.org.tw sid/non-free Packages
        500 cdrom://[Debian GNU/Linux SID _Sid_ - fsn.hu unofficial i386 Binary-10 (20021010)] unstable/non-free Packages


I say that there is nothing you can do to
Package: *
Pin: origin -----------
Pin-Priority: 503
to make it match one line and not the other.

E.g. 
Pin: origin
will affect both
Pin: origin http://debian.linux.org.tw
will affect neither.
Pin: origin *
will affect neither.

Wait! holy moly
Pin: origin debian.linux.org.tw
works! OK, please use it as an example. Please document it!
BTW: therefore you discard http vs. ftp! bad or document what is
workaround.

don't get mad at me, i'm pointing out a big lack of documentation,
please!

wildcards dont work in hostnames it seems. ok, say so.

OK, how in the world can one use Pin: origin with the above cdrom
line?  Tried many ways, I did.  document please.

more discoveries for you to document:
Pin: origin debian.linux.org.tw security.debian.org
ruins it for debian.linux.org.tw

OK, now via
Package: *
Pin: origin debian.linux.org.tw
Pin-Priority: 111

Package: *
Pin: origin
Pin-Priority: 888
we do:

# apt-cache policy enamdict; apt-get --print-uris -q install enamdict
enamdict:
  Installed: (none)
  Candidate: 2002.04.25-2
  Version Table:
     2002.04.25-2 0
        111 http://debian.linux.org.tw sid/non-free Packages
        888 cdrom://[Debian GNU/Linux SID _Sid_ - fsn.hu unofficial i386 Binary-10 (20021010)] unstable/non-free Packages
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
  enamdict 
0 packages upgraded, 1 newly installed, 0 to remove and 0  not upgraded.
Need to get 1689kB of archives. After unpacking 6631kB will be used.
'http://debian.linux.org.tw/debian/pool/non-free/e/edict/enamdict_2002.04.25-2_all.deb' enamdict_2002.04.25-2_all.deb 1689438 22856f706a3ee4f9c1c0a66cdb380b88


we see that priorities are all bunk: 111 vs. 888 and it still chooses
111.  So why differentiate all the numbers between 100 and 990 if in
fact they are all the same. why not just call them "priority C" or
something. Ok enough for today.

No, wait:
cd /etc/apt/
apt-cache policy enamdict; apt-get --print-uris -q install enamdict
enamdict:
  Installed: (none)
  Candidate: 2002.04.25-2
  Version Table:
     2002.04.25-2 0
         -1 http://debian.linux.org.tw sid/non-free Packages
       1991 cdrom://[Debian GNU/Linux SID _Sid_ - fsn.hu unofficial i386 Binary-10 (20021010)] unstable/non-free Packages
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
  enamdict 
0 packages upgraded, 1 newly installed, 0 to remove and 0  not upgraded.
Need to get 1689kB of archives. After unpacking 6631kB will be used.
'http://debian.linux.org.tw/debian/pool/non-free/e/edict/enamdict_2002.04.25-2_all.deb' enamdict_2002.04.25-2_all.deb 1689438 22856f706a3ee4f9c1c0a66cdb380b88

you see, i separated the priorities so much and it still goes for the
first one!


OK, now I put the cdrom stuff on top of sources.list and even run
apt-get update again... same deal!

indeed the only way to get it to choose the cdrom was to take the
other source out of sources.list!

perhaps you doubt that i havent tweaked something bad, ok, see,
nothing funny here:
::::::::::::::
/etc/apt/apt.conf.d/10jidanni
::::::::::::::
APT::Get::List-Cleanup false;
::::::::::::::
/etc/apt/apt.conf.d/70debconf
::::::::::::::
// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};


Wait: I am able to produce
apt-cache policy enamdict; apt-get --print-uris -q install enamdict
enamdict:
  Installed: (none)
  Candidate: 2002.04.25-2
  Version Table:
     2002.04.25-2 0
         -1 cdrom://[Debian GNU/Linux SID _Sid_ - fsn.hu unofficial i386 Binary-10 (20021010)] unstable/non-free Packages
       1000 http://debian.linux.org.tw sid/non-free Packages
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
  enamdict 
0 packages upgraded, 1 newly installed, 0 to remove and 723  not upgraded.
Need to get 0B/1689kB of archives. After unpacking 6631kB will be used.
'cdrom:[Debian GNU/Linux SID _Sid_ - fsn.hu unofficial i386 Binary-10 (20021010)]/pool/non-free/e/edict/enamdict_2002.04.25-2_all.deb' enamdict_2002.04.25-2_all.deb 1689438 22856f706a3ee4f9c1c0a66cdb380b88

OK, lets do an experiment...never mind, i will instead tell you what happens:

1. if both sources are in sources.list, any priority number biz is
   ignored!

2. if one wants one to be installed rather than the other, he moves it
   above the other in sources.list

3. this is not enough. apt-get is still not affected.  You must at
   least make one change, more than just the ordering, of the
   sources.list file, probably so apt-get will recreate some database.
   I recommend, until this undeniable bug clump is fixed, that the
   user comment out one of the lines in his sources.list, run apt-get
   whatever, e.g. --print-uris, then restore that commented line to
   its original state. only then will he enjoy the benefits of
   "reordering ones sources.list".
4. as far as apt_preferences... well, kindly make it work as
   advertised here.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux debian 2.4.19-k7 #1 Sun Oct 6 20:29:56 EST 2002 i686
Locale: LANG=zh_TW.Big5, LC_CTYPE=zh_TW.Big5

Versions of packages apt depends on:
ii  libc6                        2.3.1-9     GNU C Library: Shared libraries an
ii  libstdc++2.10-glibc2.2       1:2.95.4-12 The GNU stdc++ library

-- no debconf information



--- End Message ---
--- Begin Message ---
Version: 0.8.15.6

  * apt-pkg/pkgcachegen.cc:
    - regenerate the cache if the sources.list changes to ensure
      that changes in the ordering there will be honored by apt

Sounds like this bug is fixed.
I am therefore closing it now,
but feel free to reopen it if you disagree.


Best regards

David Kalnischkies


--- End Message ---

Reply to: