Bug 4345

Summary: %rename macro doesn't handle %epoch
Product: Mageia Reporter: Kamil Rytarowski <n54>
Component: RPM PackagesAssignee: Nicolas Vigier <boklm>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: jani.valimaa, thierry.vignaud
Version: CauldronKeywords: PATCH
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: rpm-mageia-setup CVE:
Status comment:
Attachments: patch to fix the issue

Description Kamil Rytarowski 2012-01-30 01:53:43 CET
Description of problem:
%rename macro doesn't handle %epoch. I'm attaching a patch (against rpm-mageia-setup-1.147) to resolve the problem.

Version = cauldron, because it wasn't probably needed for Mga1.

Version-Release number of selected component (if applicable):
1.147-4

How reproducible:
Always

Steps to Reproduce:
1. Have defined %{epoch}>=1 in a package
2. Try to use %rename
3. See that the renamed package can't obsolete the old package
Comment 1 Kamil Rytarowski 2012-01-30 01:55:32 CET
Created attachment 1461 [details]
patch to fix the issue
Kamil Rytarowski 2012-01-30 01:56:38 CET

Assignee: bugsquad => boklm

Comment 2 Kamil Rytarowski 2012-01-30 02:00:57 CET
I'm assigning to the maintainer.

Status: NEW => ASSIGNED

Comment 3 Kamil Rytarowski 2012-01-30 02:58:36 CET
Concurrently I'm fixing the issue of renaming without a %{epoch}:%{release}-%{version} bump.
Currently %rename (without the bump) wouldn't obsolete the renamed package and wouldn't favor the newly-named one.
Thierry Vignaud 2012-01-30 08:22:33 CET

Keywords: (none) => PATCH
CC: (none) => thierry.vignaud

Comment 4 Jani Välimaa 2012-01-30 20:09:45 CET
I guess we don't need the whole %rename macro as plain Obsoletes: works..

CC: (none) => jani.valimaa

Comment 5 Kamil Rytarowski 2012-01-30 20:23:26 CET
%rename is helping to keep .spec simpler, especially in larger packages with subpackages.
Comment 6 Jani Välimaa 2012-01-30 20:27:59 CET
(In reply to comment #5)
> %rename is helping to keep .spec simpler, especially in larger packages with
> subpackages.

How so?

All you need to do is to add 'Obsoletes: foo < 1.2.3' (and maybe a comment when it was added). There's no need to use 'Provides: foo' anymore.
Comment 7 Kamil Rytarowski 2012-01-31 01:27:12 CET
Ah, so is Obsoletes handing it correctly? Then we have to update our wiki and make this macro deprecated.

In any case the macro is wrong and shall be fixed.
Comment 8 Marja Van Waes 2012-05-26 13:04:47 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 9 Thierry Vignaud 2012-06-26 18:31:06 CEST
patch looks fine to me.

As for obsoletes & provides, the Provides: tag is needed in order not to break other packages requiring the old package name
Manuel Hiebel 2012-06-26 22:50:38 CEST

Keywords: NEEDINFO => (none)

Comment 10 Kamil Rytarowski 2012-06-27 01:23:32 CEST
Fixed in Cauldron, and this is enough. There isn't need to backport the patch to Mga1, Mga2.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED