Summary: | sys-apps/portage accepts cat/pkg[A?] even if A is not in IUSE | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Aaron W. Swenson <titanofold> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex_y_xu, SebastianLuther |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Aaron W. Swenson
2010-02-24 17:17:17 UTC
Well, you don't understand the syntax apparently. What it means is that ocamlopt use flag needs to have the same value (i.e., set or unset) for both dev-lang/ocaml and dev-ml/camlidl, *NOT* that the dependency is optional. The dependency is clearly a hard one. emerge app-doc/pms and see chapter 9.2.4 Simply put - if you compiled dev-lang/ocaml with USE=ocamlopt, then you need to enable USE=ocamlopt for dev-ml/camlid as well. Other than that, it will depend on dev-lang/ocaml no matter what, the conditional is just for checking the state of USE flags between those two ebuilds. (In reply to comment #2) > Simply put - if you compiled dev-lang/ocaml with USE=ocamlopt, then you need to > enable USE=ocamlopt for dev-ml/camlid as well. Other than that, it will depend > on dev-lang/ocaml no matter what, the conditional is just for checking the > state of USE flags between those two ebuilds. > But, ocamlopt isn't exposed as a USE flag option for dev-ml/camlidl # emerge -pv dev-ml/camlidl [ebuild N ] app-emacs/ocaml-mode-3.10.2 2,232 kB [ebuild N ] dev-lang/ocaml-3.10.2 USE="X emacs gdbm ncurses tk -latex -ocamlopt -xemacs" 0 kB [ebuild N ] dev-ml/camlidl-1.05 99 kB And it doesn't appear that the USE flag is used to enable or disable any config options. PMS says: " [opt?] The flag must be enabled if the flag is enabled for the package with the dependency. " This means that having DEPEND="cat/pkg[A?]" doesn't make much sense if A is not in IUSE of the ebuild the DEPEND string belongs to. We should also check for invalid USE conditionals elsewhere in *DEPEND, and also in SRC_URI. Additionally, reading the ChangeLog, dev-ml/camlidl requires ocamlopt to be enabled for dev-lang/ocaml. The conditional should be a requirement and is probably just a typo. (In reply to comment #6) > Additionally, reading the ChangeLog, dev-ml/camlidl requires ocamlopt to be > enabled for dev-lang/ocaml. The conditional should be a requirement and is > probably just a typo. @ml herd: please either add ocamlopt to IUSE or change [ocamlopt?] to [ocamlopt]. (In reply to comment #7) > (In reply to comment #6) > > Additionally, reading the ChangeLog, dev-ml/camlidl requires ocamlopt to be > > enabled for dev-lang/ocaml. The conditional should be a requirement and is > > probably just a typo. > > @ml herd: please either add ocamlopt to IUSE or change [ocamlopt?] to > [ocamlopt]. > http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ml/camlidl/camlidl-1.05.ebuild?r1=1.3&r2=1.4 Petteri, I would really have preferred having a bug asking for built_with_use to be removed than such a broken commit; please fix (In reply to comment #8) > http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ml/camlidl/camlidl-1.05.ebuild?r1=1.3&r2=1.4 > > > Petteri, I would really have preferred having a bug asking for built_with_use > to be removed than such a broken commit; please fix > Thanks, I've removed the conditional since it was apparently a mistake. strictly speaking, this makes sense. "if ocamlopt is set, then require ocaml to be built with ocamlopt. otherwise, require ocaml.". since ocamlopt is not set, ocaml is required with the state of ocamlopt being unspecified. similar arguments can be made for [opt=] etc. now, an argument can certainly be made that repoman should warn about this, and I don't know if it does or not. This has been fixed since 2.2_rc70: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c68ab8f601e98b3240f812b616b0aeed0fd29776 |