Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559178 - app-admin/rex has profound use of perl-module.eclass variables
Summary: app-admin/rex has profound use of perl-module.eclass variables
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ferenc Erki
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-30 15:20 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2017-03-31 10:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2015-08-30 15:20:57 UTC
in many of the app-admin/rex ebuilds, there is the pattern:

MODULE_A="Rex-${PV}.tar.gz"

This is redundant due to the existence of support for MY_PN in perl-module.eclass, who's purpose is to override PN before it gets composed into SRC_URI and the archive extraction name.

This is apparently made more complicated due to the use of invalid values for MODULE_VERSION= in all the ebuilds, which would set MODULE_VERSION to a very bad value ( for instance, rex 1.0.0 has MODULE_VERSION=0.53.1 , which is an obvious artefact of an ancient package ).

So, here, the explicit declaration does two things:

- Sets a correct name for the archive token
- And overrides the bad default also hard-coded in MODULE_VERSION

Given that ${PV} is pre-normalised, it is safer to just write:

MODULE_AUTHOR=JFRIED
MY_PN=Rex

And omit declaring MODULE_VERSION entirely, and then everything will work as expected, and PN will naturally be passed though into SRC_URI etc.

I have myself applied all the relevant changes and build/installed all current versions with these changes, a visible diff can be seen at:

  https://github.com/kentfredric/gentoo/pull/2

Or via git:  
  remote: https://github.com/kentfredric/gentoo.git
  branch: patch-rex

I have also in this branch updated/tweaked metadata.xml to have both "cpan" and "cpan-module" identifiers in <upstream><remote-id> values for tracking purposes.
Comment 1 Ferenc Erki 2017-03-30 12:53:48 UTC
The part regarding variable usage seems to be already fixed in recent ebuilds (thanks!). A fix for metadata.xml has been attached on bug 614286 as poart of version bump to 1.5.0.
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-03-31 10:17:36 UTC
Marking closed now, this is mostly fixed as all but one version have the weird syntax removed, and the metadata is also up-to-date.

commit:  b8788bbe6e0eaef92f83ee61eef2707beeb52a3d
author:  2017-03-30 18:06:06 +0000 Kent Fredric <kentnl@gentoo.org>
commit:  2017-03-31 10:14:11 +0000 Kent Fredric <kentnl@gentoo.org>
gpg-key: E854324B1366A820

    app-admin/rex: Bump to version 1.5.0

    Ebuild & metadata changes submitted by Ferenc Erki
    
    - Update metadata
    - Fix keywords
    - Add dep on Data-Validate-IP
    
    Bug: https://bugs.gentoo.org/614286
    Bug: https://bugs.gentoo.org/559178
    Package-Manager: Portage-2.3.4, Repoman-2.3.2