First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 75936
Alias:
Product:
Component:
Status: RESOLVED
Resolution: DUPLICATE of bug 177860
Assigned To: PMS/EAPI Bugs <pms-bugs@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 75936 depends on: Show dependency tree
Bug 75936 blocks: 174380
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-12-28 12:11 0000
As previously discussed, a method for handling conflicting USE flags at
--pretend time is required, since some people no longer like using the tried
and trusted "pick something that works" and make the ebuild die in pkg_setup
instead. Either a new function (pkg_depcheck or whatever) or some strange
variable like Nick suggested would make this a lot less painful.

Personally I'm in favour of the pkg_depcheck system. Most packages wouldn't use
it, and those that did could use an eclass to standardise the checks and
messages. Note that this function could *only* be used for
make.conf-specified-things checks, since the environment could change between
emerge -pv and emerge reaching the package in question.

------- Comment #1 From Nguyen Thai Ngoc Duy (RETIRED) 2004-12-30 06:09:15 0000 -------
Could someone please summarize possible approaches to solve this? I did search
gentoo-dev archives but found nothing (maybe i used wrong keywords)

------- Comment #2 From Ciaran McCreesh 2004-12-30 08:50:13 0000 -------
Ok, first option:

pkg_depcheck() {
    if use qt && use gtk ; then
        eerror "Error calculating dependencies for ${P}:"
        eerror "The qt and gtk USE flags are mutually exclusive for this package."
        eerror "Please unset one of these flags. This can be done on a per-package"
        eerror "basis using /etc/portage/package.use, which is documented in man 5"
        eerror "portage."
        die "Error checking USE flags for ${PN}"
    fi
}

Except I'd offload the message displays into an eclass so that we get totally consistent behaviour between packages... Something like:

pkg_depcheck() {
    depcheck-mutually-exclusive "gtk" "qt"
}

The other option, suggested by Nick, is something like:

USE_CONFLICTS="
    gtk? ( !qt )
    qt?  ( !gtk )"

which is probably faster, but is kinda difficult to work with. Although, I guess that could be offloaded into an eclass too...

USE_CONFLICTS="
    $(useconflicts-make-mutually-exclusive gtk qt )"

------- Comment #3 From Jason Stubbs (RETIRED) 2005-04-12 07:54:46 0000 -------
*** Bug 84937 has been marked as a duplicate of this bug. ***

------- Comment #4 From Robin Johnson 2005-04-12 12:21:45 0000 -------
pkg_depcheck needs to be more generic than just stuff in make.conf. From my
duplicate bug, I gave this as one of the examples
====
If you try upgrade from openldap-2.1 to 2.2 and you have an LDAP server on that
machine, without following the upgrade instructions, it WILL corrupt your
database.

To work around this, pkg_setup detects if you are doing an upgrade from 2.1 to
2.2 (and you have a local database), and displays the upgrade instructions,
then fails out. Again, if this happens N hours into a build process, it stops
the automated build.
====

------- Comment #5 From Simon Stelling (RETIRED) 2006-03-03 13:22:30 0000 -------
the pkg_depcheck() approach looks far saner to me as it could be used for all
kind of stuff, not only dependency checking. however, as it is run everytime
the dependencies are calculated, it would make the cache completely useless and
massively slow down dep calculation. best way to workaround this issue i can
think of would be to set a "i've got a pkg_depcheck function" flag in the cache
and have portage only source the ebuild when it is set. as most packages won't
need pkg_depcheck, this shouldn't hurt too much.

------- Comment #6 From Michael Stewart (vericgar) (RETIRED) 2006-03-03 18:59:09 0000 -------
It would not have to make the cache useless if it's done as a seperate stage.
Do the dep calculation, then run pkg_depcheck for every package, then do the
merge for each package. This would put all the warnings and errors after the
deptree is built but before anything is started to be merged.

------- Comment #7 From Steve L 2007-06-29 10:30:41 0000 -------
Hi,

  Not trying to spam, just wondering if this issue is still open with the new
portage? If so, the pkg_depcheck looks sane to me too, if it can be done as a
separate stage as described.

------- Comment #8 From Ciaran McCreesh 2009-06-29 18:32:32 0000 -------
177860 is a better bug for this

*** This bug has been marked as a duplicate of bug 177860 ***

First Last Prev Next    No search results available      Search page      Enter new bug