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

Bug#218995: Patch for #218995



On Wed, Sep 19, 2012 at 1:55 PM, Steve McIntyre <steve@einval.com> wrote:
> On Wed, Sep 19, 2012 at 01:40:39PM +0200, David Kalnischkies wrote:
>>On Mon, Sep 17, 2012 at 4:37 PM, Steve McIntyre <steve@einval.com> wrote:
>>> On Mon, Sep 17, 2012 at 03:58:00PM +0200, David Kalnischkies wrote:
>>>>The other thing is that the generated output is less than stellar.
>>>>I think if we output something here it should be in the way we see
>>>>it in the Packages file and not intermixed some internal values …
>>>>Depends: awesome (0 (null))
>>>>Depends: stuff (3 2-1)
>>>>Nobody knows what 0 and 3 are and they could possibly change any
>>>>given minute (with an ABI break of course) -- beside that this number
>>>>printed includes also other stuff (like the OR flag) and showpkg is kind
>>>>of a debug command, so "compatibility" with it isn't really needed.
>>>
>>> ACK. I was a little surprised to see the output format here. I've
>>> added support for parsing the versions in apt's internal format, by
>>> digging through source code to find the definitions. I can always
>>> switch that code back to parsing human-readable text, thought.
>>
>>I think we will go with the attached patch, which prints a human-readable
>>nearly debian-style compare operator. I say nearly as I want to highlight
>>that - as is in other code paths - the dependency found in Packages:
>>Depends: awesome (<< 2-1) | awesome (>> 3-1)
>>will be printed as:
>>Depends: awesome (< 2-1) | awesome (> 3-1)
>>
>>This is an interpretation difference, as older debian policies (now in
>>§4.9.4 we reached the stage of denial: You must not use them) allowed
>>the usage of '<' with the meaning of '<='. So be careful while parsing it
>>that the right interpretation is used.
>>The rest are one on one mappings.
>
> Hmmm. Could we stick with the same format as in Packages instead,
> please? It's much less open to confusion that way... :-/ Other people
> will end up reading logs from debian-cd, for example.

Short version: Mhh.
Okay - just for you now in wheezy. ;)
For Jessie we will drop this difference for everyone.
Updated patch attached.

Novella version:
'<' and '>' in Debian are long obsolete and dpkg-gencontrol and lintian
warn (obsolete-relation-form-in-source) about their usage, so I guess it
is more confusing for tools than for people (as the later will forget the minor
detail they have read in the policy, tools usually don't forget that easily).

Anyway, I walked through history a bit in a try to figure out why APT
tries to establish it's own style here and it seems to originate from the
"good old" times of "lets replace dpkg" and "lets work with 'aliens', too".
("alien" seems to be rpm, but it is never mentioned explicitly and while
an old apt-rpm fork exists which uses these abstraction levels it never
caused support for "alien" to ever land in mainline so far…)

Walking a bit through code tells me that this is actually the first time
we use it in output which can be used by others. The old uses are only in
debug code and in the broken dependency list message which is far from
being parser friendly anyway. A quick grep in aptitude suggests similar
usage patterns. And somehow I doubt that this style has that many users
(if at all) out there given that it is not documented and far to similar
to the usual debian-style you would usually expect to see here …


Combining the two threads suggests that this is a perfect opportunity to
change behavior here by dropping APT-style for Jessie before providing
officially a command which will not allow us to do that in the future.
And as I can't time-travel we will fake it (for apt-cache depends) until
we make it (for all in DepIterator::CompType() ).


Best regards

David Kalnischkies


Reply to: