[H-GEN] Apt pinning - Is there a guru in the house?

Gary Curtis gazilla at gmail.com
Thu Jul 2 08:51:59 EDT 2009


On Thu, Jul 2, 2009 at 02:17, Anthony Towns<aj at erisian.com.au> wrote:
> On Wed, Jul 01, 2009 at 12:20:52PM +1000, Gary Curtis wrote:
>> What am I missing here?
>
> Globs aren't supported in the Package: field, just package names or "*". So:
>
>    Package: *
>    Pin: release o=Ubuntu
>    Pin-Priority: -1
>
> would stop you from installing anything from Ubuntu sources, and afaict:
>
>    Package: mono-common
>    Pin: version *
>    Pin-Priority: -1
>
> should stop you from installing mono-common, but in reality doesn't seem
> to actually do anything useful at all. If it did, something like:
>
>    (
>     echo Package: $(apt-cache search mono-|grep ^mono-|cut -d\  -f1)
>     echo Pin: version *
>     echo Pin-Priority: -1001
>    ) >/etc/apt/preferences
>
> would probably be as close as you could get to what you asked for.
> Cheers,
> aj

So I changed /etc/apt/preferences to...

Package: mono-common mono-runtime mono-gac mono-jit mono-utils libmono0
Pin: version *
Pin-Priority: -1001

...and now apt-cache policy gives me this...

# apt-cache policy
...
Pinned packages:
     libmono0 -> 2.0.1-4
     mono-common -> 2.0.1-4
     mono-gac -> 2.0.1-4
     mono-jit -> 2.0.1-4
     mono-utils -> 2.0.1-4
     mono-runtime -> 2.0.1-4

# apt-cache policy mono-common
mono-common:
  Installed: (none)
  Candidate: 2.0.1-4
  Package pin: 2.0.1-4
  Version table:
     2.0.1-4 -1001
        500 http://eureka.local jaunty/main Packages
        100 /var/lib/dpkg/status

...and every attempt to install f-spot SUCCEEDS!

I have tried changing the priority to just -1. No help.
I have tried other globs (e.g. 1.* 0* ) in the version.
No help, but the output of apt-cache policy shows...

# apt-cache policy
...
Pinned packages:
     libmono0 -> (not found)
     mono-common -> (not found)
     mono-gac -> (not found)
     mono-jit -> (not found)
     mono-utils -> (not found)
     mono-runtime -> (not found)

I'm guessing at this point that the stated functionality of
using negative values for Pin-Priority is just plain broken.

I was really hoping to avoid the conflicting package solution.

Gaz



More information about the General mailing list