portage.git
17 years agoupdate TODO list
Marius Mauch [Mon, 3 Dec 2007 19:34:29 +0000 (19:34 -0000)]
update TODO list

svn path=/main/trunk/; revision=8825

17 years agorevert accidential commit
Marius Mauch [Mon, 3 Dec 2007 19:31:57 +0000 (19:31 -0000)]
revert accidential commit

svn path=/main/trunk/; revision=8824

17 years agoBug #201082 - Don't call config.load_infodir() prior to pkg_postinst()
Zac Medico [Mon, 3 Dec 2007 19:12:37 +0000 (19:12 -0000)]
Bug #201082 - Don't call config.load_infodir() prior to pkg_postinst()
because it's not needed and the ebuild path that's passed in for
postinst is may be from the portage tree, which causes load_infodir()
to discard critical metadata such as CATEGORY without realoading
it.

svn path=/main/trunk/; revision=8822

17 years agoimplement the final part of FEATURES=preserved-libs and remove previously preserved...
Marius Mauch [Mon, 3 Dec 2007 19:09:20 +0000 (19:09 -0000)]
implement the final part of FEATURES=preserved-libs and remove previously preserved libs that don't have any consumers left. Also fix the notice if preserved libs are found to use the preserved-rebuild package set instead of revdep-rebuild.

svn path=/main/trunk/; revision=8821

17 years ago* whitelist CCACHE_* and DISTCC_* variables in config.environ()
Zac Medico [Mon, 3 Dec 2007 06:19:43 +0000 (06:19 -0000)]
* whitelist CCACHE_* and DISTCC_* variables in config.environ()
* unset CCACHE_* and DISTCC_* variables in save_ebuild_env()

svn path=/main/trunk/; revision=8818

17 years agoFor compatibility with cvs.eclass, do not unset CVS_RSH in
Zac Medico [Sun, 2 Dec 2007 22:04:00 +0000 (22:04 -0000)]
For compatibility with cvs.eclass, do not unset CVS_RSH in
save_ebuild_env() since that variable may be initialized in
global scope.

svn path=/main/trunk/; revision=8816

17 years agoConvert caterror() to call warn() instead of err() since
Zac Medico [Sun, 2 Dec 2007 21:12:33 +0000 (21:12 -0000)]
Convert caterror() to call warn() instead of err() since
we don't want to exit here.

svn path=/main/trunk/; revision=8808

17 years agoAdd back missing err() function.
Zac Medico [Sun, 2 Dec 2007 21:07:30 +0000 (21:07 -0000)]
Add back missing err() function.

svn path=/main/trunk/; revision=8807

17 years agoFix useq() so that it won't generate a bogus IUSE QA Notice
Zac Medico [Sun, 2 Dec 2007 20:55:48 +0000 (20:55 -0000)]
Fix useq() so that it won't generate a bogus IUSE QA Notice
if called during the "depend" phase with a flag that uses
IUSE defaults.

svn path=/main/trunk/; revision=8805

17 years agoSynchronize self-reinstallation logic so that emerge will always
Zac Medico [Sun, 2 Dec 2007 09:10:56 +0000 (09:10 -0000)]
Synchronize self-reinstallation logic so that emerge will always
restart itself when dblink.merge() creates temporary copies of
PORTAGE_{BIN,PYM}_PATH.

svn path=/main/trunk/; revision=8803

17 years agoIn dblink.treewalk(), tweak the "Safely unmerging
Zac Medico [Sun, 2 Dec 2007 07:58:07 +0000 (07:58 -0000)]
In dblink.treewalk(), tweak the "Safely unmerging
already-installed instance" logic to make sure that
it works in all possible cases.

svn path=/main/trunk/; revision=8801

17 years agoFor portage.spawn() calls, use a _shell_quote() function to quote
Zac Medico [Sun, 2 Dec 2007 06:44:02 +0000 (06:44 -0000)]
For portage.spawn() calls, use a _shell_quote() function to quote
the path of the binary since.

svn path=/main/trunk/; revision=8798

17 years ago* whitelist some misc variables from the calling environment
Zac Medico [Sat, 1 Dec 2007 22:26:29 +0000 (22:26 -0000)]
* whitelist some misc variables from the calling environment
* blacklist the same variables in save_ebuild_env() so that
  the latest values from the calling environment always
  override those from the ebuild environment

