Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591184 - app-portage/repoman-2.3.0-r2: LICENSE.syntax error with correct LICENSE when USE flag is missing from IUSE
Summary: app-portage/repoman-2.3.0-r2: LICENSE.syntax error with correct LICENSE when ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2016-08-13 13:08 UTC by Coacher
Modified: 2022-04-11 20:29 UTC (History)
1 user (show)

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


Attachments
foo-0.ebuild (foo-0.ebuild,310 bytes, text/plain)
2016-08-13 13:08 UTC, Coacher
Details
foo-1.ebuild (foo-1.ebuild,512 bytes, text/plain)
2016-10-15 19:35 UTC, Thomas Deutschmann (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2016-08-13 13:08:03 UTC
Created attachment 443230 [details]
foo-0.ebuild

Hello.

app-portage/repoman-9999 from master @ b7f0937.

If I run 'repoman' with the attached ebuild I have the following list of errors:

RepoMan scours the neighborhood...
  IUSE.missing [fatal]          2
   app-misc/foo/foo-0.ebuild: DEPEND: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE
   app-misc/foo/foo-0.ebuild: RDEPEND: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE
  LICENSE.syntax [fatal]        1
   app-misc/foo/foo-0.ebuild: LICENSE: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE
  dependency.syntax [fatal]     2
   app-misc/foo/foo-0.ebuild: DEPEND: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE
   app-misc/foo/foo-0.ebuild: RDEPEND: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE
Please fix these important QA issues first.

IUSE.missing and dependency.syntax errors are definitely valid.
LICENSE variable is defined properly though, but repoman still complains.

Please fix.
Comment 1 Zac Medico gentoo-dev 2016-08-13 22:26:53 UTC
The problem is due to this code that does zip(type_list, badsyntax) without the list indices corresponding as intended:

https://gitweb.gentoo.org/proj/portage.git/tree/repoman/pym/repoman/modules/scan/depend/_depend_checks.py?h=repoman-2.3.0#n165
Comment 4 Coacher 2016-08-15 09:27:26 UTC
(In reply to Zac Medico from comment #3)
> This is in the master branch:
> 
> https://gitweb.gentoo.org/proj/portage.git/commit/
> ?id=99d8cdc0e9b011d39ae8537169ce2ca70a4e5f83
Thank you very much. This commit fixes the original problem, but introduces a regression. Now repoman output is as follows:

RepoMan scours the neighborhood...
  IUSE.missing [fatal]          2
   app-misc/foo/foo-0.ebuild: DEPEND: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE
   app-misc/foo/foo-0.ebuild: RDEPEND: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE
  dependency.syntax [fatal]     3
   app-misc/foo/foo-0.ebuild: DEPEND: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE
   app-misc/foo/foo-0.ebuild: RDEPEND: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE
   app-misc/foo/foo-0.ebuild: RDEPEND: USE flag 'ImNotInIUSE' referenced in conditional 'ImNotInIUSE?' is not in IUSE

As you can see dependency.syntax error for RDEPEND is listed twice. This was not the case before.
Comment 5 Zac Medico gentoo-dev 2016-08-15 19:30:04 UTC
(In reply to Coacher from comment #4)
> As you can see dependency.syntax error for RDEPEND is listed twice.

What happens is that it triggers the same InvalidDependString twice, once in the first use_reduce call, and again when check_slotop calls use_reduce.
Comment 6 Zac Medico gentoo-dev 2016-08-15 19:50:42 UTC
(In reply to Zac Medico from comment #5)
> (In reply to Coacher from comment #4)
> > As you can see dependency.syntax error for RDEPEND is listed twice.
> 
> What happens is that it triggers the same InvalidDependString twice, once in
> the first use_reduce call, and again when check_slotop calls use_reduce.

Fixed now:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=f8ecea15c312ee9dcb28871811de9d68ef7b41b4
Comment 7 Coacher 2016-08-15 20:24:35 UTC
(In reply to Zac Medico from comment #6)
> Fixed now:
> 
> https://gitweb.gentoo.org/proj/portage.git/commit/
> ?id=f8ecea15c312ee9dcb28871811de9d68ef7b41b4
Thanks. I can confirm this regression is gone.
Comment 8 Zac Medico gentoo-dev 2016-08-16 06:25:23 UTC
I've pushed another fix to the same function:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=2e5cfb1c12011dec3c212d1f77cb8911d5add172
Comment 9 Coacher 2016-08-16 10:52:37 UTC
(In reply to Zac Medico from comment #8)
> I've pushed another fix to the same function:
> 
> https://gitweb.gentoo.org/proj/portage.git/commit/
> ?id=2e5cfb1c12011dec3c212d1f77cb8911d5add172
It isn't clear to me what this commit fixes.
I can only say it doesn't break anything here :)
Comment 10 Zac Medico gentoo-dev 2016-08-16 15:51:08 UTC
(In reply to Coacher from comment #9)
> It isn't clear to me what this commit fixes.

Mainly what it does is enable dependency checks when PROPERTIES is invalid, which will not be noticeable unless *DEPEND are all valid and PROPERTIES  is invalid.

It also eliminates unused code, and makes what code remains more easily comprehensible (bugs are often found in code that is difficult to comprehend).

> I can only say it doesn't break anything here :)

Great!
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2016-10-15 19:35:26 UTC
Created attachment 450312 [details]
foo-1.ebuild

Looks like I found a similar problem when I removed the version but not the ">=" from RDEPEND. I.e. I changed

> RDEPEND="pcre? ( >=dev-libs/libpcre-4.2:= )"

into

> RDEPEND="pcre? ( >=dev-libs/libpcre:= )"

and got

> RepoMan scours the neighborhood...
> [INFO] checking package app-misc/testpkg
>   LICENSE.syntax [fatal]        1
>    app-misc/testpkg/testpkg-1.5.0.ebuild: LICENSE: Invalid atom (>=dev-libs/libpcre:=), token 3
>   dependency.syntax [fatal]     2
>    app-misc/testpkg/testpkg-1.5.0.ebuild: RDEPEND: Invalid atom (>=dev-libs/libpcre:=), token 3
>    app-misc/testpkg/testpkg-1.5.0.ebuild: RDEPEND: Invalid atom (>=dev-libs/libpcre:=), token 3
> 

However with current repoman-9999 (commit 552f45964880fead24a913ab4e9ae1fee5cd79c3) this looks fixed:

> RepoMan scours the neighborhood...
> [INFO] checking package app-misc/testpkg
>   dependency.syntax [fatal]     2
>    app-misc/testpkg/testpkg-1.5.0.ebuild: RDEPEND: Invalid atom (>=dev-libs/libpcre:=), token 3
>    app-misc/testpkg/testpkg-1.5.0.ebuild: RDEPEND: Invalid atom (>=dev-libs/libpcre:=), token 3

Just wanted to report because the summary of this bug is very specific...
Comment 12 Zac Medico gentoo-dev 2017-01-23 20:25:42 UTC
Fixed in repoman-2.3.1.