Bug 154759 - app-emacs/emacs-w3m-1.4.4-r1 bad build_with_use check
Bug#: 154759 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: All Status: RESOLVED Severity: minor Priority: P4
Resolution: FIXED Assigned To: emacs@gentoo.org Reported By: pflm52td@w6.dion.ne.jp
Component: Ebuilds
URL: 
Summary: app-emacs/emacs-w3m-1.4.4-r1 bad build_with_use check
Keywords:  
Status Whiteboard: 
Opened: 2006-11-11 00:03 0000
Description:   Opened: 2006-11-11 00:03 0000
Hi. There's an implicit dependency error in app-emacs/emacs-w3m-1.4.4-r1 (the
latest ebuild). It is introduced newly in this version. 

First, as the half answer, let's see the ebuild. In pkg_setup() function, a
line reads:

if built_with_use www-client/w3m async; then

The correct code should be something like:

if is_installed www-client/w3m &&
   built_with_use www-client/w3m async; then
# or 
if is_installed www-client/w3mmee ||
   built_with_use www-client/w3m async; then

I couldn't figure out the desired function, so I just name it as
"is_installed".

Let me explain. The package depends on virtual/w3m. There're two ebuilds which
provide it; they're www-client/w3m and www-client/w3mmee.

The ebuild refuses the case where w3m is built with async flag on. It's OK. On
the other hand, a user must be able to choose w3mmee without having w3m. This
case is forgotten, because built_with_use assumes that www-client/w3m is
installed.

Since w3mmee does not have async flag, the above is enough.

Thanks a lot for your commitment.

------- Comment #1 From Jakub Moc (RETIRED) 2006-11-11 01:17:52 0000 -------
(In reply to comment #0)
> The correct code should be something like:

has_version is the right one ;)

------- Comment #2 From Christian Faulhammer 2006-11-17 02:17:26 0000 -------
Thanks for the info, fixed in CVS.