portage.git
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

17 years agoAdd support for persistence of colon separated
Zac Medico [Sat, 24 Nov 2007 01:50:10 +0000 (01:50 -0000)]
Add support for persistence of colon separated
SANDBOX_{DENY,READ,PREDICT,WRITE} variables between
phases so things like the global scope addpredict()
call in qt3.eclass will continue to work.

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

17 years agoMake save_ebuild_env() filter the new source_all_bashrcs() function
Zac Medico [Fri, 23 Nov 2007 11:07:47 +0000 (11:07 -0000)]
Make save_ebuild_env() filter the new source_all_bashrcs() function
from the environment.

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

17 years agoTry again to make bashrc sourcing compatible with previous
Zac Medico [Fri, 23 Nov 2007 10:53:48 +0000 (10:53 -0000)]
Try again to make bashrc sourcing compatible with previous
behavior. The bashrcs get an opportunity to set aliases that
will be expanded during sourcing of ebuilds and eclasses.

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

17 years agounset x to avoid global env pollution.
Zac Medico [Fri, 23 Nov 2007 10:32:46 +0000 (10:32 -0000)]
unset x to avoid global env pollution.

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

17 years agoFor compatibility with previous behavior, so the bashrc sourcing
Zac Medico [Fri, 23 Nov 2007 10:12:06 +0000 (10:12 -0000)]
For compatibility with previous behavior, so the bashrc sourcing
after the ebuild environment is fully loaded.

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

17 years agoSort hashes for predictable output from Manifest._createManifestEntries().
Zac Medico [Fri, 23 Nov 2007 02:37:11 +0000 (02:37 -0000)]
Sort hashes for predictable output from Manifest._createManifestEntries().

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

17 years agoUse %% instead of % parameter expansion where appropriate
Zac Medico [Fri, 23 Nov 2007 01:56:21 +0000 (01:56 -0000)]
Use %% instead of % parameter expansion where appropriate
for md5sum output.

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

17 years agoMake the sed expression in filter_readonly_variables() handle
Zac Medico [Fri, 23 Nov 2007 01:37:58 +0000 (01:37 -0000)]
Make the sed expression in filter_readonly_variables() handle
'^declare -r ' by simply removing it.

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

17 years agoWhen filtering the backupenv in create_trees(), be more
Zac Medico [Fri, 23 Nov 2007 00:08:00 +0000 (00:08 -0000)]
When filtering the backupenv in create_trees(), be more
selective and ensure that special variables that come from
the config constructor are preserved.

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

17 years agoAllow any errors from save_ebuild_env() to go to stderr instead of
Zac Medico [Thu, 22 Nov 2007 22:23:24 +0000 (22:23 -0000)]
Allow any errors from save_ebuild_env() to go to stderr instead of
directing them to /dev/null.

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

17 years agoGeneralize the sed expression in filter_readonly_variables() so that
Zac Medico [Thu, 22 Nov 2007 21:59:54 +0000 (21:59 -0000)]
Generalize the sed expression in filter_readonly_variables() so that
it will work with things like 'declare -xr' as well as 'declare -rx'.

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

17 years agoDon't call preprocess_ebuild_env() unless EBUILD_SH_ARGS is set
Zac Medico [Thu, 22 Nov 2007 20:19:22 +0000 (20:19 -0000)]
Don't call preprocess_ebuild_env() unless EBUILD_SH_ARGS is set
since otherwise it can interfere with the environment for things
like the "package" phase.

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

17 years agoWhen portage reinstalls itself, during inst/rm phases, the
Zac Medico [Thu, 22 Nov 2007 19:52:34 +0000 (19:52 -0000)]
When portage reinstalls itself, during inst/rm phases, the
environment may have been saved by a different version of ebuild.sh,
so it can't trusted that it's been properly filtered. Therefore,
always preprocess the environment when ${PN} == portage.

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

17 years agoDocument dohtml -p. Thanks to robbat2 for reporting.
Zac Medico [Thu, 22 Nov 2007 19:05:25 +0000 (19:05 -0000)]
Document dohtml -p. Thanks to robbat2 for reporting.

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

17 years agoMake dyn_package() create a /var/db/pkg/*/*/BINPKGMD5 entries
Zac Medico [Thu, 22 Nov 2007 08:21:17 +0000 (08:21 -0000)]
Make dyn_package() create a /var/db/pkg/*/*/BINPKGMD5 entries
so that packages installed via --buildpkg have a BINPKGMD5
entry matching the package built.

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

17 years agoFilter HOSTTYPE, MACHTYPE, and OSTYPE vars that are set by bash.
Zac Medico [Thu, 22 Nov 2007 07:41:00 +0000 (07:41 -0000)]
Filter HOSTTYPE, MACHTYPE, and OSTYPE vars that are set by bash.

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

17 years agoIn depgraph.altlist(), measure the bias of circular
Zac Medico [Thu, 22 Nov 2007 06:12:43 +0000 (06:12 -0000)]
In depgraph.altlist(), measure the bias of circular
RDEPEND <-> PDEPEND relationships and use it to
optimize merge order.

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

17 years agoReplace usage of the "myarg" global variable with the equivalent
Zac Medico [Wed, 21 Nov 2007 18:54:58 +0000 (18:54 -0000)]
Replace usage of the "myarg" global variable with the equivalent
readonly EBUILD_SH_ARGS variable.

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

17 years agoIn dyn_install(), don't cleanse S from the global environment,
Zac Medico [Wed, 21 Nov 2007 10:45:22 +0000 (10:45 -0000)]
In dyn_install(), don't cleanse S from the global environment,
in case the user wants to repeat the phase (like with
FEATURES=noauto and the ebuild command). Only cleanse it from
environment.bz2.

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

17 years ago* Make save_ebuild_env() filter some more variables.
Zac Medico [Wed, 21 Nov 2007 10:31:13 +0000 (10:31 -0000)]
* Make save_ebuild_env() filter some more variables.
* Make dyn_install() filter S when it's no longer needed.

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

17 years agoFix the diefunc overlay message so that it doesn't trigger
Zac Medico [Wed, 21 Nov 2007 08:29:52 +0000 (08:29 -0000)]
Fix the diefunc overlay message so that it doesn't trigger
falsely in prerm or postrm.

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

17 years agoGenerate an eerror elog message when an ebuild prerm or
Zac Medico [Wed, 21 Nov 2007 08:26:19 +0000 (08:26 -0000)]
Generate an eerror elog message when an ebuild prerm or
postrm phase fails.

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

17 years agoMove environment saving from dyn_compile() to dyn_install()
Zac Medico [Wed, 21 Nov 2007 08:00:19 +0000 (08:00 -0000)]
Move environment saving from dyn_compile() to dyn_install()
so that state from src_install() is saved.

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

17 years agoClean up some local variables that are needlessly saved
Zac Medico [Wed, 21 Nov 2007 07:38:24 +0000 (07:38 -0000)]
Clean up some local variables that are needlessly saved
in the environment.

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

17 years agoMove preinst IMAGE initialzation before bashrc handling.
Zac Medico [Wed, 21 Nov 2007 04:17:55 +0000 (04:17 -0000)]
Move preinst IMAGE initialzation before bashrc handling.

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

17 years ago* Remove bogus "ci" mode.
Zac Medico [Tue, 20 Nov 2007 23:47:08 +0000 (23:47 -0000)]
* Remove bogus "ci" mode.
* Sync "scan" mode description with 2.1.2 branch.

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

17 years agoDon't unset ${S} inside save_ebuild_env().
Zac Medico [Tue, 20 Nov 2007 11:39:43 +0000 (11:39 -0000)]
Don't unset ${S} inside save_ebuild_env().

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

17 years agoInstead of filtering out all readonly variables, make it
Zac Medico [Tue, 20 Nov 2007 10:41:41 +0000 (10:41 -0000)]
Instead of filtering out all readonly variables, make it
selective so that any readonly variables that are not
explicitly filtered are allowed to be saved.

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

17 years agoFix ${EBUILD_PHASE} quoting.
Zac Medico [Tue, 20 Nov 2007 07:09:55 +0000 (07:09 -0000)]
Fix ${EBUILD_PHASE} quoting.

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

17 years agoDon't make variables readonly during the "depend" phase.
Zac Medico [Tue, 20 Nov 2007 06:31:36 +0000 (06:31 -0000)]
Don't make variables readonly during the "depend" phase.

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

17 years agoWhen ROOT != "/" we only want overrides from the calling
Zac Medico [Tue, 20 Nov 2007 05:49:37 +0000 (05:49 -0000)]
When ROOT != "/" we only want overrides from the calling
environment to apply to the config that's associated
with ROOT != "/", so we wipe out the "backupenv" for the
config that is associated with ROOT == "/" and regenerate
it's incrementals. Thanks to solar for the suggestion.

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

17 years agoWhen ${T}/environment is available, do not source the ebuild since
Zac Medico [Tue, 20 Nov 2007 05:21:10 +0000 (05:21 -0000)]
When ${T}/environment is available, do not source the ebuild since
that is redundant. This solves bug #46223.

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

