[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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.2                    09 June 2012              APT_PREFERENCES(5)
  +APT 1.1.10                     15 August 2015             APT_PREFERENCES(5)


-- 
http://defun.work/


Reply to: