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

Bug#554773: cupt: Wrong computation of preferences/pinning

Eugene V. Lyubimkin a écrit :
> David Kalnischkies wrote:
>> (i guess we simply have a different understanding of version in
>>  this context and therefore different behavior in apt vs. cupt)
> Yes, seems so.
>> 2009/11/23 Eugene V. Lyubimkin <jackyf.devel@gmail.com>:
>>>> - one for each origin/release/distribution (e.g. sid or "")
>>> I don't understand this one. And anyway it isn't stated anywhere, so it
>>> doesn't count.
>> In "The Effect of APT Preferences" it is said:
>>> 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.
>> (I have quoted the first few words already in my first mail)
> That phrase doesn't say anything about the same version entry treating is
> multiple ones, one for each Packages which it belongs to.
>> So why it is not stated somewhere and therefore doesn't count?
>> The versions from a different distribution/origin doesn't have a pin
>> assigned yet, so another pin-setting can match them.
> Yes, for cupt they all are the same version (which I considered natural). This
> concept is one of libcupt's cornerstones.
> Jean-Christophe, now it's up to you to decide which point you support. If the
> bug got reassigned to libcupt in the end, I will mark it 'wontfix'. I don't
> want to play reassigning ping-pong as well.

My reading is now the same as yours (Eugen) :
       The APT preferences file /etc/apt/preferences and
       the fragment files in the /etc/apt/preferences.d/
       folder can be used to control which versions of
       packages will be selected for installation.

       Several versions of a package may be available
       for installation when the sources.list(5) file
       contains references to more than one distribution
       (for example, stable and testing). APT assigns a
       priority to each version that is available.

The crux of the problem is the definition of a "version".
Either the documentation in apt_preferences man page (which belongs to
apt) is fixed to say that a package version is the tuple
(name,version_number,somethingelse) or a package version is indeed the
tuple (name,version_number) which is the most natural for a _version_ of
a _package_.

For now, I think that a package version is a package and a version
number. APT assigns a priority to each version that is available
(quoting the man page), and one priority only.

I am quite sure that if the documentation were to be fixed, certainly
Eugen would (with is cupt developer hat on) would consider a package
version to be whatever the documentation says it should be.

Jean-Christophe Dubacq

Reply to: