Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

apt pinning forces to testing packages

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
User avatar
modo72
Posts: 26
Joined: 2012-02-18 13:28
Has thanked: 1 time

apt pinning forces to testing packages

#1 Post by modo72 »

Hello out there, I installed a pure SID system on a VM to have a test environment. On my main system I use testing as the default with some packages from Sid and I do this of course with pinning. I want to add the other repos stable/testing and oldstable as well into my repository and reused my preferences file now with unstable as default:

Code: Select all

Package: *
Pin: release n=unstable
Pin-Priority: 1000

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

Package: *
Pin: release n=stable
Pin-Priority: 300

Package: *
Pin: release n=oldstable
Pin-Priority: 50

Package: *
Pin: release n=oldoldstable
Pin-Priority: 20

Package: *
Pin: release o=Debian
Pin-Priority: -10

Now unstable has the highest priority, which it's has anyway, because it has always the latest version. But this system leads to "testing as default"? Which is really odd. Where is the flaw?

Thanks

BR /Christian

User avatar
fabien
Forum Helper
Forum Helper
Posts: 664
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 61 times
Been thanked: 153 times

Re: apt pinning forces to testing packages

#2 Post by fabien »

According to 'man 5 apt_preferences' testing is the only correctly defined suite in your configuration file:
the Archive: or Suite: line
names the archive to which all the packages in the directory tree belong. For example, the line "Archive: stable" or "Suite: stable" specifies that all of the packages in the directory tree below the parent of the Release file are in a stable archive. Specifying this value in the APT preferences file would require the line:

Pin: release a=stable

the Codename: line
names the codename to which all the packages in the directory tree belong. For example, the line "Codename: bookworm" specifies that all of the packages in the directory tree below the parent of the Release file belong to a version named bookworm. Specifying this value in the APT preferences file would require the line:

Pin: release n=bookworm
in other words: use 'a=suite' or 'n=codename'

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2107
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 230 times

Re: apt pinning forces to testing packages

#3 Post by FreewheelinFrank »

I don't use pinning, but I'll take a guess.

Code: Select all

Pin release n=
refers to a codename (Sid, Bookworm, Bullseye etc) and

Code: Select all

Pin release a=
refers to a suite (Unstable, Testing, Stable etc).

So

Code: Select all

Pin: release n=unstable
is incorrect and ignored but

Code: Select all

Pin: release a=testing
is correct and applied.

https://difyel.com/linux/etc/apt/preferences/

User avatar
modo72
Posts: 26
Joined: 2012-02-18 13:28
Has thanked: 1 time

Re: apt pinning forces to testing packages

#4 Post by modo72 »

Thank you all. I didn't see that I messed up the config file with the n options instead of keeping everything with a

Post Reply