Bug 4345 - %rename macro doesn't handle %epoch
Summary: %rename macro doesn't handle %epoch
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Nicolas Vigier
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-01-30 01:53 CET by Kamil Rytarowski
Modified: 2012-06-27 01:23 CEST (History)
2 users (show)

See Also:
Source RPM: rpm-mageia-setup
CVE:
Status comment:


Attachments
patch to fix the issue (534 bytes, patch)
2012-01-30 01:55 CET, Kamil Rytarowski
Details | Diff

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


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