Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196909 - repoman check for variables set to default values
Summary: repoman check for variables set to default values
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-24 10:23 UTC by Hanno Böck
Modified: 2008-03-02 15:07 UTC (History)
0 users

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 Hanno Böck gentoo-dev 2007-10-24 10:23:50 UTC
I got feedback due to gentoo-commits that I shouldn't set variables to their default value, e.g. S="${WORKDIR}/${P}".

This could be checked by repoman, other candidates are probably RDEPEND=${DEPEND}, src_compile which does nothing but econf/emake, and probably others.
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2007-10-24 12:04:08 UTC
(In reply to comment #0)
> 
> This could be checked by repoman, other candidates are probably
> RDEPEND=${DEPEND}, src_compile which does nothing but econf/emake, and probably
> others.
> 

RDEPEND=${DEPEND} probably should not be checked for as I think some future EAPI version is meant to remove the automation here.
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2007-10-25 07:52:41 UTC
so checking for S=SOMETHING is easy.

Checking what the contents of src_compile is...Honestly thats not something I want repoman doing.  Its not bash, it doesn't have a bash parser; most of the stuff in repoman is fairly pragmatic, but even the quoting code is pretty complicated (but at least misquoted leads to actual breakage, having a default src_compile doesn't break anything).

Maybe have a subset of tests that run during a commit; I think there are a set of issues we are looking for that we want covered so that we don't break the tree.

There are also a set of issues we are looking for that are not the cause of errors but could be improved.  Should we separate these out?
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2007-11-09 15:59:26 UTC
Do we really need checks for cosmetic stuff? (as none of this affects functionality of ebuilds)
Comment 4 Matthias Schwarzott gentoo-dev 2007-11-27 09:27:55 UTC
(In reply to comment #0)
> I got feedback due to gentoo-commits that I shouldn't set variables to their
> default value, e.g. S="${WORKDIR}/${P}".
> 
I do sometimes need this for vdr-plugin ebuilds. The eclass sets S to "${WORKDIR}/${P#vdr-}" but sometimes "${WORKDIR}/${P}" is needed.

Or do I need to changed this to setting S before inherit - and let the eclass only set S if it is empty?
Comment 5 Marius Mauch (RETIRED) gentoo-dev 2008-03-02 15:07:27 UTC
I don't see any point in this.