Re: Настройка apt pinning
On 2016-01-22, Tim Sattarov wrote: >> У меня вопрос - разве ранее было не так? >> >> > на то оно News, чтобы рассказывать что *изменилось* с предыдущих версий > логично предположить, что нет, так не было, это новое поведение Я к тому что документация и ранее говорила что пин применяется к версиям в том числе. Попробуйте описать ситуацию когда пин применяется только к пакету - как же тогда выделять версию для установки? И в дифе на документации ничего соответствующего нету. По итогу можно сказать что то поменялось, ченджлог *понятный только разрабу* и если что то не соответствует документации - требуется баг-репорт. Правда если Вы понимаете в чем суть изменений и что изменилось с прошлога раза - можно привести демонстрационные примеры. Пока не увидишь своими глазами - не поймешь. -- http://defun.work/
Re: Настройка apt pinning
On 21/01/16 03:00 PM, Oleksandr Gavenko wrote: > On 2016-01-21, Tim Sattarov wrote: > >> Не оно ? >> >> zless /usr/share/doc/apt/NEWS.Debian.gz >> >> apt (1.1~exp9) experimental; urgency=medium >> >> A new algorithm for pinning has been implemented, it now assigns a >> pin priority to a version instead of assigning a pin to a package. >> >> This might break existing corner cases of pinning, if they use multiple >> pins involving the same package name or patterns matching the same >> package name, but should overall lead to pinning that actually works >> as intended and documented. > У меня вопрос - разве ранее было не так? > > на то оно News, чтобы рассказывать что *изменилось* с предыдущих версий логично предположить, что нет, так не было, это новое поведение
Re: Настройка apt pinning
On 2016-01-21, Tim Sattarov wrote: > Не оно ? > > zless /usr/share/doc/apt/NEWS.Debian.gz > > apt (1.1~exp9) experimental; urgency=medium > > A new algorithm for pinning has been implemented, it now assigns a > pin priority to a version instead of assigning a pin to a package. > > This might break existing corner cases of pinning, if they use multiple > pins involving the same package name or patterns matching the same > package name, but should overall lead to pinning that actually works > as intended and documented. У меня вопрос - разве ранее было не так? Как можно привязыать пин к пакету безотносительно версии? В документации apt_preferences(5): The Effect of APT Preferences The specific form assigns a priority (a "Pin-Priority") to one or more specified packages with a specified version or version range. The general form assigns a priority to all of the package versions in a given distribution (that is, to all the versions of packages that are listed in a certain Release file) or to all of the package versions coming from a particular Internet site, as identified by the site's fully qualified domain name. Разница между старой и новой - о изменении умалчивает: $ MANWIDTH=78 man apt_preferences >old $ MANWIDTH=78 man ./apt_preferences.5.gz >new $ diff -u old new --- old 2016-01-21 21:52:41.860006641 +0200 +++ new 2016-01-21 21:52:52.920136753 +0200 @@ -74,12 +74,12 @@ like the Debian backports archive since squeeze-backports. priority 500 - to the versions that are not installed and do not belong to the - target release. + to the versions that do not belong to the target release. priority 990 - to the versions that are not installed and belong to the target - release. + to the versions that belong to the target release. + The highest of those priorities whose description matches the version + is assigned to the version. If the target release has not been specified then APT simply assigns priority 100 to all installed package versions and priority 500 to @@ -194,6 +194,11 @@ Pin: release a=stable, v=8 Pin-Priority: 500 + The effect of the comma operator is similar to an "and" in logic: All + conditions must be satisfied for the pin to match. There is one + exception: For any type of condition (such as two "a" conditions), + only the last such condition is checked. + Regular expressions and glob(7) syntax APT also supports pinning by glob(7) expressions, and regular expressions surrounded by slashes. For example, the following example @@ -203,7 +208,7 @@ slashes). Package: gnome* /kde/ - Pin: release n=experimental + Pin: release a=experimental Pin-Priority: 500 The rule for those expressions is that they can occur anywhere where @@ -251,11 +256,15 @@ P < 0 prevents the version from being installed - If any specific-form records match an available package version then - the first such record determines the priority of the package version. - Failing that, if any general-form records match an available package - version then the first such record determines the priority of the - package version. + P = 0 + has undefined behaviour, do not use it. + + The first specific-form record matching an available package version + determines the priority of the package version. Failing that, the + priority of the package is defined as the maximum of all priorities + defined by generic-form records matching the version. Records defined + using patterns in the Pin field other than "*" are treated like + specific-form records. For example, suppose the APT preferences file contains the three records presented earlier: @@ -518,4 +527,4 @@ 1. APT bug page http://bugs.debian.org/src:apt -APT 1.0.10.209 June 2012 APT_PREFERENCES(5) +APT 1.1.10 15 August 2015 APT_PREFERENCES(5) -- http://defun.work/
Re: Настройка apt pinning
On 20/01/16 07:52 AM, Илья Валеев wrote: > До недавнего времени все работало как задумано, когда оно полетело к > чертям, не вспомню. В частности, пакет libsqlcipher0 был установлен > именно из бэкпортов благодаря написанному правилу. > > Debian 8 x64 со всеми обновлениями. Весь интернет уже исползал, ман > читал. Даже перезагружался. > > Как решить проблему? > Не оно ? zless /usr/share/doc/apt/NEWS.Debian.gz apt (1.1~exp9) experimental; urgency=medium A new algorithm for pinning has been implemented, it now assigns a pin priority to a version instead of assigning a pin to a package. This might break existing corner cases of pinning, if they use multiple pins involving the same package name or patterns matching the same package name, but should overall lead to pinning that actually works as intended and documented. -- Julian Andres Klode Mon, 17 Aug 2015 14:45:17 +0200
Re: Настройка apt pinning
Спасибо за ответ! Между foo и bar стоит один пробел. Еще не затруднит ли подсказать: верна ли моя концепция написания конфига? Ничего я там (вроде апдейтов безопасности или еще чего) не сломал? -- Идентификатор открытого ключа: 1D38C8C9 Отпечаток: 6210 01B6 A34E E490 A9E4 87DD 841D 0ABE 1D38 C8C9
Re: Настройка apt pinning
On 2016-01-20, Илья Валеев wrote: > Package: foo bar > Pin: origin "example.com" > Pin-Priority: 990 > > Package: * > Pin: origin "example.com" > Pin-Priority: -10 > > Выполнил apt update > apt-cache policy показывает, что у foo и bar из репозитория example.com > приоритет -10. Если убрать строки, устанавливающие приоритет -10, то > приоритет будет 500, а не 990, как я указал в конфиге. Имя пакета > указано корректно, 100%. Пишите баг на пакет apt. Я просмотрел apt_preferences(5) на предмет: * порядок применения правил: If any specific-form records match an available package version then the first such record determines the priority of the package version. Failing that, if any general-form records match an available package version then the first such record determines the priority of the package version. * несколько пакетов в одном правиле: The specific form assigns a priority (a "Pin-Priority") to one or more specified packages with a specified version or version range. Multiple packages can be separated by spaces. Все cходится с Вашим подозрением. Кстати - между foo и bar - spaces (в письме - так)? -- http://defun.work/
Настройка apt pinning
Доброго дня! Прописал в /etc/apt/preferences такие строки: Package: foo bar Pin: origin "example.com" Pin-Priority: 990 Package: * Pin: origin "example.com" Pin-Priority: -10 Выполнил apt update apt-cache policy показывает, что у foo и bar из репозитория example.com приоритет -10. Если убрать строки, устанавливающие приоритет -10, то приоритет будет 500, а не 990, как я указал в конфиге. Имя пакета указано корректно, 100%. Полное содержимое /etc/apt/preferences: Package: qtox libavformat-tox56 libavdevice-tox56 libavcodec-tox56 libavutil-tox54 libswscale-tox3 Pin: origin "pkg.tox.chat" Pin-Priority: 991 Package: * Pin: origin "pkg.tox.chat" Pin-Priority: -10 Package: foo bar Pin: origin "example.com" Pin-Priority: 990 Package: * Pin: origin "example.com" Pin-Priority: -10 Package: * Pin: release n=jessie Pin-Priority: 500 Package: libsqlcipher0 Pin: release n=jessie-backports Pin-Priority: 999 Package: * Pin: release n=jessie-backports Pin-Priority: -10 Package: * Pin: release n=jessie-updates Pin-Priority: 500 Ничего не меняется если: - запрещающие строки перенести выше разрешающих; - убрать кавычки, обрамляющие example.com; - после "Package:"оставить всего один пакет. Если интересующие меня строки перенести в конец файла, то приоритет всегда будет 500. Цель: чтобы с example.com ставились пакеты foo и bar (приоритет выше чем у остальных репозиториев), а больше с example.com даже при желании ничего не ставилось. До недавнего времени все работало как задумано, когда оно полетело к чертям, не вспомню. В частности, пакет libsqlcipher0 был установлен именно из бэкпортов благодаря написанному правилу. Debian 8 x64 со всеми обновлениями. Весь интернет уже исползал, ман читал. Даже перезагружался. Как решить проблему?