Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390513 - repoman should warn of always true USE dependencies
Summary: repoman should warn of always true USE dependencies
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 11:37 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2021-02-06 23:44 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 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-11-14 11:37:19 UTC
I just had to fix the tree as Mike's recent switch from nocxx to cxx caused Portage to ignore the cxx dependencies when it was expressed as this:

|| ( dev-libs/gmp[cxx] dev-libs/gmp[-nocxx] )

Since no version of gmp had nocxx USE flag, it was always considered disabled, so dev-libs/gmp[-cxx] was satisfying the second part of the conditional quite well.

While just not allowing -flag on unknown flag is not a good idea (think of use.masked flags or flags that only exist in overlays), it should warn as that might not be what the developer intended in the first place.
Comment 1 Sebastian Luther (few) 2011-11-14 12:11:41 UTC
(In reply to comment #0)
>[...]
> Since no version of gmp had nocxx USE flag, it was always considered disabled,
> so dev-libs/gmp[-cxx] was satisfying the second part of the conditional quite
> well.

This is not true. If a package doesn't have the flag it's considered as not matching the dependency.

> [...]
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-11-14 12:19:31 UTC
Then please explain why ppl with such a dependency had no issue with me having dev-libs/gmp[-cxx] installed... Yes I already doublecheckd that the ebuild was updated. No I had it in no other overlay.

It might just be a bug in Portage I guess, but still..
Comment 3 Sebastian Luther (few) 2011-11-14 12:28:05 UTC
Can you provide some output from emerge where it does something that you think is wrong? If you can, post the output and attach the output with --debug added.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-11-14 12:35:54 UTC
I can't because I fixed the tree and I have no intention to break my system again, as I already spent enough time on this today to be honest.

But simply put: Mike changed from nocxx to cxx, and I have -cxx in my master USE variable; emerge -avuDN @world @system made me rebuild gmp[-cxx] without any issue, but I had ppl (with the dependency reported) installed in the system, which caused preserve-libs to kick in (luckily).
Comment 5 Sebastian Luther (few) 2011-11-14 12:46:03 UTC
(In reply to comment #4)
> [...]
> But simply put: Mike changed from nocxx to cxx, and I have -cxx in my master
> USE variable; emerge -avuDN @world @system made me rebuild gmp[-cxx] without
> any issue, but I had ppl (with the dependency reported) installed in the
> system, which caused preserve-libs to kick in (luckily).

That's bug 367555.

@Zac: What about enabling --complete-graph for use changes too? (like --complete-graph-if-new-ver)
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-11-14 13:03:22 UTC
AFAICT dropping the || () is enough for Portage to start reporting this as a problem as expected.
Comment 7 Arfrever Frehtes Taifersar Arahesis 2011-11-14 13:09:59 UTC
`emerge` would treat dev-libs/gmp[-nocxx] as satisfied if a version with IUSE="nocxx" and USE="-nocxx" was still installed in VDB.
Comment 8 Sebastian Luther (few) 2011-11-14 13:13:45 UTC
(In reply to comment #6)
> AFAICT dropping the || () is enough for Portage to start reporting this as a
> problem as expected.

This works only if there is an ebuild which has both use flags. And in this case you should write the dep as dev-libs/gmp[cxx,-nocxx].

And this won't help with the issue I pointed out, as portage isn't going to even look at the installed package's dependencies.
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-11-14 13:27:19 UTC
I guess I see it as fixed by that change because it forces portage to reconsider PPL's dependencies (not gmp's reverse dependencies!). Since the installed gmp[-nocxx] satisfies the || (), as Arfrever points out, it wouldn't require the [cxx] during direct dependency resolution, but once I changed ppl (and the rest) to require [cxx] explicitly, then it won't accept [-nocxx] any longer.
Comment 10 Sebastian Luther (few) 2011-11-14 14:02:29 UTC
(In reply to comment #9)
> I guess I see it as fixed by that change because it forces portage to
> reconsider PPL's dependencies (not gmp's reverse dependencies!). 
> [...]

I don't see why your change would do that. Either ppl gets pulled into the dependency tree or not. In the former case emerge would use the updated deps, in the latter case it wouldn't look at ppl's deps at all (neither the old nor the new). What your change does, is to force people to reinstall gmp with the new IUSE/USE, while vapier's version would have allowed people to continue with the installed version (without any unsatisfied dependency).
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-11-14 14:08:35 UTC
ppl is brought in by nacl-toolchain-newlib (and another package), that is already installed. With an -uD it'll be requiring a rebuild of gmp[cxx] because of the new dependencies (and you said that yourself).

With Mike's version _if you use -N_ you will get a half-hosed system that would require you to rebuild ppl itself instead, due to @preserved-rebuild and/or revdep-rebuild, which takes even more time.
Comment 12 Sebastian Luther (few) 2011-11-14 14:18:18 UTC
(In reply to comment #11)
> ppl is brought in by nacl-toolchain-newlib (and another package), that is
> already installed. With an -uD it'll be requiring a rebuild of gmp[cxx] because
> of the new dependencies (and you said that yourself).

Right, but with the old dep the gmp reinstall could be avoided.

> 
> With Mike's version _if you use -N_ you will get a half-hosed system that would
> require you to rebuild ppl itself instead, due to @preserved-rebuild and/or
> revdep-rebuild, which takes even more time.

An emerge -uDN world will give a working system. Only if you do something like emerge gmp, which doesn't pull ppl into the dependency tree will break your system. This is what I pointed out in comment 5.
Comment 13 Sebastian Luther (few) 2011-11-14 14:21:16 UTC
(In reply to comment #12)
> An emerge -uDN world will give a working system. Only if you do something like
> emerge gmp, which doesn't pull ppl into the dependency tree will break your
> system. This is what I pointed out in comment 5.

And this is independent of which version of the dep in ppl you use.
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-11-14 16:37:15 UTC
`emerge -avuDN @world @system` did _not_ give a working system, with Mike's dependencies, it did with mine.
Comment 15 Sebastian Luther (few) 2011-11-14 16:58:14 UTC
(In reply to comment #14)
> `emerge -avuDN @world @system` did _not_ give a working system, with Mike's
> dependencies, it did with mine.

That sounds impossible, but there is no way to do anything if you don't have logs.