Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 355621 - repoman: variable.usedwithhelpers false positive
Summary: repoman: variable.usedwithhelpers false positive
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 349307
  Show dependency tree
 
Reported: 2011-02-19 21:02 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2011-02-22 19:52 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 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-02-19 21:02:55 UTC
flame@yamato docbook-xsl-stylesheets % repoman full

RepoMan scours the neighborhood...
  variable.usedwithhelpers      3
   app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.73.2.ebuild: Helper function is used with D, ROOT, ED, EROOT or EPREFIX on line :22
   app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.75.2.ebuild: Helper function is used with D, ROOT, ED, EROOT or EPREFIX on line :31
   app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.76.0.ebuild: Helper function is used with D, ROOT, ED, EROOT or EPREFIX on line :31
  RDEPEND.implicit              1
   app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.73.2.ebuild: RDEPEND is not explicitly assigned

Note: use --include-dev (-d) to check dependencies for 'dev' profiles

Please fix these important QA issues first.
RepoMan sez: "Make your QA payment on time and you'll never see the likes of me."

Too bad that...


sed -n -e '22p' docbook-xsl-stylesheets-1.73.2.ebuild; sed -n -e '31p' docbook-xsl-stylesheets-1.7{5,6}*
	insinto ${DEST}
	insinto ${DEST}
Comment 1 Fabian Groffen gentoo-dev 2011-02-19 21:08:54 UTC
ahh, I think the regexp is too sloppy.  I can't come up with anything better than this for the moment:

diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index 8f61c07..343719f 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -333,7 +333,7 @@ class NoOffsetWithHelpers(LineCheck):
        helpers """
 
        repoman_check_name = 'variable.usedwithhelpers'
-       re = re.compile(r'^[^#]*\b(dodir|dohard|exeinto|insinto|into)\s+"?\$\{?(D|ROOT|ED|EROOT|EPREFIX)\}?.*')
+       re = re.compile(r'^[^#]*\b(dodir|dohard|exeinto|insinto|into)\s+"?\$(\{(D|ROOT|ED|EROOT|EPREFIX)\}|(D|ROOT|ED|EROOT|EPREFIX)).*')
        error = errors.NO_OFFSET_WITH_HELPERS
 
 class ImplicitRuntimeDeps(LineCheck):
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-02-19 21:27:17 UTC
What's python's RegEx engine? Both PCRE and GNU has a "word boundary character, so something like this should do:

r'^[^#]*\b(dodir|dohard|exeinto|insinto|into)\s+"?\$\{?\<(D|ROOT|ED|EROOT|EPREFIX)\>\}?.*'
Comment 3 Fabian Groffen gentoo-dev 2011-02-19 21:30:36 UTC
that's another way to fix it, although the problem here is that it matches "${D" because it doesn't require the { and } to be balanced 
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-02-19 21:39:40 UTC
And I'd suggest to keep matching that... ${D/foo/bar}

Definitely better to what we have now anyway.
Comment 5 Zac Medico gentoo-dev 2011-02-19 23:50:49 UTC
This is fixed in git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8126784f69d87792edc3b4249302602731783e95

I just replaced \}? with \b.
Comment 6 Zac Medico gentoo-dev 2011-02-22 19:52:21 UTC
This is fixed in 2.1.9.41 and 2.2.0_alpha25.