svn path=/main/trunk/; revision=8796

17 years agoShow the pid in the "starting parallel fetching" message.
Zac Medico [Sat, 1 Dec 2007 21:39:39 +0000 (21:39 -0000)]
Show the pid in the "starting parallel fetching" message.

svn path=/main/trunk/; revision=8794

17 years agoWhen os.waitid() raises OSError, discard the pid since there's
Zac Medico [Sat, 1 Dec 2007 21:23:40 +0000 (21:23 -0000)]
When os.waitid() raises OSError, discard the pid since there's
no need to wait on it again.

svn path=/main/trunk/; revision=8792

17 years agoAfter each merge, collect status from child processes
Zac Medico [Sat, 1 Dec 2007 21:11:28 +0000 (21:11 -0000)]
After each merge, collect status from child processes
in order to clean up zombies (such as the parallel-fetch
process).

svn path=/main/trunk/; revision=8791

17 years agoMove duplicate module loading code into a function.
Zac Medico [Sat, 1 Dec 2007 12:45:37 +0000 (12:45 -0000)]
Move duplicate module loading code into a function.

svn path=/main/trunk/; revision=8789

17 years agoAdd missing newline after message.
Zac Medico [Sat, 1 Dec 2007 12:28:27 +0000 (12:28 -0000)]
Add missing newline after message.

svn path=/main/trunk/; revision=8787

17 years agoIn create_trees(), when isolating the environment of the ROOT=/ config,
Zac Medico [Sat, 1 Dec 2007 08:38:31 +0000 (08:38 -0000)]
In create_trees(), when isolating the environment of the ROOT=/ config,
use it's env.d keys as a blacklist to make env.d override the calling
environment.

svn path=/main/trunk/; revision=8785

17 years agoWhen die has been called and ${T}/environment does not exist,
Zac Medico [Sat, 1 Dec 2007 08:04:46 +0000 (08:04 -0000)]
When die has been called and ${T}/environment does not exist,
dump the current environment to ${T}/die.env in case it helps
for debugging.

svn path=/main/trunk/; revision=8783

17 years ago* whitelist PREROOTPATH in config.environ()
Zac Medico [Sat, 1 Dec 2007 04:19:20 +0000 (04:19 -0000)]
* whitelist PREROOTPATH in config.environ()
* filter PREROOTPATH in save_ebuild_env()

svn path=/main/trunk/; revision=8781

17 years ago* whitelist DISTDIR, PORTDIR, and PORTAGE_TMPDIR, PORTAGE_WORKDIR_MODE.
Zac Medico [Sat, 1 Dec 2007 03:07:47 +0000 (03:07 -0000)]
* whitelist DISTDIR, PORTDIR, and PORTAGE_TMPDIR, PORTAGE_WORKDIR_MODE.
* whitelist RPMDIR just for the "rpm" phase.

svn path=/main/trunk/; revision=8779

17 years agoUpdate comments about ROOTPATH:
Zac Medico [Sat, 1 Dec 2007 01:36:05 +0000 (01:36 -0000)]
Update comments about ROOTPATH:
sandbox's bashrc sources /etc/profile which unsets ROOTPATH,
so we have to back it up and restore it

svn path=/main/trunk/; revision=8777

17 years agoUpdate comments about ROOTPATH:
Zac Medico [Sat, 1 Dec 2007 01:34:55 +0000 (01:34 -0000)]
Update comments about ROOTPATH:
sandbox's bashrc sources /etc/profile which unsets ROOTPATH,
so we have to back it up and restore it.

svn path=/main/trunk/; revision=8776

17 years agoFix quoting for PORTAGE_ROOTPATH.
Zac Medico [Sat, 1 Dec 2007 00:46:01 +0000 (00:46 -0000)]
Fix quoting for PORTAGE_ROOTPATH.

svn path=/main/trunk/; revision=8774

17 years agoIn doebuild_environment(), fix KV logic so that it never
Zac Medico [Sat, 1 Dec 2007 00:25:53 +0000 (00:25 -0000)]
In doebuild_environment(), fix KV logic so that it never
gets set during the "depend" phase. Also, use
backup_changes() to properly cache the result.

svn path=/main/trunk/; revision=8771

