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

Making APT prefer locally compiled packages



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is a little confusing, and please forgive me if the answer is out there
somewhere, but I haven't been able to find it.  Here's what happened:

1.  I installed pentium-builder and set it for "athlon-xp" so it will
compile for my CPU.
2.  $ apt-src -i install nvidia-glx
3.  $ apt-cache policy nvidia-glx

nvidia-glx:
  Installed: 1.0.8774-3
  Candidate: 1.0.8774-3
  Version table:
     1.0.8774-3 0
        800 http://ftp.us.debian.org unstable/non-free Packages
 *** 1.0.8774-3 0
        100 /var/lib/dpkg/status

Notice that even though the versions are the same, it's seeing them as
different packages.


$ cat /etc/apt/preferences
Package: *
Pin: release o=""
Pin-Priority: 900

Package: *
Pin: release a=testing
Pin-Priority: 900

Package: *
Pin: release a=unstable
Pin-Priority: 800


That's straight out of the apt_preferences man page.  Didn't work.  So
finally I found a bug report on apt, bug #351056, that pointed me to the
MD5sum of the packages:


$ apt-cache show nvidia-glx
...
Suggests: nvidia-settings, nvidia-kernel-source (>= 1.0.8774)
Conflicts: nvidia-glx-src
Filename:
pool/non-free/n/nvidia-graphics-drivers/nvidia-glx_1.0.8774-3_i386.deb
Size: 3293444
MD5sum: 6e393e5d637a15096df1c19935db2567
SHA1: 00dcc698272d2a76594cd9e4a3afb57fce9a059e
SHA256: 5a8267d909944e19aec748ad5ab4e63ec769dbe73a03ff96007315a4ef0a1e80
Description: NVIDIA binary XFree86 4.x driver
...
Suggests: nvidia-settings, nvidia-kernel-source (>= 1.0.8774)
Conflicts: nvidia-glx-src
Conffiles:
 /etc/default/nvidia-glx 81be77103c93a6a52273ba4d0ce8006b
 /etc/init.d/nvidia-glx 58f85e292ae2141c64b6490e19fc3f91
Description: NVIDIA binary XFree86 4.x driver


Notice that the listing for the second package, the one that's currently
installed, has no MD5sum, or SHA sums.  (I'm not sure why it doesn't have
any, though I'm guessing it's because I just installed the package with
dpkg and didn't create a local repository.)

But even if it had them, I still think it would be a problem, because I
compiled it with "-mcpu=athlon-xp", so the binaries should be different.

So, how do I get apt to prefer the local, already-installed package when
it's the same version number, but the MD5sum may differ or even be
nonexistant for the already-installed package?

(And, of course, this is not just a problem for the nvidia-glx package, but
any others as well.)

(And I know about apt-build, but it has its own set of problems that
sometimes forces you to use other ways of compiling packages.)

Thanks for any help.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFF35+5+GdyTDsrJsRAtNAAKCWDpvZI5kuVE7wxCTHRH49iYYqUQCdEb2u
e4PTZ5jrHBoTKcoIB2nbNfQ=
=863k
-----END PGP SIGNATURE-----



Reply to: