Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 606848 - dev-util/pkgcheck: warn about usage of doins for icons instead of newicon/doicon
Summary: dev-util/pkgcheck: warn about usage of doins for icons instead of newicon/doicon
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-22 22:02 UTC by Jonas Stein
Modified: 2022-07-12 07:23 UTC (History)
2 users (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 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.