17 years agoBug #200863 - Don't filter ${KV} since kernel-2.eclass uses that
Zac Medico [Sat, 1 Dec 2007 00:24:10 +0000 (00:24 -0000)]
Bug #200863 - Don't filter ${KV} since kernel-2.eclass uses that
variable and we don't want to interfere.

svn path=/main/trunk/; revision=8770

17 years agosandbox unsets ROOTPATH, so we have to back it up on the python
Zac Medico [Fri, 30 Nov 2007 23:43:59 +0000 (23:43 -0000)]
sandbox unsets ROOTPATH, so we have to back it up on the python
side then restore it on the bash side.

svn path=/main/trunk/; revision=8768

17 years agoBug #200775 - Save more portage generated environment
Zac Medico [Fri, 30 Nov 2007 11:05:59 +0000 (11:05 -0000)]
Bug #200775 - Save more portage generated environment
variables that are in environment.bz2 so that they are
available for use by tools such as epm.

svn path=/main/trunk/; revision=8765

17 years agoAdd some variables such as TERM to the whitelist of variables
Zac Medico [Fri, 30 Nov 2007 09:27:13 +0000 (09:27 -0000)]
Add some variables such as TERM to the whitelist of variables
from the calling environment that are allowed into the ebuild
environment.

svn path=/main/trunk/; revision=8763

17 years agoDon't use sandbox's BASH_ENV for new shells because it does
Zac Medico [Fri, 30 Nov 2007 09:03:00 +0000 (09:03 -0000)]
Don't use sandbox's BASH_ENV for new shells because it does
'source /etc/profile' which can interfere with the build
environment by modifying our PATH.

svn path=/main/trunk/; revision=8761

17 years agoMake config.environ() export PKGDIR to the ebuild environment
Zac Medico [Fri, 30 Nov 2007 07:19:07 +0000 (07:19 -0000)]
Make config.environ() export PKGDIR to the ebuild environment
during the "package" phase since it's currently referenced
there.

svn path=/main/trunk/; revision=8759

17 years ago* After the initial setup phase, the original ebuild and eclasses are no
Zac Medico [Fri, 30 Nov 2007 01:58:10 +0000 (01:58 -0000)]
* After the initial setup phase, the original ebuild and eclasses are no
  longer needed because the same ebuild environment is reused for the
  entire lifecycle of the package, including uninstallation.

svn path=/main/trunk/; revision=8757

17 years agoRemove unused EBUILD_ENV_FILE variable.
Zac Medico [Fri, 30 Nov 2007 00:54:26 +0000 (00:54 -0000)]
Remove unused EBUILD_ENV_FILE variable.

svn path=/main/trunk/; revision=8755

17 years agoBug #189417 - When ${T}/environment exists, isolate the ebuild
Zac Medico [Fri, 30 Nov 2007 00:35:44 +0000 (00:35 -0000)]
Bug #189417 - When ${T}/environment exists, isolate the ebuild
environment from the calling environment. This makes it possible
for the build to unset a variable that was inherited from the
calling environment, and the variable will remain unset between
phases.

svn path=/main/trunk/; revision=8754

17 years agoMove environment.bz2 extraction from ebuild.sh to doebuild() on
Zac Medico [Thu, 29 Nov 2007 20:24:05 +0000 (20:24 -0000)]
Move environment.bz2 extraction from ebuild.sh to doebuild() on
the python side. The python will be able to use it's awareness
of the ${T}/environment to decide what type of ebuild environment
should be generated. For example, if the ebuild environment
should be able to unset variables that have been inherited from
the calling environment, the existence of ${T}/environment
will indicate that the ebuild environment should be isolated from
the calling environment.

svn path=/main/trunk/; revision=8753

17 years agoMake elog_process() pre-load log modules that it can be called
Zac Medico [Thu, 29 Nov 2007 09:35:01 +0000 (09:35 -0000)]
Make elog_process() pre-load log modules that it can be called
just for that purpose.

svn path=/main/trunk/; revision=8751

17 years agoWhen portage reinstalls itself, pre-load elog modules in
Zac Medico [Thu, 29 Nov 2007 09:06:52 +0000 (09:06 -0000)]
When portage reinstalls itself, pre-load elog modules in
dblink.merge() since we won't be able to later if they get
unmerged (happens when namespace changes).

svn path=/main/trunk/; revision=8749

