Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921841 - dev-php/pecl-redis-6.0.2: invalid ebuild: DEPEND: USE flag 'php_targets_php8-0' referenced is not in IUSE
Summary: dev-php/pecl-redis-6.0.2: invalid ebuild: DEPEND: USE flag 'php_targets_php8-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-01-12 01:07 UTC by richard+gentoo-bugzilla
Modified: 2024-01-13 09:22 UTC (History)
2 users (show)

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


Attachments
Patch to fix pecl-redis-6.0.2.ebuild (dev-php_pecl-redis_invalid_depend.patch,489 bytes, patch)
2024-01-12 01:07 UTC, richard+gentoo-bugzilla
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description richard+gentoo-bugzilla 2024-01-12 01:07:39 UTC
Created attachment 881994 [details, diff]
Patch to fix pecl-redis-6.0.2.ebuild

It is currently not possible to upgrade to dev-php/pecl-redis-6.0.2 as the ebuild is invalid. I attached a patch for pecl-redis-6.0.2.ebuild and tested it locally.

Forcing the upgrade yields the following error message:
$ emerge -av '>=pecl-redis-6'

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 0.49 s (backtrack: 0/20).


!!! All ebuilds that could satisfy ">=pecl-redis-6" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-php/pecl-redis-6.0.2::gentoo (masked by: invalid: DEPEND: USE flag 'php_targets_php8-0' referenced in conditional 'php_targets_php8-0?' in atom '>=dev-php/igbinary-3.0.1-r1[php_targets_php8-0(-)?,php_targets_php8-1(-)?,php_targets_php8-2(-)?]' is not in IUSE, invalid: RDEPEND: USE flag 'php_targets_php8-0' referenced in conditional 'php_targets_php8-0?' in atom '>=dev-php/igbinary-3.0.1-r1[php_targets_php8-0(-)?,php_targets_php8-1(-)?,php_targets_php8-2(-)?]' is not in IUSE)
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-12 19:21:02 UTC
Why isn't CI spotting this..?
Comment 2 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2024-01-12 20:29:44 UTC
(In reply to Sam James from comment #1)
> Why isn't CI spotting this..?

because "php8-0" is still valid value for PHP_TARGETS USE_EXPAND (look at profiles/desc/php_targets.desc)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-12 20:31:56 UTC
(In reply to Arthur Zamarin from comment #2)
> (In reply to Sam James from comment #1)
> > Why isn't CI spotting this..?
> 
> because "php8-0" is still valid value for PHP_TARGETS USE_EXPAND (look at
> profiles/desc/php_targets.desc)

But it's not valid because 6.0.2 does not have php8-0, hence php8-0? within that ebuild is invalid, right?
Comment 4 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2024-01-12 20:41:54 UTC
(In reply to Sam James from comment #3)
> (In reply to Arthur Zamarin from comment #2)
> > (In reply to Sam James from comment #1)
> > > Why isn't CI spotting this..?
> > 
> > because "php8-0" is still valid value for PHP_TARGETS USE_EXPAND (look at
> > profiles/desc/php_targets.desc)
> 
> But it's not valid because 6.0.2 does not have php8-0, hence php8-0? within
> that ebuild is invalid, right?

Just for paper trail, after further talks in #gentoo-dev IRC, pkgcheck doesn't check at all the USE flag referenced behind "?" in a use_dep specification exists in current ebuild. PMS clearly states that it must exist, so here we go with a new check needed for pkgcheck.
Comment 5 Larry the Git Cow gentoo-dev 2024-01-12 21:50:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de2c75db0e72db765a41fd51312937d57d8da50a

commit de2c75db0e72db765a41fd51312937d57d8da50a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-12 21:49:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-12 21:49:24 +0000

    dev-php/pecl-redis: fix invalid dependency
    
    pkgcheck is being fixed to handle (detect) this as well (thank you Arthur!)
    
    Closes: https://bugs.gentoo.org/921841
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{pecl-redis-6.0.2.ebuild => pecl-redis-6.0.2-r1.ebuild}           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2024-01-13 09:22:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=f2d4e371da2bfa834644973d4dd0bede50deafb4

commit f2d4e371da2bfa834644973d4dd0bede50deafb4
Author:     Arthur Zamarin <arthurzam@gentoo.org>
AuthorDate: 2024-01-13 09:16:10 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2024-01-13 09:16:10 +0000

    UnstatedIuse: check for unstated IUSE in "?" dependencies
    
    Check for cases where a dependency uses conditional use dependency
    with unknown USE flag. PMS states:
    
      It is an error for an ebuild to use a conditional use dependency when
      that ebuild does not have the flag in IUSE_EFFECTIVE.
    
    Bug: https://bugs.gentoo.org/921841
    Requested-by: Sam James <sam@gentoo.org>
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 src/pkgcheck/checks/metadata.py                    | 33 ++++++++++++++--------
 .../DependencyCheck/MissingUseDepDefault/fix.patch |  4 +--
 .../UnstatedIuse/expected-verbose.json             |  1 +
 .../DependencyCheck/UnstatedIuse/expected.json     |  1 +
 .../MissingUseDepDefault-0.ebuild                  |  1 +
 .../MissingUseDepDefault/metadata.xml              |  7 +++++
 .../UnstatedIuse/UnstatedIuse-0.ebuild             |  3 ++
 tests/checks/test_metadata.py                      |  2 +-
 8 files changed, 37 insertions(+), 15 deletions(-)