Is it possible to do something like this:
Package: ghc6*
Pin: release a=unstable
Pin-Priority: 701
Package: libghc6*
Pin: release a=unstable
Pin-Priority: 701
and have it actually do what I want?
i.e. can you pin on a regex or a glob that matches a name?
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 wildcards
Re: Apt pinning wildcards
No you can't. If you could I wouldn't need this:
Package: clamav clamav-base clamav-daemon clamav-docs clamav-freshclam libclamav6
Pin: release a=unstable,o=Debian
Pin-Priority: 900
- craigevil
- Posts: 5391
- Joined: 2006-09-17 03:17
- Location: heaven
- Has thanked: 28 times
- Been thanked: 39 times
Re: Apt pinning wildcards
You can't use wildcards for a package, but if you are running testing and just want to hold all packages from unstable you can something like:
Package: *
Pin: release a=experimental
Pin-Priority: 101
I do that when I have packages from exp installed and it works just fine.
Package: *
Pin: release a=experimental
Pin-Priority: 101
I do that when I have packages from exp installed and it works just fine.
Raspberry PI 400 Distro: Raspberry Pi OS Base: Debian Sid Kernel: 5.15.69-v8+ aarch64 DE: MATE Ram 4GB
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list
-
- Posts: 5
- Joined: 2009-10-23 17:59
Re: Apt pinning wildcards
So I have both unstable and stable pinned lower than testing. however, when it comes to haskell, I would like to have unstable packages to be the default.
Re: Apt pinning wildcards
A minor pain to setup, since there's a fair number of packages involved. But it's only a one time setup, with possibly some maintenance down the road if some packages change names.rpglover64 wrote:So I have both unstable and stable pinned lower than testing. however, when it comes to haskell, I would like to have unstable packages to be the default.
Re: Apt pinning wildcards
This might help you a bit
You may want to think about making the output a separate file and dropping it into /etc/apt/preferences.d/.
The result will require a bit more editing. For one the "blank lines" may actually contain spaces, which will make apt-cache (at least) unhappy. You'll also get some not found packages if they don't exist in unstable. How to correct those problems I'll leave as an exercise for you to figure out (it's not difficult to solve either of those).
Code: Select all
aptitude search ~n"haskell~|ghc6" -F"%p"|sed 's?\([^ ]*\)?Package: \1\nPin: release a=unstable\nPin-Priority: 701\n?'
The result will require a bit more editing. For one the "blank lines" may actually contain spaces, which will make apt-cache (at least) unhappy. You'll also get some not found packages if they don't exist in unstable. How to correct those problems I'll leave as an exercise for you to figure out (it's not difficult to solve either of those).