Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian dpkg (http://www.linux-archive.org/debian-dpkg/)
-   -   libqwt-dev: apt reinstalls the package (http://www.linux-archive.org/debian-dpkg/610827-libqwt-dev-apt-reinstalls-package.html)

David Kalnischkies 12-16-2011 11:09 AM

libqwt-dev: apt reinstalls the package
 
Hi,

> each time I run "apt-get upgrade", apt-get reinstalls the libqwt-dev package.

APT detects installed vs. the online version as different versions
because of different dependencies.

If we have a close look, we can see that:
Online is:
Replaces: libqwt5-qt4-dev (<< 6.0.0-)
After installation we have in dpkg/status:
Replaces: libqwt5-qt4-dev (<< 6.0.0)

So dpkg is dropping the dash at the end of the versionnumber.
Not that this is completely unreasonable as the dash doesn't make
a lot of sense here, but i am cc'ing dpkg-mailinglist just in case
they want to have a look at it.

I think we had a similar "issue" with explicit mentioning of the zero
epoch in the past.


Best regards

David Kalnischkies


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAAZ6_fAPMooOAOV6dA6c+c3xQj94KU0vB45PFMc2qV+2Dy21j A@mail.gmail.com">http://lists.debian.org/CAAZ6_fAPMooOAOV6dA6c+c3xQj94KU0vB45PFMc2qV+2Dy21j A@mail.gmail.com

Jonathan Nieder 12-16-2011 12:10 PM

libqwt-dev: apt reinstalls the package
 
#clone 631816 -1
#reassign -1 libqwt-dev 6.0.0-1
## policy 7.1 "Syntax of relationship fields"
#severity -1 important
severity 633943 important
found 633943 qwt/6.0.0-1
#merge -1 633943
quit

David Kalnischkies wrote:

> APT detects installed vs. the online version as different versions
> because of different dependencies.
>
> If we have a close look, we can see that:
> Online is:
> Replaces: libqwt5-qt4-dev (<< 6.0.0-)
> After installation we have in dpkg/status:
> Replaces: libqwt5-qt4-dev (<< 6.0.0)

From policy 7.1:

parentheses should contain a relation from the list below
followed by a version number, in the format described in
Version, Section 5.6.12.

"6.0.0-" is not a valid version number.

I'm not sure what dpkg and apt should do here, though.


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111216131040.GB4903@elie.hsd1.il.comcast.net">ht tp://lists.debian.org/20111216131040.GB4903@elie.hsd1.il.comcast.net

Raphael Hertzog 12-16-2011 03:21 PM

libqwt-dev: apt reinstalls the package
 
Hi,

On Fri, 16 Dec 2011, Jonathan Nieder wrote:
> > If we have a close look, we can see that:
> > Online is:
> > Replaces: libqwt5-qt4-dev (<< 6.0.0-)
> > After installation we have in dpkg/status:
> > Replaces: libqwt5-qt4-dev (<< 6.0.0)
>
> From policy §7.1:
>
> parentheses should contain a relation from the list below
> followed by a version number, in the format described in
> Version, Section 5.6.12.
>
> "6.0.0-" is not a valid version number.

It's accepted by dpkg at least. Why would it be invalid?

$ dpkg --compare-versions 6.0.0- eq 6.0.0 && echo yes
yes

It doesn't bring anything useful though and is best avoided. This was
already reported once and I have even code (in my private branch
pu/keep-version-string) that ensures that dpkg preserves the trailing
dash. dpkg-dev already does that correctly. I think Guillem was not really
convinced by the need to fix this on the dpkg side.

(A similar problem happens if you write your version with an explicit
epoch of "0", aka "0:6.0.0" == "6.0.0" but the string is different)

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111216162140.GF13260@rivendell.home.ouaza.com">h ttp://lists.debian.org/20111216162140.GF13260@rivendell.home.ouaza.com

Jonathan Nieder 12-16-2011 03:36 PM

libqwt-dev: apt reinstalls the package
 
Raphael Hertzog wrote:
> On Fri, 16 Dec 2011, Jonathan Nieder wrote:

>> "6.0.0-" is not a valid version number.
>
> It's accepted by dpkg at least. Why would it be invalid?

It all depends on how one interprets the phrase "may not" in the
following sentence describing debian_version

It is optional; if it isn't present then the upstream_version
may not contain a hyphen.

I assumed "may not" means "must not", but now that I look at it again,
I'm less sure. This text is at least as old as the policy repository,
so if you know Ian's speech mannerisms well enough (I don't) then you
should probably be able to tell. :)


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111216163624.GB31775@elie.hsd1.il.comcast.net">h ttp://lists.debian.org/20111216163624.GB31775@elie.hsd1.il.comcast.net

Jonathan Nieder 12-16-2011 03:51 PM

libqwt-dev: apt reinstalls the package
 
forcemerge 631816 633943
quit

Jonathan Nieder wrote:
> Raphael Hertzog wrote:

>> It's accepted by dpkg at least. Why would it be invalid?
>
> It all depends on how one interprets the phrase "may not" in the
> following sentence describing debian_version
>
> It is optional; if it isn't present then the upstream_version
> may not contain a hyphen.