17 years agoDon't modify sys.path inside dblink.merge() because it doesn't seem
Zac Medico [Thu, 29 Nov 2007 08:28:40 +0000 (08:28 -0000)]
Don't modify sys.path inside dblink.merge() because it doesn't seem
to help and it triggers import errors for elog modules when downgrading
to versions of portage that use the old namespace.

svn path=/main/trunk/; revision=8747

17 years agoAdjust PYTHONPATH when calling portageq so that variable
Zac Medico [Thu, 29 Nov 2007 07:55:34 +0000 (07:55 -0000)]
Adjust PYTHONPATH when calling portageq so that variable
PORTAGE_PYM_PATH works.

svn path=/main/trunk/; revision=8745

17 years agoWhen portage reinstalls itself, copy both the bin and pym
Zac Medico [Thu, 29 Nov 2007 06:06:08 +0000 (06:06 -0000)]
When portage reinstalls itself, copy both the bin and pym
directories to a temp dir. Insert the temporary PORTAGE_PYM_PATH
as the first element of sys.path and register an atexit hook to
clean up the temporary directories.

svn path=/main/trunk/; revision=8743

17 years agoIn dblink.treewalk(), make portage unmerge multiple instances
Zac Medico [Thu, 29 Nov 2007 03:11:18 +0000 (03:11 -0000)]
In dblink.treewalk(), make portage unmerge multiple instances
os sys-apps/portage in the same slot if necessary (needed when
AUTOCLEAN=no is set).

svn path=/main/trunk/; revision=8741

17 years agoRemove stray print statement.
Zac Medico [Thu, 29 Nov 2007 02:37:34 +0000 (02:37 -0000)]
Remove stray print statement.

svn path=/main/trunk/; revision=8739

17 years agoFix references to EBUILD_SH_BINARY so that they work properly
Zac Medico [Thu, 29 Nov 2007 02:19:39 +0000 (02:19 -0000)]
Fix references to EBUILD_SH_BINARY so that they work properly
with variable PORTAGE_BIN_PATH.

svn path=/main/trunk/; revision=8738

17 years agoMake dblink.treewalk() properly delete the installed instance after
Zac Medico [Thu, 29 Nov 2007 00:50:07 +0000 (00:50 -0000)]
Make dblink.treewalk() properly delete the installed instance after
it unmerges it.

svn path=/main/trunk/; revision=8737

17 years agoFix a typo.
Zac Medico [Thu, 29 Nov 2007 00:18:31 +0000 (00:18 -0000)]
Fix a typo.

svn path=/main/trunk/; revision=8736

17 years agoFix more references to MISC_SH_BINARY so that they work properly
Zac Medico [Thu, 29 Nov 2007 00:12:30 +0000 (00:12 -0000)]
Fix more references to MISC_SH_BINARY so that they work properly
with variable PORTAGE_BIN_PATH.

svn path=/main/trunk/; revision=8735

17 years agoIn doebuild, fix paths to ebuild.sh and misc-functions.sh so
Zac Medico [Wed, 28 Nov 2007 23:50:51 +0000 (23:50 -0000)]
In doebuild, fix paths to ebuild.sh and misc-functions.sh so
that they work with variable PORTAGE_BIN_PATH.

svn path=/main/trunk/; revision=8734

17 years agoFix references to PORTAGE_BIN_PATH in doebuild() to use the config
Zac Medico [Wed, 28 Nov 2007 22:57:31 +0000 (22:57 -0000)]
Fix references to PORTAGE_BIN_PATH in doebuild() to use the config
setting since it may be a temp directory when portage is reinstalling
itself.

svn path=/main/trunk/; revision=8733

17 years agoEnable the EBUILD_EXIT_STATUS_FILE sanity check when portage is
Zac Medico [Wed, 28 Nov 2007 22:35:30 +0000 (22:35 -0000)]
Enable the EBUILD_EXIT_STATUS_FILE sanity check when portage is
reinstalling itself since the check is reliable in this case now
that a temporary PORTAGE_BIN_PATH is created.

svn path=/main/trunk/; revision=8732

17 years agoIf portage is reinstalling itself, create a temporary
Zac Medico [Wed, 28 Nov 2007 22:29:06 +0000 (22:29 -0000)]
If portage is reinstalling itself, create a temporary
copy of PORTAGE_BIN_PATH in order to avoid relying on
on the new versions which may be incompatible.

