Re: apt-get wants to upgrade package to same version?

2002-08-27 Thread Scott James Remnant
On Mon, 2002-08-26 at 06:21, Brian May wrote:

 I suspect this is a more general problem with apt-get that it assumes
 that if two versions of the same package are available from different
 sources, then both packages will be exactly the same. As such, it will
 always use the Packages entry from the first Packages file it finds,
 because it assumes the other entries will be the same anyway.
 
That isn't what apt-get is doing.

The pins are used to determine which of all the available versions for
the package are candidates for installation, in Ludovic's case both the
woody and unstable versions are candidates (both have pin  now).

Once that's done, you have a list of candidate versions.  First the
highest version will be selected, in Ludovic's they both have the same
version, so they're both selected.

Now the version listed first in the sources.list is selected, because
that's your most preferred source.

There's no assumption going on here about the content of the package,
it's simply selecting which of the available packages you mean it to
download.

Scott
-- 
Scott James Remnant Have you ever, ever felt like this?  Had strange
http://netsplit.com/  things happen?  Are you going round the twist?


signature.asc
Description: This is a digitally signed message part


Re: apt-get wants to upgrade package to same version?

2002-08-27 Thread Brian May
On Tue, Aug 27, 2002 at 02:36:39PM +0100, Scott James Remnant wrote:
 The pins are used to determine which of all the available versions for
 the package are candidates for installation, in Ludovic's case both the
 woody and unstable versions are candidates (both have pin  now).

In my case, though one PIN is -1 The other PIN is 700.

The entry with the PIN of -1 is wrong, but it is obvious that apt-get
must be using it somehow, as then entry with the PIN of 700 is
identical.

The -1 entry isn't even installable on my system, it requires
the latest version of libc6 which I do not have installed on my
system.

If apt-get was ignoring the PIN entry of -1 like it should, there would
be no reason for it to reinstall those packages again.

When apt-get does install the package, it correctly uses the PIN=700
entry. It is only when apt-get checks to see if it needs to be
reinstalled, it somehow gets this wrong. It then proceeds to reinstall
the same version again.

 Once that's done, you have a list of candidate versions.  First the
 highest version will be selected, in Ludovic's they both have the same
 version, so they're both selected.
 
 Now the version listed first in the sources.list is selected, because
 that's your most preferred source.

errr I already said that the first entry in ***my*** sources.list
has a PIN of -1. Why do I feel like I am going around in circles here?

 There's no assumption going on here about the content of the package,
 it's simply selecting which of the available packages you mean it to
 download.

I think you are mistaken.

Even if apt-get could select the correct package entry correctly, there
is still the problem that both packages would have the same name and
apt-get would try to store them both in the one directory.

Even if apt-get did everything correctly, you still might have the
problem of caches along the way getting confused.

Which is probably a more fundemental flaw in Debian, as it has no
concept of namespaces, or that various versions of the one compiled
binary might exist. Currently if you modify the binary, you must also
modify to source to use a different version.
-- 
Brian May [EMAIL PROTECTED]




Re: apt-get wants to upgrade package to same version?

2002-08-23 Thread Ludovic Rousseau
Le mercredi 21 août 2002 à 13:28:30, Brian May a écrit:
 Hello,

Hi,

 I have just being playing around with apt-proxy, and noticed something
 weird. Every time I run apt-get, it wants to upgrade the packages it
 just upgraded 5 seconds ago (it only happens on this computer, too):

[..]

 scrooge:/tmp# apt-cache policy kerberos4kth1
 kerberos4kth1:
   Installed: 1.1-11-2
   Candidate: 1.1-11-2
   Version Table:
  1.1-11-2 0
  -1 http://snoopy.apana.org.au unstable/main Packages
  1.1-11-2 0
 700 http://snoopy.apana.org.au woody/main Packages
  *** 1.1-11-2 0
 100 /var/lib/dpkg/status
  1.1-8-2 0
 700 http://snoopy.apana.org.au woody/updates/main Packages
 700 http://snoopy.apana.org.au woody/non-US/main Packages

