Bug 10659 - urpmi doesn't uninstall foo if it is obsoleted with "foo <= [last version]"
Summary: urpmi doesn't uninstall foo if it is obsoleted with "foo <= [last version]"
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-29 21:38 CEST by Marja Van Waes
Modified: 2014-11-24 20:41 CET (History)
1 user (show)

See Also:
Source RPM: urpmi
CVE:
Status comment:


Attachments
Patch for null to test obsoletes (745 bytes, patch)
2013-07-01 17:50 CEST, Jani Välimaa
Details | Diff

Description Marja Van Waes 2013-06-29 21:38:37 CEST
urpmi doesn't uninstall foo if it is obsoleted with "Obsoletes:	foo <= [last version]"

It works fine if it is obsoleted with "Obsoletes: foo < [last version + 1]"

I'm saying this in general, because wally reported having seen this, too.
Comment 1 Marja Van Waes 2013-06-29 21:45:12 CEST
and of course this is about when doing 

urpmi bar

and bar should obsolete foo
Comment 2 Thierry Vignaud 2013-06-30 22:43:27 CEST
Care to provides an example?

Keywords: (none) => NEEDINFO

Comment 3 Marja Van Waes 2013-07-01 13:43:22 CEST
(In reply to Thierry Vignaud from comment #2)
> Care to provide an example?

With packages built from 
(1) http://waesvanm.home.xs4all.nl/Packaging/Bug10659/ttx.spec
and 
(2) http://waesvanm.home.xs4all.nl/Packaging/ttx.spec

"urpmi ttx-0.0.2-1.mga4.<ARCH>.rpm" does not uninstall ttb-1.0.1-2.mga3.noarch if there is 
(1) "Obsoletes:	ttb <= 1.0.1-2"
in the spec file

however 
(2) "Obsoletes:	ttb < 1.0.1-3"
works fine, ttb-1.0.1-2.mga3.noarch is uninstalled.

Compare 
(1) waesvanm.home.xs4all.nl/Packaging/Bug10659/ttx-0.0.2-1.mga4.i586.rpm
with
(2) waesvanm.home.xs4all.nl/Packaging/ttx-0.0.2-1.mga4.i586.rpm
Marja Van Waes 2013-07-01 13:43:30 CEST

Keywords: NEEDINFO => (none)

Comment 4 Jani Välimaa 2013-07-01 17:50:44 CEST
Created attachment 4181 [details]
Patch for null to test obsoletes

Yes, I can reproduce this.

Used current null pkg to create null2 (see attachment) which should obsolete null less or equal than current version.

Installed null, uploaded null2 to my local repo and used 'urpmi --auto-select', but null2 doesn't get pulled. If I switch '<= 1:10-3' to '< 1:10-4', all works.
Comment 5 Thierry Vignaud 2014-11-24 14:11:48 CET
Well, as far as rpm is concerned, 1.0.1-2 < 1.0.1-2.mga3
Thus "Obsoletes: ttb <= 1.0.1-2" will obvioulsy NOT match the installed package

Status: NEW => RESOLVED
Resolution: (none) => INVALID

Comment 6 Marja Van Waes 2014-11-24 14:38:54 CET
(In reply to Thierry Vignaud from comment #5)
> Well, as far as rpm is concerned, 1.0.1-2 < 1.0.1-2.mga3
> Thus "Obsoletes: ttb <= 1.0.1-2" will obvioulsy NOT match the installed
> package

Ah, thanks!

Does that also mean that <quote>Also make sure that the Cauldron package has an higher release than the Mageia 3 package.</quote> in https://wiki.mageia.org/en/Mgarepo was (and is) nonsense?
Comment 7 Thierry Vignaud 2014-11-24 20:03:32 CET
No it's not.
But it can be:
- either 1.0.1-2.mga3 < 1.0.1-2.mga4
- or     1.0.1-2.mga3 < 1.0.1-18.mga4
Comment 8 Marja Van Waes 2014-11-24 20:41:15 CET
Thanks again, Thierry, I understand now

Note You need to log in before you can comment on or make changes to this bug.