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

Archived topics about LMDE 1
Forum rules
c.monty
Level 1
Level 1
Posts: 38
Joined: Tue Apr 26, 2011 4:23 am

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

Postby c.monty » Sat Jul 12, 2014 9:02 am

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 c.monty on Wed Jul 16, 2014 4:27 pm, edited 1 time in total.

User avatar
killer de bug
Level 13
Level 13
Posts: 4665
Joined: Tue Jul 08, 2008 1:49 pm
Location: Graz, Austria

Re: Mixing LMDE and SID, problems with APT preferences

Postby killer de bug » Sat Jul 12, 2014 3:19 pm

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.
Image
If it ain't broke, fix it until it is.

kurotsugi
Level 6
Level 6
Posts: 1041
Joined: Fri Jan 25, 2013 3:54 am

Re: Mixing LMDE and SID, problems with APT preferences

Postby kurotsugi » Sun Jul 13, 2014 9:12 am

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
Level 1
Level 1
Posts: 38
Joined: Tue Apr 26, 2011 4:23 am

Re: Mixing LMDE and SID, problems with APT preferences

Postby c.monty » Sun Jul 13, 2014 9:13 am

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/getdeb.list
           deb http://archive.getdeb.net/ubuntu raring-getdeb 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
Level 6
Level 6
Posts: 1041
Joined: Fri Jan 25, 2013 3:54 am

Re: Mixing LMDE and SID, problems with APT preferences

Postby kurotsugi » Sun Jul 13, 2014 9:20 am

check whether if you have duplicated setting in /etc/apt

User avatar
killer de bug
Level 13
Level 13
Posts: 4665
Joined: Tue Jul 08, 2008 1:49 pm
Location: Graz, Austria

Re: Mixing LMDE and SID, problems with APT preferences

Postby killer de bug » Sun Jul 13, 2014 9:30 am

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/getdeb.list
           deb http://archive.getdeb.net/ubuntu raring-getdeb apps
Image
If it ain't broke, fix it until it is.

kurotsugi
Level 6
Level 6
Posts: 1041
Joined: Fri Jan 25, 2013 3:54 am

Re: Mixing LMDE and SID, problems with APT preferences

Postby kurotsugi » Sun Jul 13, 2014 9:47 am

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
Level 1
Level 1
Posts: 38
Joined: Tue Apr 26, 2011 4:23 am

Re: Mixing LMDE and SID, problems with APT preferences

Postby c.monty » Sun Jul 13, 2014 11:17 am

I disagree, too.

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

kurotsugi
Level 6
Level 6
Posts: 1041
Joined: Fri Jan 25, 2013 3:54 am

Re: Mixing LMDE and SID, problems with APT preferences

Postby kurotsugi » Sun Jul 13, 2014 2:29 pm

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


Return to “Archive”

Who is online

Users browsing this forum: No registered users and 6 guests