I have just had the same problem (with different packages).

$ apt-cache policy libpisock8
libpisock8:
  Installed: 0.11.3-2
  Candidate: 0.11.3-2
  Version Table:
 0.11.3-2 0
500 http://http.us.debian.org unstable/main Packages
 0.11.3-2 0 
990 http://people.debian.org woody/. Packages
 *** 0.11.3-2 0   
100 /var/lib/dpkg/status

And apt-get wanted to reinstall the same packages again and again.

$ sudo apt-get -s upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be upgraded
  libpisock++0 libpisock8 pilot-link
3 packages upgraded, 0 newly installed, 0 to remove and 0  not upgraded.
Inst libpisock8 (0.11.3-2 Backports from sid:3.0/stable)
Inst libpisock++0 (0.11.3-2 Backports from sid:3.0/stable)
Inst pilot-link (0.11.3-2 Backports from sid:3.0/stable)
Conf libpisock8 (0.11.3-2 Backports from sid:3.0/stable)
Conf libpisock++0 (0.11.3-2 Backports from sid:3.0/stable)
Conf pilot-link (0.11.3-2 Backports from sid:3.0/stable)


After I changed the order of the lines in /etc/apt/sources.list the
bug was corrected.

I now have:

$ apt-cache policy libpisock8
libpisock8:  
  Installed: 0.11.3-2
  Candidate: 0.11.3-2
  Version Table:
 *** 0.11.3-2 0
990 http://people.debian.org woody/. Packages
100 /var/lib/dpkg/status
 0.11.3-2 0
500 http://http.us.debian.org unstable/main Packages

from sources.list(5) you can read:
  The file lists one source per line, with the most preferred source
  listed first.

Try to reorder your sources.list file.

Hope this helps.

Regards,

-- 
 Dr. Ludovic Rousseau[EMAIL PROTECTED]
 -- Normaliser Unix c'est comme pasteuriser le Camembert, L.R. --




Re: apt-get wants to upgrade package to same version?

2002-08-21 Thread Brian May
On Tue, Aug 20, 2002 at 09:50:21PM -0600, Jason Gunthorpe wrote:
 The entires in Packages files and those in the .deb must match exactly
 (ie byte for byte), otherwise it sees them as different packages. Since
 dpkg manipulates the status file and only has information from the .deb
 there is no way to force a particular contents into the status file.

apt-get knows that it has to get the file from:

deb http://snoopy.apana.org.au/~ftp/debian woody main

and the md5sum of the Packages file from this source, as quoted
before matches exactly.

What is the problem here?
-- 
Brian May [EMAIL PROTECTED]




Re: apt-get wants to upgrade package to same version?

2002-08-21 Thread Jason Gunthorpe

On Wed, 21 Aug 2002, Brian May wrote:

 On Tue, Aug 20, 2002 at 09:50:21PM -0600, Jason Gunthorpe wrote:
  The entires in Packages files and those in the .deb must match exactly
  (ie byte for byte), otherwise it sees them as different packages. Since
  dpkg manipulates the status file and only has information from the .deb
  there is no way to force a particular contents into the status file.
 
 apt-get knows that it has to get the file from:
 
 deb http://snoopy.apana.org.au/~ftp/debian woody main
 
 and the md5sum of the Packages file from this source, as quoted
 before matches exactly.

Er, the md5sum of the deb is not kept by dpkg after you install a .deb.

Jason




Re: apt-get wants to upgrade package to same version?

2002-08-21 Thread Brian May
On Tue, Aug 20, 2002 at 11:19:13PM -0600, Jason Gunthorpe wrote:
  apt-get knows that it has to get the file from:
  
  deb http://snoopy.apana.org.au/~ftp/debian woody main
  
  and the md5sum of the Packages file from this source, as quoted
  before matches exactly.
 
 Er, the md5sum of the deb is not kept by dpkg after you install a .deb.

We seem to be going around in circles, or talking on different
frequencies, or something.

Lets try to go back to the basics:

My apt-sources contains:
deb http://snoopy.apana.org.au:8081/debian/ woody main non-free contrib
deb http://snoopy.apana.org.au:8081/debian/ unstable main non-free contrib
deb http://snoopy.apana.org.au/~ftp/debian woody main

My apt/preferences file is setup so that the 2nd line has a priority -1,
so it should effectively be ignored, right?

Also, the version in woody is old, so that line should be ignored
too, right?

That leaves one line left to be processed, the last one.

I then run an apt-get update operation. This will download this
entry from the Packages file:

Package: kerberos4kth1
Version: 1.1-11-2
Priority: optional
Section: net
Maintainer: Mikael Andersson [EMAIL PROTECTED]
Architecture: all
Filename: ./pool/krb4/kerberos4kth1_1.1-11-2_all.deb
Size: 57786
MD5sum: 330d49310a3264f037875e06a1328458
Description: Dummy library package for Kerberos4 From KTH.
 This is a dummy package. It should be safe to remove it.
installed-size: 76
source: krb4

This MD5sum matches that of the file on the server, exactly:

[518] [snoopy:unstable:bam] /home/ftp/pub/debian md5sum 
./pool/krb4/kerberos4kth1_1.1-11-2_all.deb
330d49310a3264f037875e06a1328458 ./pool/krb4/kerberos4kth1_1.1-11-2_all.deb

The MD5sum is also exactly the same on the file downloaded on
the client.

I then do apt-get upgrade two times in a row, and it upgrades
the same set of packages twice.

Why?
-- 
Brian May [EMAIL PROTECTED]




Re: apt-get wants to upgrade package to same version?

2002-08-21 Thread Jason Gunthorpe

On Wed, 21 Aug 2002, Brian May wrote:

 On Tue, Aug 20, 2002 at 11:19:13PM -0600, Jason Gunthorpe wrote:
   apt-get knows that it has to get the file from:
   
   deb http://snoopy.apana.org.au/~ftp/debian woody main
   
   and the md5sum of the Packages file from this source, as quoted
   before matches exactly.
  
  Er, the md5sum of the deb is not kept by dpkg after you install a .deb.
 
 This MD5sum matches that of the file on the server, exactly:

Just ignore the md5sum, it isn't (can't be!) used for anything like this.

If you do apt-cache show kerberos4kth1 after installing and look very
carefully you will see that the two listed 1.1-11-2 stanzas are subtly
different. The problem is that your package file does not
accurately reflect the contents of the .deb. That is all.

Jason




Re: apt-get wants to upgrade package to same version?

2002-08-21 Thread Brian May
On Wed, Aug 21, 2002 at 11:18:09AM -0600, Jason Gunthorpe wrote:
 If you do apt-cache show kerberos4kth1 after installing and look very
 carefully you will see that the two listed 1.1-11-2 stanzas are subtly
 different. The problem is that your package file does not
 accurately reflect the contents of the .deb. That is all.

I claim though that it it should be identical to the .deb file, because
I ran dpkg-scanpackages on it myself, and haven't updated anything
since (besides, if I had updated something, the MD5sum check would fail
wouldn't it?)

Packages entry:

Package: kerberos4kth1
Version: 1.1-11-2
Priority: optional
Section: net
Maintainer: Mikael Andersson [EMAIL PROTECTED]
Architecture: all
Filename: ./pool/krb4/kerberos4kth1_1.1-11-2_all.deb
Size: 57786
MD5sum: 330d49310a3264f037875e06a1328458
Description: Dummy library package for Kerberos4 From KTH.
 This is a dummy package. It should be safe to remove it.
 installed-size: 76
 source: krb4

[504] [snoopy:unstable:bam] /home/ftp/pub/debian dpkg -I 
./pool/krb4/kerberos4kth1_1.1-11-2_all.deb
 new debian package, version 2.0.
 size 57786 bytes: control archive= 701 bytes.
 288 bytes,10 lines  control  
 229 bytes, 3 lines  md5sums  
 281 bytes, 9 lines   *  postinst #!/bin/sh
 208 bytes, 7 lines   *  prerm#!/bin/sh
 Package: kerberos4kth1
 Version: 1.1-11-2
 Section: net
 Priority: optional
 Architecture: all
 Installed-Size: 76
 Maintainer: Mikael Andersson [EMAIL PROTECTED]
 Source: krb4
 Description: Dummy library package for Kerberos4 From KTH.
  This is a dummy package. It should be safe to remove it.

What is different?

I wildly speculate that apt-get is making the assumption that package
version 1.1-11-2 will be exactly the same regardless of where it was
downloaded from, and is comparing the deb file against the Packages
entry from the unused/wrong source (priority==-1).
-- 
Brian May [EMAIL PROTECTED]




Re: apt-get wants to upgrade package to same version?

2002-08-21 Thread Jason Gunthorpe

On Thu, 22 Aug 2002, Brian May wrote:

 I ran dpkg-scanpackages on it myself, and haven't updated anything
 since (besides, if I had updated something, the MD5sum check would fail
 wouldn't it?)

Nope.
 
 Description: Dummy library package for Kerberos4 From KTH.
  This is a dummy package. It should be safe to remove it.
  installed-size: 76
  source: krb4

vs
 
  Description: Dummy library package for Kerberos4 From KTH.
   This is a dummy package. It should be safe to remove it.
 
 What is different?

The description?

Looks like dpkg-scanpackages foobar'd you.

Jason




Re: apt-get wants to upgrade package to same version?

2002-08-21 Thread Brian May
On Wed, Aug 21, 2002 at 03:44:54PM -0600, Jason Gunthorpe wrote:
  Description: Dummy library package for Kerberos4 From KTH.
   This is a dummy package. It should be safe to remove it.
   installed-size: 76
   source: krb4

If you mean the spacing is different, that is my fault (I use vim in
mutt, and it automatically indents stuff pasted in using X... Arrghhh...
Need to disable that by default in my config I think).

Package: kerberos4kth1
Version: 1.1-11-2
Priority: optional
Section: net
Maintainer: Mikael Andersson [EMAIL PROTECTED]
Architecture: all
Filename: ./pool/krb4/kerberos4kth1_1.1-11-2_all.deb
Size: 57786
MD5sum: 330d49310a3264f037875e06a1328458
Description: Dummy library package for Kerberos4 From KTH.
 This is a dummy package. It should be safe to remove it.
installed-size: 76
source: krb4

vs

[504] [snoopy:unstable:bam] /home/ftp/pub/debian dpkg -I
./pool/krb4/kerberos4kth1_1.1-11-2_all.deb
 new debian package, version 2.0.
 size 57786 bytes: control archive= 701 bytes.
 288 bytes,10 lines  control  
 229 bytes, 3 lines  md5sums  
 281 bytes, 9 lines   *  postinst #!/bin/sh
 208 bytes, 7 lines   *  prerm#!/bin/sh
 Package: kerberos4kth1
 Version: 1.1-11-2
 Section: net
 Priority: optional
 Architecture: all
 Installed-Size: 76
 Maintainer: Mikael Andersson [EMAIL PROTECTED]
 Source: krb4
 Description: Dummy library package for Kerberos4 From KTH.
  This is a dummy package. It should be safe to remove it.

The description looks the same now:

Description: Dummy library package for Kerberos4 From KTH.
 This is a dummy package. It should be safe to remove it.
Description: Dummy library package for Kerberos4 From KTH.
 This is a dummy package. It should be safe to remove it.
-- 
Brian May [EMAIL PROTECTED]




Re: apt-get wants to upgrade package to same version?

2002-08-20 Thread Jason Gunthorpe

On Wed, 21 Aug 2002, Brian May wrote:

 Can't apt realize that if it is going to install a package from source
 X, it should use the Packages entry from source X too?

The entires in Packages files and those in the .deb must match exactly
(ie byte for byte), otherwise it sees them as different packages. Since
dpkg manipulates the status file and only has information from the .deb
there is no way to force a particular contents into the status file.

Jason