Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 400999 - sci-visualization/gnuplot-4.6_rc1 always depends on emacs even with "-emacs -xemacs"
Summary: sci-visualization/gnuplot-4.6_rc1 always depends on emacs even with "-emacs -...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Ulrich Müller
URL:
Whiteboard:
Keywords:
: 401033 401121 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-27 08:57 UTC by octoploid
Modified: 2012-01-28 03:17 UTC (History)
6 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 octoploid 2012-01-27 08:57:23 UTC
This line is responsible:
!emacs? ( !xemacs? ( || ( virtual/emacs app-xemacs/texinfo ) ) )

# emerge -pv gnuplot

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] app-emacs/emacs-common-gentoo-1.3  USE="X -emacs22icons" 46 kB
[ebuild  N     ] app-admin/eselect-emacs-1.13  8 kB
[ebuild  N     ] app-editors/emacs-23.4_rc1  USE="X alsa dbus gif gpm gtk jpeg png svg tiff xft xpm -Xaw3d (-aqua) -athena -gconf -gzip-el -hesiod -kerberos -livecd -m17n-lib -motif -sound -source -toolkit-scroll-bars" 46,603 kB
[ebuild  N     ] virtual/emacs-23  0 kB
[ebuild     U  ] sci-visualization/gnuplot-4.6_rc1 [4.4.4-r1] USE="X cairo gd qt4%* readline -doc -emacs -examples -ggi -latex -lua -plotutils (-svga) -thin-splines -wxwidgets -xemacs" 4,902 kB

Total: 5 packages (1 upgrade, 4 new), Size of downloads: 51,558 kB

Reproducible: Always
Comment 1 Thomas Witt 2012-01-27 09:01:53 UTC
gnuplot works fine after removing the mentioned line from the ebuild. If it is ignored, what is the point of having an emacs useflag anyway?
Comment 2 Markus Peloquin 2012-01-27 09:52:35 UTC
I think this bug 366129 is the reason for it. Without emacs/xemacs/texinfo, the pre-generated documentation files WERE outdated in a PREVIOUS release. From that bug:

> Watch out for the following message in build.log: "No emacs found - cannot
> create texinfo file"

But I don't see this show up.

Some people don't have any emacs-related packages installed for religious reasons, and Gentoo should respect that. :)
Comment 3 Markus Peloquin 2012-01-27 09:54:03 UTC
(I should say, I didn't see that show up after removing the dependency from the ebuild manually.)
Comment 4 Ulrich Müller gentoo-dev 2012-01-27 16:05:45 UTC
(In reply to comment #0)
> This line is responsible:
> !emacs? ( !xemacs? ( || ( virtual/emacs app-xemacs/texinfo ) ) )

This dependency is correct: Either GNU Emacs or XEmacs is needed as dependency for building gnuplot.texi from gnuplot.doc (even in the USE="-emacs -xemacs" case). See docs/Makefile.in:

$(srcdir)/gnuplot.texi: $(srcdir)/doc2texi.el $(srcdir)/gnuplot.doc
	@echo "Creating texinfo"
	@if test "$(EMACS)" != no; then \
	   cd $(srcdir) ;  \
	   $(EMACS) -batch -l doc2texi.el -f d2t-doc-to-texi ; \
	else \
	   echo "No emacs found - cannot create texinfo file" ; \
	fi

The distributed tarball comes with a pre-built gnuplot.texi, so for the regular ebuilds the build-time dependency could be lifted. However, it is still needed for the live ebuild.
Comment 5 Ulrich Müller gentoo-dev 2012-01-27 16:07:38 UTC
*** Bug 401033 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2012-01-27 16:34:49 UTC
@ulm: Thanks for fixing it! I will sync it with sci overlay later.

I am still a bit unhappy with EMACS=$(usev emacs || usev xemacs || echo no)
as it will not build texi doc (and fail) in case that all emcacs' are disabled, but one of them is still installed (due to DEPEND)

I guess EMACS=no is fine for all non-live ebuilds, but live-ebuild need the check with has_version. Let's keep that change for rc2 ;-)
Comment 7 Ulrich Müller gentoo-dev 2012-01-27 17:04:28 UTC
Hm, I think that USE flags should have highest priority to determine what Emacs will be used. But we could fall back to the has_version heuristics in case of the live ebuild with USE="-emacs -xemacs". The following should work:

	local emacs=$(usev emacs || usev xemacs || echo no)
	if [[ -z ${PV%%*9999} ]] && [[ emacs = no ]]; then
		if has_version virtual/emacs; then
			emacs=emacs
		elif has_version app-xemacs/texinfo; then
			emacs=xemacs
		fi
	fi
Comment 8 Dennis Schridde 2012-01-27 17:57:04 UTC
Can't you just do the following?

if [[ "${PV}" = *9999* ]] ; then
  DEPEND="${DEPEND} !emacs? ( !xemacs? ( || (...) ) )
fi
Comment 9 Christoph Junghans (RETIRED) gentoo-dev 2012-01-27 18:56:53 UTC
(In reply to comment #8)
> Can't you just do the following?
> 
> if [[ "${PV}" = *9999* ]] ; then
>   DEPEND="${DEPEND} !emacs? ( !xemacs? ( || (...) ) )
> fi

Ulrich, has done exactly that! It is more a question, which emacs to use in the live ebuild if both are disabled.
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2012-01-28 03:17:50 UTC
*** Bug 401121 has been marked as a duplicate of this bug. ***