Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 3711 - Emerge should inform if ebuild takes env vars
Summary: Emerge should inform if ebuild takes env vars
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Arcady Genkin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-13 19:21 UTC by Troy Dack
Modified: 2003-02-04 19:42 UTC (History)
2 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 Troy Dack 2002-06-13 19:21:01 UTC
Some ebuilds allow a reduced number of components to be built by setting ebuild
specific environment vars, Alsa is one such ebuild.

It would also be nice if ebuilds that had this functionality could inform the
user just prior to commencing the emerge, and pause for a few (5) seconds prior
to starting the emerge.

eg: psuedo-code

if no ebuild specific environment vars
 then
      beep
      cat <<EOT
This ebuild has the ability to compile a reduced number of components
To specify the components to build do the following:

export EBUILD_ENVIRONMENT_VAR=component; emerge package

The components that this ebuild can process are:
       component1 component2
This ebuild will now pause for 5 seconds.  
If you wish to set the environment variable press CTRL+C to stop the process,
otherwise all components will be built
EOT
       sleep 5
fi

rest of ebuild as per normal.
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2002-06-13 19:23:31 UTC
arcady, what's this about alsa being thinner?
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2002-06-13 19:23:41 UTC
arcady, what's this about alsa being thinner?
Comment 3 Arcady Genkin (RETIRED) gentoo-dev 2002-06-13 23:48:53 UTC
Seemant: alsa-driver allows specifying which drivers to build by setting
ALSA_CARDS environment variable.  This can significantly reduce compile time.
;^) This is documented at the very top of the ebuild file.  I used similar
approach is used to compile WindowMaker with XKB mode lock support.  The idea
comes from FreeBSD's ports.

Troy: I'd agree that this needs to be communicated at the build time.  I'm
opposed to the idea of beeping and halting for 5 seconds, at least for
alsa-driver.  This is not really important to pause; it's sort of easter egg
kinda stuff.  IMO, this should be handled by the ebuild maintainer on a
per-package basis.  I'll insert an einfo somewhere to print a message,
documenting the feature.
Comment 4 Troy Dack 2002-06-14 01:06:22 UTC
My main reason for posting this bug was because of bug #3575 that proposes a
discreet ebuild for a browser only Mozilla.

Using the env vars seemed like a neat solution that would not require a complete
new ebuild.

I figured a short pause would give people time to back out, otherwise everything
just goes as normal and they are none the wiser.  What's 5 seconds to a 2 or 3
hour build of say Mozilla :) ?

I'll leave the implementation up to the experts.
Comment 5 Grant Goodyear (RETIRED) gentoo-dev 2002-06-14 12:07:11 UTC
I wouldn't mind if emerge -s reported that the ebuild takes environment
variables, but I don't like the idea of pausing an ebuild.  I'm pretty sure that
subpackages are still in the works, and this is a good case for them.
Comment 6 Arcady Genkin (RETIRED) gentoo-dev 2002-10-26 15:10:52 UTC
I'm going to close this one.  The Alsa installation manual (part of the Desktop
configuration guide) now mentions the ALSA_CARDS build-time environment
variable.  As the maintainer of the alsa package I choose not to include the
beep + sleep 5 in this particular case.  I think that there is *very* little
harm in having everybody compile all alsa drivers, not enough for bugging
everybody with a beep and pause. ;^)