svn path=/main/trunk/; revision=8731

17 years agoBug #200652 - Skip ${T}/environment handling for pkg_nofetch().
Zac Medico [Wed, 28 Nov 2007 18:57:55 +0000 (18:57 -0000)]
Bug #200652 - Skip ${T}/environment handling for pkg_nofetch().

svn path=/main/trunk/; revision=8729

17 years agoIn chk_updated_cfg_files(), avoid scanning for config files for
Zac Medico [Wed, 28 Nov 2007 08:27:28 +0000 (08:27 -0000)]
In chk_updated_cfg_files(), avoid scanning for config files for
paths that aren't writable by the current user. This prevents
Permission denied errors from being triggered later when trying
to scan subdirectories that are inaccessible.

svn path=/main/trunk/; revision=8726

17 years agoDisable PORTAGE_PACKAGE_EMPTY_ABORT by default since
Zac Medico [Wed, 28 Nov 2007 05:49:27 +0000 (05:49 -0000)]
Disable PORTAGE_PACKAGE_EMPTY_ABORT by default since
the scrollkeeper-9999 upgrade will trigger a false
positive. Thanks to leio for reporting.

svn path=/main/trunk/; revision=8724

17 years agoDon't export PORTAGE_PACKAGE_EMPTY_ABORT to the ebuild environment.
Zac Medico [Wed, 28 Nov 2007 04:16:30 +0000 (04:16 -0000)]
Don't export PORTAGE_PACKAGE_EMPTY_ABORT to the ebuild environment.

svn path=/main/trunk/; revision=8721

17 years agoAdd a sanity check in dblink.treewalk() so that a broken ebuild
Zac Medico [Wed, 28 Nov 2007 03:45:40 +0000 (03:45 -0000)]
Add a sanity check in dblink.treewalk() so that a broken ebuild
that doesn't install any files will not be able to replace a
package in the same slot that really installs files.

This check can be bypassed by manually unmerging the old package
or by setting PORTAGE_PACKAGE_EMPTY_ABORT="0" in /etc/make.conf.

svn path=/main/trunk/; revision=8720

17 years agoIn the preprocess_ebuild_env() subshell, check for errors and
Zac Medico [Wed, 28 Nov 2007 00:02:21 +0000 (00:02 -0000)]
In the preprocess_ebuild_env() subshell, check for errors and
return early when necessary.

svn path=/main/trunk/; revision=8718

17 years agoJust use ${PN} instead of catpkgsplit().
Zac Medico [Tue, 27 Nov 2007 22:11:38 +0000 (22:11 -0000)]
Just use ${PN} instead of catpkgsplit().

svn path=/main/trunk/; revision=8716

17 years agoportage upgrade or downgrade invalidates EBUILD_EXIT_STATUS_FILE
Zac Medico [Tue, 27 Nov 2007 21:56:58 +0000 (21:56 -0000)]
portage upgrade or downgrade invalidates EBUILD_EXIT_STATUS_FILE
sanity checks since ebuild.sh portage version may differ from the
current instance that is running in python.

svn path=/main/trunk/; revision=8714

17 years agoRemove a redundant os.EX_OK check that exit_status_check() already
Zac Medico [Tue, 27 Nov 2007 21:16:53 +0000 (21:16 -0000)]
Remove a redundant os.EX_OK check that exit_status_check() already
handles internally.

svn path=/main/trunk/; revision=8712

17 years agoFix logic wrt exit_status_check and elog_process in doebuild().
Zac Medico [Tue, 27 Nov 2007 21:11:24 +0000 (21:11 -0000)]
Fix logic wrt exit_status_check and elog_process in doebuild().

svn path=/main/trunk/; revision=8710

17 years agoBug #200229 - The gimp ebuild defines AA as a local variable. In order
Zac Medico [Tue, 27 Nov 2007 18:52:26 +0000 (18:52 -0000)]
Bug #200229 - The gimp ebuild defines AA as a local variable. In order
to accomodate this, create a PORTAGE_MUTABLE_FILTERED_VARS list for
variables that portage sets but doesn't mark readonly. In order to
prevent changed values from causing unexpcted interference, they are
filtered out of the environment when it is saved or loaded (any
mutations do not persist).

svn path=/main/trunk/; revision=8708

17 years agoDon't forget to unlink ${EBUILD_EXIT_STATUS_FILE} before each phase.
Zac Medico [Tue, 27 Nov 2007 08:20:58 +0000 (08:20 -0000)]
Don't forget to unlink ${EBUILD_EXIT_STATUS_FILE} before each phase.

svn path=/main/trunk/; revision=8706

17 years agoFix config.pop() so that is will properly raise a KeyError.
Zac Medico [Tue, 27 Nov 2007 02:08:03 +0000 (02:08 -0000)]
Fix config.pop() so that is will properly raise a KeyError.

svn path=/main/trunk/; revision=8704

17 years agoBug #200231 - Make dir_get_metadata() handle an exception thrown
Zac Medico [Tue, 27 Nov 2007 01:11:10 +0000 (01:11 -0000)]
Bug #200231 - Make dir_get_metadata() handle an exception thrown
from dir_get_list() when there's a problem connection problem.

svn path=/main/trunk/; revision=8702

17 years agoMake the environment handling code detect errors and die if
Zac Medico [Mon, 26 Nov 2007 23:57:11 +0000 (23:57 -0000)]
Make the environment handling code detect errors and die if
necessary.

svn path=/main/trunk/; revision=8700

17 years agoMake doebuild() use EBUILD_EXIT_STATUS_FILE sanity checks for the
Zac Medico [Mon, 26 Nov 2007 22:19:15 +0000 (22:19 -0000)]
Make doebuild() use EBUILD_EXIT_STATUS_FILE sanity checks for the
extra misc-functions.sh preinst/postinst shell code.

svn path=/main/trunk/; revision=8698

17 years agoMake doebuild skip directory creation for the "cleanrm" command.
Zac Medico [Mon, 26 Nov 2007 22:05:10 +0000 (22:05 -0000)]
Make doebuild skip directory creation for the "cleanrm" command.

svn path=/main/trunk/; revision=8696

17 years agoFix grammar.
Zac Medico [Mon, 26 Nov 2007 20:34:09 +0000 (20:34 -0000)]
Fix grammar.

svn path=/main/trunk/; revision=8694

17 years ago* In doebuild(), don't create directories for the "clean" or "unmerge".
Zac Medico [Mon, 26 Nov 2007 19:02:05 +0000 (19:02 -0000)]
* In doebuild(), don't create directories for the "clean" or "unmerge".
* Fix dyn_clean() to clean the status file and return early when appropriate.

svn path=/main/trunk/; revision=8692

17 years agoMake config.pop() properly call config.modifying().
Zac Medico [Mon, 26 Nov 2007 17:35:59 +0000 (17:35 -0000)]
Make config.pop() properly call config.modifying().

svn path=/main/trunk/; revision=8690

17 years agoImplement config.pop().
Zac Medico [Mon, 26 Nov 2007 17:28:51 +0000 (17:28 -0000)]
Implement config.pop().

svn path=/main/trunk/; revision=8688

17 years agoCheck if ${EBUILD_EXIT_STATUS_FILE} is empty before
Zac Medico [Mon, 26 Nov 2007 12:06:12 +0000 (12:06 -0000)]
Check if ${EBUILD_EXIT_STATUS_FILE} is empty before
attempting to use it.

svn path=/main/trunk/; revision=8686

17 years ago--buildpkgonly will not merge anything, so
Zac Medico [Mon, 26 Nov 2007 11:38:06 +0000 (11:38 -0000)]
--buildpkgonly will not merge anything, so
it cancels all binary package options.

svn path=/main/trunk/; revision=8683