Oops --- I can't read. Thanks.

After rereading it again, I think what was confusing me is that
I read the subject of this sentence as being <debian_revision>, rather
than the entire "-<debian_revision>" part.

With the latter interpretation, it seems possible to view 6.0.0- as a
valid version number with debian_revision part present but an empty
<debian_revision>.

And based on

The package management system will break the version number
apart at the last hyphen in the string (if there is one) to
determine the upstream_version and debian_revision. The
absence of a debian_revision is equivalent to a
debian_revision of 0

it seems safe to assume that it would represent the same version as
6.0.0-0.

Eugene, does this sound sensible to you? Any ideas for clarifying the
text either way?

Jonathan


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111216165108.GA32135@elie.hsd1.il.comcast.net">h ttp://lists.debian.org/20111216165108.GA32135@elie.hsd1.il.comcast.net

"Eugene V. Lyubimkin" 12-16-2011 07:56 PM

libqwt-dev: apt reinstalls the package
 
Hello,

On 2011-12-16 10:51, Jonathan Nieder wrote:
[...]
> > It is optional; if it isn't present then the upstream_version
> > may not contain a hyphen.
[...]
> After rereading it again, I think what was confusing me is that
> I read the subject of this sentence as being <debian_revision>, rather
> than the entire "-<debian_revision>" part.
>
> With the latter interpretation, it seems possible to view 6.0.0- as a
> valid version number with debian_revision part present but an empty
> <debian_revision>.

I agree it could be intepreted so, but I see no benefits in allowing
trailing '-'. After all, it's just confusing.

By the way, using this interpretation for epoch too, a version ':1.2.3'
would be also correct?

> Eugene, does this sound sensible to you? Any ideas for clarifying the
> text either way?

... so, I would rather amend the policy explicitly forbidding this
special case.

--
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
C++/Perl developer, Debian Developer


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111216205534.GA1018@r500-debian">http://lists.debian.org/20111216205534.GA1018@r500-debian

Jonathan Nieder 12-16-2011 10:25 PM

libqwt-dev: apt reinstalls the package
 
Eugene V. Lyubimkin wrote:

> I agree it could be intepreted so, but I see no benefits in allowing
> trailing '-'. After all, it's just confusing.
>
> By the way, using this interpretation for epoch too, a version ':1.2.3'
> would be also correct?

No, a version ':1.2.3' would still not be allowed, since there is a
colon but the text before it ("") is not a number, violating

This is a single (generally small) unsigned integer.

> ... so, I would rather amend the policy explicitly forbidding this
> special case.

Hmm.

I can imagine someone expecting "Depends: foo (<< 3.0-)" to be
accepted based on a naive view of versions in which they are mostly
compared lexically. Such a person would most likely (wrongly) expect
"foo (3.0)" to satisfy the dependency. So after thinking about it a
little, I agree --- it seems sensible to forbid such expressions to
avoid such pitfalls.

I can't imagine this rendering many existing non-buggy packages buggy,
since as this bug shows, the dpkg+apt combination doesn't seem to
handle version numbers with trailing '-' well yet anyway.

Thanks for your thoughtfulness.
Jonathan


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111216232535.GA1154@elie.hsd1.il.comcast.net">ht tp://lists.debian.org/20111216232535.GA1154@elie.hsd1.il.comcast.net

"Eugene V. Lyubimkin" 12-17-2011 08:33 AM

libqwt-dev: apt reinstalls the package
 
Hello,

On 2011-12-16 17:25, Jonathan Nieder wrote:
> > By the way, using this interpretation for epoch too, a version ':1.2.3'
> > would be also correct?
>
> No, a version ':1.2.3' would still not be allowed, since there is a
> colon but the text before it ("") is not a number, violating
>
> This is a single (generally small) unsigned integer.

Next sentence: "It may be omitted, in which case zero is assumed.", same
as for debian_revision.

--
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
C++/Perl developer, Debian Developer


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111217093346.GA9936@r500-debian">http://lists.debian.org/20111217093346.GA9936@r500-debian

Jonathan Nieder 12-17-2011 08:44 AM

libqwt-dev: apt reinstalls the package
 
Eugene V. Lyubimkin wrote:
> On 2011-12-16 17:25, Jonathan Nieder wrote:

>> No, a version ':1.2.3' would still not be allowed, since there is a
>> colon but the text before it ("") is not a number, violating
>>
>> This is a single (generally small) unsigned integer.
>
> Next sentence: "It may be omitted, in which case zero is assumed.", same
> as for debian_revision.

Yes, and just as for debian_revision, "it" refers to the entire component
"<epoch>:".

In the version number "1.2.3-", the debian_revision component is _not_
omitted. The debian_revision is present and empty. A good patch to
policy would be to forbid it from being empty.

Hoping that clarifies a little,
Jonathan


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111217094438.GB8845@elie.hsd1.il.comcast.net">ht tp://lists.debian.org/20111217094438.GB8845@elie.hsd1.il.comcast.net


All times are GMT. The time now is 10:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.