Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434520 - app-admin/perl-cleaner should use eselecat package-manager defined PM
Summary: app-admin/perl-cleaner should use eselecat package-manager defined PM
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-09 23:08 UTC by Brian Harring (RETIRED)
Modified: 2016-12-29 13:06 UTC (History)
2 users (show)

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


Attachments
add support (0001-Modify-perl-cleaner-to-honor-eselect-package-manager.patch,2.66 KB, patch)
2012-09-09 23:08 UTC, Brian Harring (RETIRED)
Details | Diff
Patch making perl-cleaner respect PACKAGE_MANAGER (perl-cleaner-package-manager.patch,1.55 KB, patch)
2015-07-20 13:58 UTC, Hendrik v. Raven
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Harring (RETIRED) gentoo-dev 2012-09-09 23:08:46 UTC
Created attachment 323346 [details, diff]
add support

as the subject says; perl-cleaner shouldn't require manual overriding to get it to use the indicated PM, should instead just use it if specified/known.
Comment 1 Ulrich Müller gentoo-dev 2012-09-18 20:51:01 UTC
> Created attachment 323346 [details, diff] [details, diff]
> add support

Quoting from the patch:
+PACKAGE_MANAGER=$(echo $(eselect package-manager show | tail -n1))

Hm, eselect package-manager wasn't supposed to be used like this, but the idea was that packages should take the PACKAGE_MANAGER variable from the environment (quite similar to EDITOR or PAGER).

There's also no guarantee that app-admin/eselect-package-manager is installed or that the variable is set, so perl-cleaner should fall back to a sane default in these cases.
Comment 2 Hendrik v. Raven 2015-07-20 13:58:42 UTC
Created attachment 407256 [details, diff]
Patch making perl-cleaner respect PACKAGE_MANAGER

This patch makes it respect the env variable by reordering the code.
It uses the fact that the variable used internally by perl-cleaner is the same as set in the environment.
By moving the parsing of the variable out of the argument parsing it is executed every time and uses the environment variable if it is set. Command line overwrites and default is portage.
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2016-12-29 13:06:07 UTC
This is in just-uploaded perl-cleaner-2.23