Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27175 - anthy-4300b ignore USE="-emacs"
Summary: anthy-4300b ignore USE="-emacs"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Mamoru KOMACHI (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-23 07:12 UTC by Akinori Hattori
Modified: 2003-08-24 13:31 UTC (History)
1 user (show)

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


Attachments
anthy-4300b.diff (anthy-4300b.diff,489 bytes, patch)
2003-08-23 07:14 UTC, Akinori Hattori
Details | Diff
anthy-4300b.diff (another solution) (anthy-4300b.diff,1.54 KB, patch)
2003-08-23 09:46 UTC, Mamoru KOMACHI (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Akinori Hattori gentoo-dev 2003-08-23 07:12:44 UTC
Hello!

When I tested "emerge -epv anthy" with USE="-emacs", but it still emerge emacs.
Perhaps, if some ebuild inherit elisp eclass, it will automatically install emacs.
So I made one line patch for enable emacs use flag.

Sorry for my English.
Thank you.


Reproducible: Always
Steps to Reproduce:
Comment 1 Akinori Hattori gentoo-dev 2003-08-23 07:14:54 UTC
Created attachment 16500 [details, diff]
anthy-4300b.diff
Comment 2 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-23 09:46:10 UTC
Created attachment 16502 [details, diff]
anthy-4300b.diff (another solution)
Comment 3 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-23 10:00:22 UTC
Thanks for reporting.  It certainly is a bug, but the patch
(`use emacs && inherit elisp` rather than just `inherit elisp`)
doesn't seem to solve the problem.

Once you do 

	ACCEPT_KEYWORDS="~x86" USE="emacs" emerge -pev anthy

you will get app-editors/emacs as dependency and  the next time you do

	ACCEPT_KEYWORDS="~x86" USE="-emacs" emerge -pev anthy

you will still get app-editors/emacs as dependency.  It seems
that the result of emerge -pe is cached and will not be re-caliculated
the next emerge, which will lead to incorrect dependency.

In short, your patch should work if Portage correctly caliculates
dependency when USE has been changed (i.e. I think `use emacs &&
ihnerit elisp` should be allowed by Portage), but momentarily I added
a patch to not declare `inherit elisp` at the top of the ebuild to
avoid this problem.
Comment 4 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-24 11:58:46 UTC
Committed the temporal fix.  Thanks.
Comment 5 Nicholas Jones (RETIRED) gentoo-dev 2003-08-24 12:15:43 UTC
inherit is NEVER allowed to be conditional that way.
Either you inherit, or you don't. There is no middle ground.

It can be worked around, but any auxdb variables MAY NOT be
involved in bash conditional statements.
Comment 6 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-24 13:31:08 UTC
I see.  I found an ebuild side workaround to this problem in net-im/licq.
licq-1.2.7.ebuild says:

inherit kde-base
need-kde 3.0

[snip]

# we can't have conditional dependencies so "use kde && inherit kde-base" 
# won't work -- messes up dep caching.

# need-kde and their eclass friends inject things into DEPEND. But we only
# want them enabled if the kde USE flag is set. We get around this in the
# following dep lines:
RDEPEND="kde? ( ${DEPEND} )"
DEPEND="kde? ( ${DEPEND} )
        ssl? ( >=dev-libs/openssl-0.9.6 )
	qt? ( >=x11-libs/qt-3.0.0 )
	ncurses? ( sys-libs/ncurses )"

However, it doesn't seem to work.  When I run USE="-kde" emerge -pev licq,
hundreds of kde-related ebuild are going to be installed.  Is there any
general workaround for the problem?

* x11-misc/rss-glx
* x11-misc/rss-glx
* app-i18n/nkf
* app-i18n/xsim
* app-text/kbedic
* net-irc/kvirc
* net-www/swish-e
* net-im/sim
* net-mail/evolution
* app-office/siag
* media-sound/apollo
* app-sci/chemtool

are those packages which uses conditional statement with eclass ihneritance.
I think it would be better to describe the problem in Ebuild HOWTO or Eclass
HOWTO.