Web lists-archives.com

Re: want pinning with examples to prevent unwanted package(s) from being installed




On 8/31/17, Cindy-Sue Causey <butterflybytes@xxxxxxxxx> wrote:
> On 8/31/17, Felix Miata <mrmazda@xxxxxxxxxxxxx> wrote:
>> Dejan Jocic composed on 2017-08-31 08:51 (UTC+0200):
>>
>>> Felix Miata wrote:
>>
>>>> Over an hour I've been searching in vain, apparently using broken
>>>> Google-fu, for
>>>> something using examples to explain how to prevent unwanted package(s)
>>>> from
>>>> being installed via pinning when apt-mark's hold is being disregarded.
>>>> Anyone
>>>> familiar with an URL that would do this?
>>
>>>> In openSUSE, it's a simple process:
>>
>>>> 	zypper al unwantedpackagename[version]
>>
>>>> That's all there is to it, other than it also works with wildcards.
>>
>>> Not sure that I understand, because man page gives enough examples.
>>
>> To start with, the question "which man page" needed to be solved.
>>
>>> Like:
>>
>>>  P < 0
>>>       prevents the version from being installed
>>
>>> So, for preventing some package to be installed:
>>
>>> Package: somepackage
>>> Pin: origin ""
>>> Pin-Priority: -1
>>
>> I never saw an example that wasn't part of a group that included multiple
>> release names, none with the null string for origin.
>>
>>> That will prevent all packages with somepackage name to be installed, no
>>> matter of origin. In Pin section, you can use release instead, if you
>>> want to restrict just specific release, but that is all well explained
>>> in man page of apt_preferences with lots of examples.
>>
>> Now that I see that apt_preferences is the relevant doc, I don't see it
>> as
>> "well" explained. "The file" isn't given a name. There is no "file" that
>> seems
>> applicable to locking anything in in /etc/apt/, though there is an empty
>> directory "/etc/apt/preferences.d/", which to me doesn't imply anything
>> to
>> do
>> with locking.
>>
>> I gave it several stabs. I created /etc/apt/preferences.d/1grub.pref that
>> eventually reached the following state:
>>
>> Package: grub
>> Pin: origin ""
>> Pin-Priority: -1
>>
> < snipped for brevity >
>>
>> I'm still getting told the following will be installed:
>> grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common
>> os-prober
>>
>> This is a multiboot system, so no space-wasting, updates time-wasting
>> bootloader
>> is needed or wanted on the installation making this insistence.
>
>
> I just tracked down a sample I saved for myself during that recent
> time period where wpasupplicant was being a pain:
>
> Package: wpasupplicant
> Pin: version 2.5-2+v2.4-3+b1
> Pin-Priority: 1001
>
> My apologies, but I'm not able to remember *why* I did it exactly like
> that. I'm thinking maybe it was specifically "pinned" to that version
> number... maybe.


A couple references that may or may not help. I am, yes, noting that
they potentially feel a little outdated.

* Debian Cheat Sheet; Carlo Wood, March 2007
  https://web.archive.org/web/20121024134944/http://carlo17.home.xs4all.nl/howto/debian.html#errata

* AptPreferences; Debian Wiki; last modified ~2017.06.30
  https://wiki.debian.org/AptPreferences

Maybe one or the other has something that will help yet more. I'm
still not remembering why I used "1001" when other numbers are
equally, if not more so, referenced online. An Internet search for
"1001" coincidentally pointed me straight to Stretch's manpages:

https://manpages.debian.org/stretch/apt/apt_preferences.5.en.html

Stretch and thus Stretch manpages are what I was using at that moment
when I successfully pinned wpasupplicant so maybe that's where I
picked up that detail.

That Archive.org page is being cantankerous for me. You're looking for
the heading of "Pinning Errata" if that one doesn't immediately leap
down to that heading.

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *