[Solved] Mixing LMDE and SID, problems with APT preferences

Archived topics about LMDE 1 and LMDE 2
Locked
c.monty

[Solved] Mixing LMDE and SID, problems with APT preferences

Post by c.monty »

Hi!

I have slightly modified APT Preferences file official-package-repositories.pref

Code: Select all

[130]user@pc1 ~ $ cat /etc/apt/preferences.d/official-package-repositories.pref 
Package: *
Pin: release o=linuxmint
Pin-Priority: 700

Package: *
Pin: origin packages.linuxmint.com
Pin-Priority: 700

Package: *
Pin: release o=Debian,a=testing
#Pin: release o=Debian,a=wheezy
Pin-Priority: 600

Package: *
Pin: release o=Debian,a=wheezy-backports
Pin-Priority: 500

Package: *
Pin: release o=Ubuntu
Pin-Priority: 400

Package: *
Pin: release o=Debian,a=unstable
#Pin: release o=Debian,a=sid
Pin-Priority: 100
However, the Pin-Priority is not considered when installing software packages:

Code: Select all

user@pc1 ~ $ apt-cache policy network-manager
network-manager:
  Installiert:           0.9.8.0-5
  Installationskandidat: 0.9.10.0-1
  Versionstabelle:
     0.9.10.0-1 0
        500 http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ sid/main i386 Packages
 *** 0.9.8.0-5 0
        500 http://linuxmint-apt.killerhorse.eu/debian/latest/ testing/main i386 Packages
        100 /var/lib/dpkg/status
     0.9.4.0-10 0
        500 http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy/main i386 Packages
Here, I would have expected the corresponding Pin-Priority = 100 for sid. Instead Pin-Priority = 500 for sid is used.

How comes this?

THX
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
killer de bug

Re: Mixing LMDE and SID, problems with APT preferences

Post by killer de bug »

Can you please use the same name in the preference file and in the sources.list file (sid in both or unstable in both).

And can you post the result of

Code: Select all

inxi -r
please? I am really afraid by this priority given to Ubuntu to be honest.
kurotsugi

Re: Mixing LMDE and SID, problems with APT preferences

Post by kurotsugi »

Code: Select all

Package: *
Pin: release a=unstable
Pin-Priority: 50
this one always work on most cases. I hope you really know what you did on your system. I'd recommend you also change these lines.

Code: Select all

Package: *
Package: *
Pin: release o=Ubuntu
Pin-Priority: 400

#change it into
Package: *
Pin: origin <the ubuntu's repo address>
#lower the priority to 100 or lower
Pin-Priority: 100
it will avoid install ubuntu packages unless you told apt to do so with "-t" option.
c.monty

Re: Mixing LMDE and SID, problems with APT preferences

Post by c.monty »

killer de bug wrote:Can you please use the same name in the preference file and in the sources.list file (sid in both or unstable in both).
done

Code: Select all

user@pc1 ~ $ cat /etc/apt/preferences.d/official-package-repositories.pref 
Package: *
Pin: release o=linuxmint
Pin-Priority: 700

Package: *
Pin: origin packages.linuxmint.com
Pin-Priority: 700

Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 600

Package: *
Pin: release o=Debian,a=wheezy-backports
Pin-Priority: 500

Package: *
Pin: release o=Ubuntu
Pin-Priority: 400

Package: *
Pin: release o=Debian,a=sid
Pin-Priority: 100
killer de bug wrote:And can you post the result of

Code: Select all

inxi -r
please? I am really afraid by this priority given to Ubuntu to be honest.
sure

Code: Select all

user@pc1 ~ $ inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list.d/debian.list
           deb http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy main non-free contrib
           deb-src http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy main non-free contrib
           deb http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy-backports main non-free contrib
           deb-src http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy-backports main non-free contrib
           deb http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ sid main non-free contrib
           deb-src http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ sid main non-free contrib
           Active apt sources in file: /etc/apt/sources.list.d/removed.list
           deb http://archive.removed/ubuntu raring-removed apps
           Active apt sources in file: /etc/apt/sources.list.d/hstr.list
           deb http://www.clfh.de/debian wheezy main
           deb-src http://www.clfh.de/debian wheezy main
           Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           deb http://packages.linuxmint.com debian main upstream import
           deb http://linuxmint-apt.killerhorse.eu/debian/latest/ testing main contrib non-free
           deb http://linuxmint-apt.killerhorse.eu/debian/latest/security testing/updates main contrib non-free
           deb http://linuxmint-apt.killerhorse.eu/debian/latest/multimedia testing main non-free
           deb http://extra.linuxmint.com debian main
The correction in /etc/apt/preferences.d/official-package-repositories.pref doesn't have any impact, though.

Code: Select all

user@pc1 ~ $ apt-cache policy network-manager
network-manager:
  Installiert:           0.9.8.0-5
  Installationskandidat: 0.9.8.0-5
  Versionstabelle:
     0.9.10.0-1 0
        500 http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ sid/main i386 Packages
 *** 0.9.8.0-5 0
        600 http://linuxmint-apt.killerhorse.eu/debian/latest/ testing/main i386 Packages
        100 /var/lib/dpkg/status
     0.9.4.0-10 0
        500 http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy/main i386 Packages
user@pc1 ~ $ apt-cache policy cinnamon
cinnamon:
  Installiert:           2.0.14+lmde
  Installationskandidat: 2.0.14+lmde
  Versionstabelle:
 *** 2.0.14+lmde 0
        700 http://packages.linuxmint.com/ debian/main i386 Packages
        100 /var/lib/dpkg/status
     1.7.4-2.2+b2 0
        500 http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ sid/main i386 Packages
kurotsugi

Re: Mixing LMDE and SID, problems with APT preferences

Post by kurotsugi »

check whether if you have duplicated setting in /etc/apt
killer de bug

Re: Mixing LMDE and SID, problems with APT preferences

Post by killer de bug »

c.monty wrote: The correction in /etc/apt/preferences.d/official-package-repositories.pref doesn't have any impact, though.
That's normal!
Your preference file is for official-package-repositories

Code: Select all

/etc/apt/preferences.d/official-package-repositories.pref
And your repo shows that official-package-repositories has only LMDE repo:

Code: Select all

           Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           deb http://packages.linuxmint.com debian main upstream import
           deb http://linuxmint-apt.killerhorse.eu/debian/latest/ testing main contrib non-free
           deb http://linuxmint-apt.killerhorse.eu/debian/latest/security testing/updates main contrib non-free
           deb http://linuxmint-apt.killerhorse.eu/debian/latest/multimedia testing main non-free
           deb http://extra.linuxmint.com debian main
Preferences about Debian repo are irrelevant here. And thus don't apply.

Your Debian repo are here:

Code: Select all

  Active apt sources in file: /etc/apt/sources.list.d/debian.list
           deb http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy main non-free contrib
           deb-src http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy main non-free contrib
           deb http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy-backports main non-free contrib
           deb-src http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ wheezy-backports main non-free contrib
           deb http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ sid main non-free contrib
           deb-src http://ftp.informatik.rwth-aachen.de/ftp/pub/Linux/debian/ sid main non-free contrib
And for this file, you don't have any preferences set. Thus normal ones apply.

For this stuff, I may be wrong, but if it's for Ubuntu, I would be cautious :)

Code: Select all

Active apt sources in file: /etc/apt/sources.list.d/removed.list
           deb http://archive.removed/ubuntu raring-removed apps
kurotsugi

Re: Mixing LMDE and SID, problems with APT preferences

Post by kurotsugi »

That's normal!
Your preference file is for official-package-repositories
no it doesn't. apt doesn't work in that way. you can rename the files into <whatever you like>.pref and it should work globally.
c.monty

Re: Mixing LMDE and SID, problems with APT preferences

Post by c.monty »

I disagree, too.

The usage of APT and preferences is independent of the file name used.
kurotsugi

Re: Mixing LMDE and SID, problems with APT preferences

Post by kurotsugi »

if you don't have any other pref files. the source of the error is "Pin: release o=Debian,a=wheezy-backports". your pref is confusing the apt. you need to specify between debian's branch and delete o=Debian from all pref codes. the correct entry should be something like this

Code: Select all

Package: *
Pin: release a=wheezy #or stable
Pin-Priority: 50

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

Package: *
Pin: release a=unstable
Pin-Priority: 50
Locked

Return to “LMDE Archive”