17 years agoBug #200313 - Detect and report when an ebuild phase
Zac Medico [Mon, 26 Nov 2007 11:23:17 +0000 (11:23 -0000)]
Bug #200313 - Detect and report when an ebuild phase
exits unexpectedly. This is type of behavior is known
to be triggered by things such as failed variable
assignments (bug #190128) or bad substitution errors
(bug #200313).

We use a EBUILD_EXIT_STATUS_FILE environment variable
to specify a file that the shell code is supposed to
create when it exits in a normal manner. If the file
does not get created like it's supposed to be then we
can conclude that the shell has exited in some
unexpected way.

svn path=/main/trunk/; revision=8682

17 years agoAutomatically try to load environment.bz2 whenever
Zac Medico [Mon, 26 Nov 2007 05:48:40 +0000 (05:48 -0000)]
Automatically try to load environment.bz2 whenever
"${T}/environment" does not exist, except for "clean"
and "depend" phases.

svn path=/main/trunk/; revision=8680

17 years agoMake diefunc() show the path of ${T}/environment since it's usually
Zac Medico [Mon, 26 Nov 2007 04:40:06 +0000 (04:40 -0000)]
Make diefunc() show the path of ${T}/environment since it's usually
in the stack trace and the user is likely to be interested in it.

svn path=/main/trunk/; revision=8678

17 years agoFilter more misc environment variables.
Zac Medico [Mon, 26 Nov 2007 04:05:43 +0000 (04:05 -0000)]
Filter more misc environment variables.

svn path=/main/trunk/; revision=8676

17 years agounset ECLASS along with the other variables from inherit().
Zac Medico [Mon, 26 Nov 2007 02:52:09 +0000 (02:52 -0000)]
unset ECLASS along with the other variables from inherit().

svn path=/main/trunk/; revision=8674

17 years agoAdd NOCONFMEM to config._environ_filter.
Zac Medico [Mon, 26 Nov 2007 02:44:08 +0000 (02:44 -0000)]
Add NOCONFMEM to config._environ_filter.

svn path=/main/trunk/; revision=8672

17 years ago* Move filtering of a bunch of portage config variables from
Zac Medico [Mon, 26 Nov 2007 02:05:16 +0000 (02:05 -0000)]
* Move filtering of a bunch of portage config variables from
save_ebuild_env() to config.environ().
* Add EMERGE_FROM to the READONLY_PORTAGE_VARS list.

svn path=/main/trunk/; revision=8670

17 years agoBug #124041 - Make emerge show an informative warning message when one
Zac Medico [Mon, 26 Nov 2007 01:05:35 +0000 (01:05 -0000)]
Bug #124041 - Make emerge show an informative warning message when one
or more eclasses override eclasses from PORTDIR. The warning can be
permanently disabled by setting PORTAGE_ECLASS_WARNING_ENABLE="0" in
/etc/make.conf.

svn path=/main/trunk/; revision=8668

17 years agoFilter _RC_GET_KV_CACHE from the saved environment.
Zac Medico [Sun, 25 Nov 2007 23:05:00 +0000 (23:05 -0000)]
Filter _RC_GET_KV_CACHE from the saved environment.

svn path=/main/trunk/; revision=8666

17 years agoMake preprocess_ebuild_env() reload a known good version of
Zac Medico [Sun, 25 Nov 2007 22:46:56 +0000 (22:46 -0000)]
Make preprocess_ebuild_env() reload a known good version of
save_ebuild_env() in order to avoid making an assumption that
it hasn't been overridden.

svn path=/main/trunk/; revision=8663

17 years agoRemove some unsafe assumptions from preprocess_ebuild_env() and
Zac Medico [Sun, 25 Nov 2007 21:34:44 +0000 (21:34 -0000)]
Remove some unsafe assumptions from preprocess_ebuild_env() and
note the remaining assumption that save_ebuild_env() is not
overridden by the environment being loaded.

svn path=/main/trunk/; revision=8662

17 years agoAllow the pkg_info and pkg_config pre/post hooks to run even
Zac Medico [Sun, 25 Nov 2007 09:30:24 +0000 (09:30 -0000)]
Allow the pkg_info and pkg_config pre/post hooks to run even
when the ebuild function is not defined.

svn path=/main/trunk/; revision=8659

17 years agoRemove the empty default pkg_setup, src_install, pkg_preinst,
Zac Medico [Sun, 25 Nov 2007 08:50:49 +0000 (08:50 -0000)]
Remove the empty default pkg_setup, src_install, pkg_preinst,
pkg_postinst, pkg_prerm, pkg_postrm, and pkg_config functions
since they do nothing more than clutter the environment.

svn path=/main/trunk/; revision=8655

17 years agoTest if ebuild functions are defined before calling them. This
Zac Medico [Sun, 25 Nov 2007 08:35:54 +0000 (08:35 -0000)]
Test if ebuild functions are defined before calling them. This
will be useful if an environment.bz2 has been loaded and it has
missing functions for some reason. For example, there are a lot
of default functions that are empty and could simply be omitted
from the environment.

svn path=/main/trunk/; revision=8654

17 years agoThe qa_call() function and anything before it are portage internals
Zac Medico [Sun, 25 Nov 2007 08:15:32 +0000 (08:15 -0000)]
The qa_call() function and anything before it are portage internals
that the user will not be interested in. Therefore, the stack trace
should only show calls that come after qa_call().

svn path=/main/trunk/; revision=8653

17 years ago* Load environment.bz2 for the pkg_config() phase.
Zac Medico [Sun, 25 Nov 2007 06:56:02 +0000 (06:56 -0000)]
* Load environment.bz2 for the pkg_config() phase.
* Run the "clean" phase if pkg_config() succeeds.

svn path=/main/trunk/; revision=8651

17 years agoImplement loading of environment.bz2 for the pkg_info() phase.
Zac Medico [Sun, 25 Nov 2007 06:26:29 +0000 (06:26 -0000)]
Implement loading of environment.bz2 for the pkg_info() phase.
Since a temporary directory is required for processing of
${T}/environment, and we want a user who's not in the portage
group to be able to run the pkg_info() phase, PORTAGE_TMPDIR
is temporarily overridden with a directory created by mkdtemp.
To make this work, doebuild() creates the tempdir and cleans
it up in a finally block.

svn path=/main/trunk/; revision=8649

17 years agoBug #200238 - Make ebuild.sh properly bail out when the pkg_info()
Zac Medico [Sat, 24 Nov 2007 22:25:45 +0000 (22:25 -0000)]
Bug #200238 - Make ebuild.sh properly bail out when the pkg_info()
function doesn't exist.

svn path=/main/trunk/; revision=8647

17 years agoBug #140180 - Never trigger a LICENSE.missing violation for old style
Zac Medico [Sat, 24 Nov 2007 22:11:14 +0000 (22:11 -0000)]
Bug #140180 - Never trigger a LICENSE.missing violation for old style
virtuals since they don't directly install anything.

svn path=/main/trunk/; revision=8645

17 years agoUse `md5` if `md5sum` is not available (useful for FreeBSD users).
Zac Medico [Sat, 24 Nov 2007 18:28:15 +0000 (18:28 -0000)]
Use `md5` if `md5sum` is not available (useful for FreeBSD users).

svn path=/main/trunk/; revision=8643

17 years agoFix quoting to work properly with eval.
Zac Medico [Sat, 24 Nov 2007 05:42:10 +0000 (05:42 -0000)]
Fix quoting to work properly with eval.

svn path=/main/trunk/; revision=8640

17 years agoWhen binarytree.populate() finds missing metadata, specify which keys
Zac Medico [Sat, 24 Nov 2007 04:47:12 +0000 (04:47 -0000)]
When binarytree.populate() finds missing metadata, specify which keys
are missing so that the user has a clue about what is wrong.

svn path=/main/trunk/; revision=8638

17 years agoUnconditionally filter some of the SANDBOX_* variables from the
Zac Medico [Sat, 24 Nov 2007 04:21:43 +0000 (04:21 -0000)]
Unconditionally filter some of the SANDBOX_* variables from the
environment in order to avoid potential interference problems.
For example, having an invalid value for SANDBOX_LOG prevents
the sandbox from killing the ebuild when a violation occurs.

svn path=/main/trunk/; revision=8636

17 years agoFix the var_grep variable in filter_readonly_variables() so that
Zac Medico [Sat, 24 Nov 2007 02:58:31 +0000 (02:58 -0000)]
Fix the var_grep variable in filter_readonly_variables() so that
it's properly local.

svn path=/main/trunk/; revision=8634

17 years agoIn the grep expression that's generated in filter_readonly_variables(),
Zac Medico [Sat, 24 Nov 2007 02:24:08 +0000 (02:24 -0000)]
In the grep expression that's generated in filter_readonly_variables(),
condense redundant identical expressions into a single one.

svn path=/main/trunk/; revision=8630

17 years agoFilter _E_DOCDESTTREE_ and _E_EXEDESTTREE_ from environment.bz2.
Zac Medico [Sat, 24 Nov 2007 01:56:06 +0000 (01:56 -0000)]
Filter _E_DOCDESTTREE_ and _E_EXEDESTTREE_ from environment.bz2.

svn path=/main/trunk/; revision=8629