17 years agoNow that save_ebuild_env() filters variables that could cause
Zac Medico [Tue, 20 Nov 2007 02:33:28 +0000 (02:33 -0000)]
Now that save_ebuild_env() filters variables that could cause
interference, preprocess_ebuild_env() can rely on it to clean
up the environment enough so that anything left can be allowed
to override variables or functions from the current environment.

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

17 years agoAdd some more variables to filter in filter_readonly_variables()
Zac Medico [Tue, 20 Nov 2007 02:17:31 +0000 (02:17 -0000)]
Add some more variables to filter in filter_readonly_variables()
and save_ebuild_env().

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

17 years agoMove LD_PRELOAD and FAKEROOTKEY filtering from filter_readonly_variables()
Zac Medico [Tue, 20 Nov 2007 01:00:29 +0000 (01:00 -0000)]
Move LD_PRELOAD and FAKEROOTKEY filtering from filter_readonly_variables()
to save_ebuild_env().

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

17 years agoMake AA, PF, and WORKDIR readonly.
Zac Medico [Mon, 19 Nov 2007 23:03:43 +0000 (23:03 -0000)]
Make AA, PF, and WORKDIR readonly.

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

17 years agoMake save_ebuild_env() filter out lots of variables that
Zac Medico [Mon, 19 Nov 2007 22:57:31 +0000 (22:57 -0000)]
Make save_ebuild_env() filter out lots of variables that
don't need to be saved.

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

17 years agoMake preprocess_ebuild_env() explicitly filter out FEATURES
Zac Medico [Mon, 19 Nov 2007 22:08:07 +0000 (22:08 -0000)]
Make preprocess_ebuild_env() explicitly filter out FEATURES
since the value for that variable should never come from a
previously saved environment.

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

17 years agoImplement loading of environment.bz2 from binary and installed
Zac Medico [Mon, 19 Nov 2007 21:41:54 +0000 (21:41 -0000)]
Implement loading of environment.bz2 from binary and installed
packages. For binary packages, it's loaded prior to pkg_setup().
For installed packages, it's loaded prior to pkg_prerm().

For simplicity, the current implementation will cause the current
environment to override *everything* in the environment that is
being processed. In the future, it should be more selective and
only override the parts that are strictly necessary.

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

17 years agoIn bash-3.2_p20+ an attempt to assign BASH_*, FUNCNAME, GROUPS or any
Zac Medico [Mon, 19 Nov 2007 10:16:25 +0000 (10:16 -0000)]
In bash-3.2_p20+ an attempt to assign BASH_*, FUNCNAME, GROUPS or any
readonly variable cause the shell to exit while executing the "source"
builtin command. To avoid this problem, a new save_ebuild_env() function
filters those variables out and discards them. See bug #190128.

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

17 years agoWhen creating environment.bz2 at the end of dyn_compile(),
Zac Medico [Mon, 19 Nov 2007 06:46:09 +0000 (06:46 -0000)]
When creating environment.bz2 at the end of dyn_compile(),
reduce bloat by filtering out functions that are defined
internally by portage. This reduces the size of the resulting
environment.bz2 file by approximately 10 KB.

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

17 years agoDisable logging and ${T}/environment saving during the
Zac Medico [Mon, 19 Nov 2007 06:09:11 +0000 (06:09 -0000)]
Disable logging and ${T}/environment saving during the
pkg_info() phase.

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

17 years agoUse the existing RootConfig class to serve as a replacement for
Zac Medico [Mon, 19 Nov 2007 06:00:24 +0000 (06:00 -0000)]
Use the existing RootConfig class to serve as a replacement for
the EmergeConfig class. They both served roughly the same purpose
and it was messy the way that EmergeConfig inherited from the
portage.config class. It's better to avoid inheritance here,
expecially since it doesn't provide anything really useful.

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

17 years agoFix PROFILE_ONLY_VARIABLES handling in the config constructor
Zac Medico [Mon, 19 Nov 2007 00:02:34 +0000 (00:02 -0000)]
Fix PROFILE_ONLY_VARIABLES handling in the config constructor
so that variables are appropriately filtered from "backupenv",
since otherwise they can leak in from there.

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

17 years agoBug #198398 - Enable Manifest generation when there are no hash
Zac Medico [Sun, 18 Nov 2007 02:50:49 +0000 (02:50 -0000)]
Bug #198398 - Enable Manifest generation when there are no hash
functions available for types such as RMD160. Now it's possible
to generate a Manifest when python-2.5 is built without ssl
support. MANIFEST1_REQUIRED_HASH and MANIFEST2_REQUIRED_HASH
are the only two functions that are strictly required now (MD5
and SHA1).

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

17 years agoFix NEEDED logic in vardbapi.aux_get() so that empty
Zac Medico [Sun, 18 Nov 2007 00:21:37 +0000 (00:21 -0000)]
Fix NEEDED logic in vardbapi.aux_get() so that empty
NEEDED doesn't trigger unnecessary cache pulls.

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

17 years agoFix --usepkgonly code in depgraph.select_files() so that it
Zac Medico [Sat, 17 Nov 2007 21:54:32 +0000 (21:54 -0000)]
Fix --usepkgonly code in depgraph.select_files() so that it
only operates on the Package type that it expects.

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

17 years agoClean up vardbapi.counter_tick_core() and replace shell code
Zac Medico [Sat, 17 Nov 2007 09:09:47 +0000 (09:09 -0000)]
Clean up vardbapi.counter_tick_core() and replace shell code
with pure python.

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

17 years agoSpeed up LibraryPackageMap.update() by pulling NEEDED from the
Zac Medico [Fri, 16 Nov 2007 08:43:10 +0000 (08:43 -0000)]
Speed up LibraryPackageMap.update() by pulling NEEDED from the
vardbapi.aux_get() cache. This greatly reduces the amount of
needless IO that has been happening just prior to the postinst
phase in dblink.treewalk(). We may want to consider having
LibraryPackageMap work directly from the vardbapi instead of
creating the intermediate /var/cache/edb/library_consumers file.

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

17 years agoSet IMAGE for minimal backward compatibility with
Zac Medico [Fri, 16 Nov 2007 06:21:26 +0000 (06:21 -0000)]
Set IMAGE for minimal backward compatibility with
overlays or user's bashrc, but don't export it.

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

17 years agoDon't export ${IMAGE} to the ebuild environment anymore since
Zac Medico [Fri, 16 Nov 2007 06:16:15 +0000 (06:16 -0000)]
Don't export ${IMAGE} to the ebuild environment anymore since
everything uses ${D} now (including the entire tree).

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

17 years agoBug #199311 - Make dblink.getcontents() show the path of the
Zac Medico [Fri, 16 Nov 2007 00:09:59 +0000 (00:09 -0000)]
Bug #199311 - Make dblink.getcontents() show the path of the
CONTENTS file when any kind of parse error occurs.

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

17 years agoFix quoting for `source ${EBUILD}`.
Zac Medico [Thu, 15 Nov 2007 05:41:57 +0000 (05:41 -0000)]
Fix quoting for `source ${EBUILD}`.

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

17 years agoMake dir_get_metadata() return early if the current user does
Zac Medico [Thu, 15 Nov 2007 02:27:30 +0000 (02:27 -0000)]
Make dir_get_metadata() return early if the current user does
not have write access to /var/cache/edb. Thanks to Cardoe for
reporting.

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

17 years ago* Replace references to deprecated ${IMAGE} with equivalent ${D}.
Zac Medico [Wed, 14 Nov 2007 21:07:33 +0000 (21:07 -0000)]
* Replace references to deprecated ${IMAGE} with equivalent ${D}.
* Remove redundant trailing slashes and fix quoting.

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

17 years agoIn the slot collision display, show a maximum of 3 parents
Zac Medico [Wed, 14 Nov 2007 00:30:51 +0000 (00:30 -0000)]
In the slot collision display, show a maximum of 3 parents
for each package in order to avoid flooding the display.

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

17 years agoMake 'full' the default mode, since 'scan' can be annoying since it
Zac Medico [Tue, 13 Nov 2007 21:05:22 +0000 (21:05 -0000)]
Make 'full' the default mode, since 'scan' can be annoying since it
ommits relevant info.

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

17 years agoMake the slot collision display show all collisions instead
Zac Medico [Tue, 13 Nov 2007 20:53:56 +0000 (20:53 -0000)]
Make the slot collision display show all collisions instead
of just the first one.

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

17 years agoMake depgraph._complete_graph() properly specify SetArg instances
Zac Medico [Tue, 13 Nov 2007 19:20:20 +0000 (19:20 -0000)]
Make depgraph._complete_graph() properly specify SetArg instances
as parents of each Dependency, similar to the want that
select_files() does.

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

17 years agoMake depgraph._add_pkg() match the package with all possible
Zac Medico [Tue, 13 Nov 2007 07:48:45 +0000 (07:48 -0000)]
Make depgraph._add_pkg() match the package with all possible
args and add them to the digraph.

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