Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 606848

Summary: dev-util/pkgcheck: warn about usage of doins for icons instead of newicon/doicon
Product: Gentoo Linux Reporter: Jonas Stein <jstein>
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: jstein, ulm
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=606854
Whiteboard:
Package list:
Runtime testing required: ---

Description Jonas Stein gentoo-dev 2017-01-22 22:02:32 UTC
it is a common mistake to use doins instead of newicon or doicon.
repoman could find 99% of these with one bash line:
grep "insinto.*icons" *.ebuild && echo "Repoman feels suddenly very bad: Please use doicon or newicon to install icons"



qgrep -N -e "insinto.*icons" 
lists 114 packages with the problem. 
Including famous ones like www-client/firefox and net-analyzer/wireshark.

Reproducible: Always
Comment 1 Jonas Stein gentoo-dev 2017-01-22 22:09:08 UTC
newicon and doicon are defined in the eutils eclass.

https://devmanual.gentoo.org/eclass-reference/eutils.eclass/


AFAIK there are no further EAPI restrictions in this case.
Comment 2 Mike Gilbert gentoo-dev 2017-01-22 23:59:19 UTC
This seems a bit dubious to me. doicon/newicon are convenience functions. If an ebuild calls doins/newins in an appropriate way instead, I don't see any reason to flag that as a QA failure.
Comment 3 Jonas Stein gentoo-dev 2017-01-23 00:07:07 UTC
Mike, that is interesting. When I discussed this with other developers before writing the ticket, the tenor was "never use doins for icons". 
Perhaps we should at least clarify our documentation on this. Best, JS
Comment 4 Ulrich Müller gentoo-dev 2017-01-23 12:47:26 UTC
IMHO, there is nothing wrong with using doins to install icons. You would have a valid argument if doicon was a package manager function.

There also is a tradeoff between using doicon and inheriting a large eclass, or using insinto and doins which may require one additional of code. I would leave that decision to the maintainer.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:23 UTC
repoman support has been removed per bug 835013.

Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.
Comment 6 Ulrich Müller gentoo-dev 2022-07-12 06:51:48 UTC
I still think this isn't valid, by comment #4.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 07:23:14 UTC
(In reply to Ulrich Müller from comment #6)
> I still think this isn't valid, by comment #4.

Fine with me, I just wanted to do the closing separate from the moving.