portage.git
16 years agoStore filtered USE for config.environ() calls in a special
Zac Medico [Tue, 18 Dec 2007 14:49:00 +0000 (14:49 -0000)]
Store filtered USE for config.environ() calls in a special
attribute so that the normal global USE is still available
for things like emerge --info output. (trunk r8959)

svn path=/main/branches/2.1.2/; revision=8960

16 years agoFix USE filtering code so that it doesn't rely on config.setcpv()
Zac Medico [Tue, 18 Dec 2007 14:18:41 +0000 (14:18 -0000)]
Fix USE filtering code so that it doesn't rely on config.setcpv()
calling config.regenerate(). (trunk r8957)

svn path=/main/branches/2.1.2/; revision=8958

16 years agoMake special build and bootstrap flags into implicit members
Zac Medico [Tue, 18 Dec 2007 12:05:56 +0000 (12:05 -0000)]
Make special build and bootstrap flags into implicit members
of IUSE so that stage builds will work again. (trunk r8955)

svn path=/main/branches/2.1.2/; revision=8956

16 years agoDisplay the merge list with blockers any time that there are
Zac Medico [Tue, 18 Dec 2007 09:28:32 +0000 (09:28 -0000)]
Display the merge list with blockers any time that there are
blockers, instead of telling the user to try again with
--pretend. (trunk r8953)

svn path=/main/branches/2.1.2/; revision=8954

16 years agoOnly enable the PORTAGE_IUSE check during build time phases
Zac Medico [Tue, 18 Dec 2007 08:22:34 +0000 (08:22 -0000)]
Only enable the PORTAGE_IUSE check during build time phases
since that's the only time it's valid for now. (trunk r8951)

svn path=/main/branches/2.1.2/; revision=8952

16 years agoInclude masked flags in PORTAGE_IUSE to avoid more false positives
Zac Medico [Tue, 18 Dec 2007 07:11:50 +0000 (07:11 -0000)]
Include masked flags in PORTAGE_IUSE to avoid more false positives
in the useq() IUSE check. (trunk r8949)

svn path=/main/branches/2.1.2/; revision=8950

16 years agoCreate a PORTAGE_IUSE variable containing an egrep pattern
Zac Medico [Tue, 18 Dec 2007 06:57:53 +0000 (06:57 -0000)]
Create a PORTAGE_IUSE variable containing an egrep pattern
for use by the QA check that's built into useq(). This allows
the IUSE logic for this check to be isolated in the python
code. (trunk r8945)

svn path=/main/branches/2.1.2/; revision=8948

16 years agoBug #176467 - Filter out USE flags that aren't part of IUSE.
Zac Medico [Tue, 18 Dec 2007 06:49:32 +0000 (06:49 -0000)]
Bug #176467 - Filter out USE flags that aren't part of IUSE.
Some flags are considered to be implicit members of IUSE:

* Flags derived from ARCH
* Flags derived from USE_EXPAND_HIDDEN variables
* Forced flags, such as those from {,package}use.force

(trunk r8944)

svn path=/main/branches/2.1.2/; revision=8947

16 years agoGeneralize the sed -> gsed wrapper script so that it's
Zac Medico [Tue, 18 Dec 2007 06:46:24 +0000 (06:46 -0000)]
Generalize the sed -> gsed wrapper script so that it's
possible to create awk, make, and patch symlinks that
behave analogously. These symlinks will make
it unnecessary for default-bsd profiles to define
profile.bashrc aliases for these commands.
(trunk r8941:8943)

svn path=/main/branches/2.1.2/; revision=8946

16 years agoIn "QA Notice: Precompiled python" messages, use sed to strip the
Zac Medico [Sat, 15 Dec 2007 23:50:17 +0000 (23:50 -0000)]
In "QA Notice: Precompiled python" messages, use sed to strip the
leading ${D} from file paths. (trunk r8935)

svn path=/main/branches/2.1.2/; revision=8936

16 years agoFix punctuation and spelling. Thanks to Arfrever Frehtes Taifersar
Zac Medico [Sat, 15 Dec 2007 21:05:55 +0000 (21:05 -0000)]
Fix punctuation and spelling. Thanks to Arfrever Frehtes Taifersar
Arahesis <arfrever.fta@gmail.com>. (trunk r8932)

svn path=/main/branches/2.1.2/; revision=8933

16 years agoSplit out a format_qa_output() function to eliminate duplicate code.
Zac Medico [Sat, 15 Dec 2007 07:53:40 +0000 (07:53 -0000)]
Split out a format_qa_output() function to eliminate duplicate code.
(trunk r8927 and r8930)

svn path=/main/branches/2.1.2/; revision=8931

16 years agoInstead of all modes, only in commit mode save an extra copy of QA
Zac Medico [Sat, 15 Dec 2007 04:04:38 +0000 (04:04 -0000)]
Instead of all modes, only in commit mode save an extra copy of QA
output for display in $EDITOR. (trunk r8928)

svn path=/main/branches/2.1.2/; revision=8929

16 years agoSave QA output so that it can be conveniently displayed
Zac Medico [Sat, 15 Dec 2007 00:32:56 +0000 (00:32 -0000)]
Save QA output so that it can be conveniently displayed
in $EDITOR while the user creates a commit message.
Otherwise, the user would not be able to see this output
once the editor has taken over the screen.

Output is done through a formatter object where it is
captured for later use. A file-like object that behaves
something like the portage.output.colorize() function is
used to transfor style identifiers from the formatter
framework into actual console codes.

(trunk r8925)

svn path=/main/branches/2.1.2/; revision=8926

16 years agoPrompt the user before letting the editor
Zac Medico [Fri, 14 Dec 2007 11:45:37 +0000 (11:45 -0000)]
Prompt the user before letting the editor
take over the screen so there is an
opportunity to review any QA warnings.
(trunk r8923)

svn path=/main/branches/2.1.2/; revision=8924

16 years ago* Add support for multi-line commit message input by using EOF
Zac Medico [Fri, 14 Dec 2007 11:27:52 +0000 (11:27 -0000)]
* Add support for multi-line commit message input by using EOF
  as a delimiter (Ctrl-d) instead of a new line.

* Add support for getting a commit message using an editor defined
  by the EDITOR environment variable.

(trunk r8919:8921)

svn path=/main/branches/2.1.2/; revision=8922

16 years agoFix the bug #198398 code from trunk to be compatible with the code
Zac Medico [Thu, 13 Dec 2007 21:53:48 +0000 (21:53 -0000)]
Fix the bug #198398 code from trunk to be compatible with the code
in this branch.

svn path=/main/branches/2.1.2/; revision=8919

16 years agoAdd --buildpkgonly to the options lists that exempt from
Zac Medico [Thu, 13 Dec 2007 21:22:25 +0000 (21:22 -0000)]
Add --buildpkgonly to the options lists that exempt from
slot collisions and world file updates. (trunk r8917)

svn path=/main/branches/2.1.2/; revision=8918

16 years agoDisable the "QA Notice: Pre-stripped files" message when RESTRICT
Zac Medico [Thu, 13 Dec 2007 20:54:57 +0000 (20:54 -0000)]
Disable the "QA Notice: Pre-stripped files" message when RESTRICT
contains "strip" or "binchecks". This is needed at least for the
glibc ebuild since it calls prepallstrip directly, resulting in
it being called twice. Thanks to loki_val for reporting.
(trunk r8915)

svn path=/main/branches/2.1.2/; revision=8916

16 years agoBug #202126 - Replace an obsolete reference to `emerge --help config`
Zac Medico [Thu, 13 Dec 2007 20:08:08 +0000 (20:08 -0000)]
Bug #202126 - Replace an obsolete reference to `emerge --help config`
with a reference to the CONFIGURATION FILES section of emerge(1).
(trunk r8913)

svn path=/main/branches/2.1.2/; revision=8914

16 years agoMake sure that PORTAGE_SANDBOX_* variables can never be set
Zac Medico [Thu, 13 Dec 2007 19:58:26 +0000 (19:58 -0000)]
Make sure that PORTAGE_SANDBOX_* variables can never be set
by "${T}"/environment. (trunk r8911)

svn path=/main/branches/2.1.2/; revision=8912

16 years agoAllow FEATURES to persist between phases since the user might
Zac Medico [Thu, 13 Dec 2007 10:34:36 +0000 (10:34 -0000)]
Allow FEATURES to persist between phases since the user might
want to modify it via bashrc to enable things like splitdebug
and installsources for specific packages. They should be able
to modify it in pre_pkg_setup() and have it persist all the
way through the install phase. However, if FEATURES exist
inside environment.bz2 then they should be overridden by
current settings. (trunk r8909)

svn path=/main/branches/2.1.2/; revision=8910

16 years agoProperly filter SANDBOX_ON from the environment. When sourcing
Zac Medico [Thu, 13 Dec 2007 08:36:14 +0000 (08:36 -0000)]
Properly filter SANDBOX_ON from the environment. When sourcing
${T}/environment it's a bit tricky because we have to temporarily
disable sandbox since the SANDBOX_{DENY,READ,PREDICT,_WRITE} values
we've just loaded may be unusable (triggering in spurious sandbox
violations) until we've merged them with our current values.
(trunk r8905:8907)

svn path=/main/branches/2.1.2/; revision=8908

16 years agoUse the BAD color class instead of hardcoded red. (trunk r8904)
Zac Medico [Thu, 13 Dec 2007 07:27:00 +0000 (07:27 -0000)]
Use the BAD color class instead of hardcoded red. (trunk r8904)

svn path=/main/branches/2.1.2/; revision=8905

16 years agoBug #201771 - Make unpack() detect common errors such as absolute
Zac Medico [Thu, 13 Dec 2007 06:33:16 +0000 (06:33 -0000)]
Bug #201771 - Make unpack() detect common errors such as absolute
paths that start with ${DISTDIR} and die an appropriate error
message. Thanks to grobian for this patch. (trunk r8896)

svn path=/main/branches/2.1.2/; revision=8903

16 years agoBug #201848 - Make the ebuild command reject ebuilds that do not define
Zac Medico [Thu, 13 Dec 2007 06:32:17 +0000 (06:32 -0000)]
Bug #201848 - Make the ebuild command reject ebuilds that do not define
SLOT. (trunk r8895)

svn path=/main/branches/2.1.2/; revision=8902

16 years agoBug #201848 - Mask ebuilds that do not define SLOT. (trunk r8894)
Zac Medico [Thu, 13 Dec 2007 06:26:31 +0000 (06:26 -0000)]
Bug #201848 - Mask ebuilds that do not define SLOT. (trunk r8894)

svn path=/main/branches/2.1.2/; revision=8900

16 years ago* In filter_readonly_variables(), replace 'declare -r ' with 'declare '
Zac Medico [Thu, 13 Dec 2007 05:54:49 +0000 (05:54 -0000)]
* In filter_readonly_variables(), replace 'declare -r ' with 'declare '
  instead of removing it completely.

* Bug #202068 - In order to filter unwanted variable assignments out
  of the bash environment, use a filter-bash-environment.py script
  that behaves similar to egrep -v except that it leaves bash here-
  documents intact.

* Use the sed -r option to enable extended regular expressions so that
  commonly used characters like (, ), and + don't have to be escaped.

(trunk r8890:8893)

svn path=/main/branches/2.1.2/; revision=8899

16 years agoBug #198398 - Make repoman bail out if support for RMD160 hash
Zac Medico [Thu, 13 Dec 2007 05:40:46 +0000 (05:40 -0000)]
Bug #198398 - Make repoman bail out if support for RMD160 hash
creation appears to be missing. (trunk r8886:8888 and r8897)

svn path=/main/branches/2.1.2/; revision=8898

16 years agoBug #202036 - In case of blockers, bail out earlier so that later
Zac Medico [Thu, 13 Dec 2007 01:24:08 +0000 (01:24 -0000)]
Bug #202036 - In case of blockers, bail out earlier so that later
code can assume there are no blockers. (trunk r8889)

svn path=/main/branches/2.1.2/; revision=8890

16 years agoInstead of calling sys.exit when a ParseError occurs in the config
Zac Medico [Tue, 11 Dec 2007 23:46:11 +0000 (23:46 -0000)]
Instead of calling sys.exit when a ParseError occurs in the config
constructor, raise a ParseError and make emerge and portageq handle
the error. This way consumers of the portage api can handle the
ParseError rather than have their application exit. Thanks to lxnay
for reporting. (trunk r8884)

svn path=/main/branches/2.1.2/; revision=8886

16 years ago* Raise PermissionDenied from getconfig() when appropriate.
Zac Medico [Tue, 11 Dec 2007 23:44:59 +0000 (23:44 -0000)]
* Raise PermissionDenied from getconfig() when appropriate.
* When available, make getconfig() include an invalid token
  in a ParseError message.
(trunk r8883)

svn path=/main/branches/2.1.2/; revision=8885

16 years ago* When installing a binary package, export the file name of the package
Zac Medico [Tue, 11 Dec 2007 21:41:55 +0000 (21:41 -0000)]
* When installing a binary package, export the file name of the package
as PORTAGE_BINPKG_FILE in order to give bashrc users an opportunity
to do various things such as remove binary packages after they're
installed.

* Add a note in ebuild.sh explaining why hardcoded bash lists are
needed for backward compatibility with <portage-2.1.4 since they
assume that a newly installed version of ebuild.sh will work for
pkg_postinst, pkg_prerm, and pkg_postrm when portage is upgrading
itself.
(trunk r8878)

svn path=/main/branches/2.1.2/; revision=8881

16 years agoAdd a "Quality Assurance" <part> tag so that all chapters are
Zac Medico [Tue, 11 Dec 2007 21:33:50 +0000 (21:33 -0000)]
Add a "Quality Assurance" <part> tag so that all chapters are
consistently nested inside <part> tags. (trunk r8877)

svn path=/main/branches/2.1.2/; revision=8880

16 years agoAdd some documentation for ebuild phases and pre/post phase
Zac Medico [Tue, 11 Dec 2007 21:32:44 +0000 (21:32 -0000)]
Add some documentation for ebuild phases and pre/post phase
hooks that can be defined via bashrc. (trunk r8876)

svn path=/main/branches/2.1.2/; revision=8879

16 years agoDo an EBUILD_EXIT_STATUS_FILE sanity check in spawnebuild()
Zac Medico [Sat, 8 Dec 2007 23:02:45 +0000 (23:02 -0000)]
Do an EBUILD_EXIT_STATUS_FILE sanity check in spawnebuild()
where it spawns misc-functions.sh after the install phase.
(trunk r8874)

svn path=/main/branches/2.1.2/; revision=8875

16 years agoQuote $PORTDIR. Thanks to Chris Kerr in bug #52208.
Zac Medico [Sat, 8 Dec 2007 19:23:12 +0000 (19:23 -0000)]
Quote $PORTDIR. Thanks to Chris Kerr in bug #52208.

svn path=/main/branches/2.1.2/; revision=8873

16 years agoBug #189417 - Explicitly whitelist any remaining variables that are
Zac Medico [Fri, 7 Dec 2007 23:03:39 +0000 (23:03 -0000)]
Bug #189417 - Explicitly whitelist any remaining variables that are
allowed to leak into the ebuild environment. Also, fix spawnebuild
to properly filter the env when it spawns misc-functions.sh after
the install phase. (trunk r8863:8867)

svn path=/main/branches/2.1.2/; revision=8868

16 years agoDeclare retval as a local variable. (trunk r8859)
Zac Medico [Thu, 6 Dec 2007 23:38:00 +0000 (23:38 -0000)]
Declare retval as a local variable. (trunk r8859)

svn path=/main/branches/2.1.2/; revision=8860

16 years agoPrevent the filter_opts local variable from leaking into the
Zac Medico [Thu, 6 Dec 2007 23:29:03 +0000 (23:29 -0000)]
Prevent the filter_opts local variable from leaking into the
environment in preprocess_ebuild_env(). (trunk r8857)

svn path=/main/branches/2.1.2/; revision=8858

16 years agoRemove redundant successful exit call from the "depend" phase
Zac Medico [Thu, 6 Dec 2007 23:13:04 +0000 (23:13 -0000)]
Remove redundant successful exit call from the "depend" phase
and let it run to the bottom of ebuild.sh just like the other
phases. (trunk r8852)

svn path=/main/branches/2.1.2/; revision=8856

16 years agoTo avoid false positives during the transition
Zac Medico [Thu, 6 Dec 2007 23:02:03 +0000 (23:02 -0000)]
To avoid false positives during the transition
period, don't show ? if the installed package
is missing a repository label. Stages starting
with 2007.1 will come with repository lables.

svn path=/main/branches/2.1.2/; revision=8855

16 years agoBug #201506 - Make preprocess_ebuild_env() preserve
Zac Medico [Thu, 6 Dec 2007 22:29:48 +0000 (22:29 -0000)]
Bug #201506 - Make preprocess_ebuild_env() preserve
SANDBOX_{DENY,PREDICT,READ,WRITE} between all phases,
except when the environment comes directly from
environment.bz2. (trunk r8853)

svn path=/main/branches/2.1.2/; revision=8854

16 years agoShow ? if the installed package is missing a
Zac Medico [Wed, 5 Dec 2007 03:48:02 +0000 (03:48 -0000)]
Show ? if the installed package is missing a
repository label. The stable version of portage
creates these labels now, so false positives
won't be as common as they used to be. (trunk
r8846)

svn path=/main/branches/2.1.2/; revision=8847

16 years agoRemove redundant config.load_infodir() calls from
Zac Medico [Mon, 3 Dec 2007 23:27:42 +0000 (23:27 -0000)]
Remove redundant config.load_infodir() calls from
portage.pkgmerge() and dblink.unmerge() since it's
already called in doebuild(). (trunk r8835)

svn path=/main/branches/2.1.2/; revision=8836

16 years agoSynchronize the conditional that triggers "${T}"/environment
Zac Medico [Mon, 3 Dec 2007 23:07:18 +0000 (23:07 -0000)]
Synchronize the conditional that triggers "${T}"/environment
generation with the conditional that triggers distcc and
ccache FEATURES setup. (trunk r8833)

svn path=/main/branches/2.1.2/; revision=8834

16 years ago* Don't load the CATEGORY in config.load_infodir() since this value is
Zac Medico [Mon, 3 Dec 2007 22:09:26 +0000 (22:09 -0000)]
* Don't load the CATEGORY in config.load_infodir() since this value is
  critical for doebuild() operation and we already know the category.
* Always call config.setcpv() prior to config.load_infodir() so that
  the CATEGORY is always known.
(trunk r8830:88310

svn path=/main/branches/2.1.2/; revision=8832

16 years agoBug #201090 - When portage creates a temp PORTAGE_BIN_PATH, put it
Zac Medico [Mon, 3 Dec 2007 20:57:54 +0000 (20:57 -0000)]
Bug #201090 - When portage creates a temp PORTAGE_BIN_PATH, put it
inside PORTAGE_TMPDIR since, unlike /tmp, it can't be mounted with
the "noexec" option. (trunk r8828)

svn path=/main/branches/2.1.2/; revision=8829

16 years agoMake config.load_infodir() more fault tolerant for cases like bug
Zac Medico [Mon, 3 Dec 2007 20:01:42 +0000 (20:01 -0000)]
Make config.load_infodir() more fault tolerant for cases like bug
#201082. (trunk r8826)

svn path=/main/branches/2.1.2/; revision=8827

16 years agoBug #201082 - Don't call config.load_infodir() prior to pkg_postinst()
Zac Medico [Mon, 3 Dec 2007 19:13:41 +0000 (19:13 -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. (trunk r8822)

svn path=/main/branches/2.1.2/; revision=8823

16 years ago* whitelist CCACHE_* and DISTCC_* variables in config.environ()
Zac Medico [Mon, 3 Dec 2007 06:23:45 +0000 (06:23 -0000)]
* whitelist CCACHE_* and DISTCC_* variables in config.environ()
* unset CCACHE_* and DISTCC_* variables in save_ebuild_env()
(trunk r8818)

svn path=/main/branches/2.1.2/; revision=8819

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

svn path=/main/branches/2.1.2/; revision=8817

16 years agoFix useq() so that it won't generate a bogus IUSE QA Notice
Zac Medico [Sun, 2 Dec 2007 20:56:31 +0000 (20:56 -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. (trunk r8805)

svn path=/main/branches/2.1.2/; revision=8806

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

svn path=/main/branches/2.1.2/; revision=8804

16 years agoIn dblink.treewalk(), tweak the "Safely unmerging
Zac Medico [Sun, 2 Dec 2007 07:58:50 +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. (trunk r8801)

svn path=/main/branches/2.1.2/; revision=8802

16 years agoFix portage_exec namespace.
Zac Medico [Sun, 2 Dec 2007 07:08:13 +0000 (07:08 -0000)]
Fix portage_exec namespace.

svn path=/main/branches/2.1.2/; revision=8800

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

svn path=/main/branches/2.1.2/; revision=8799

16 years ago* whitelist some misc variables from the calling environment
Zac Medico [Sat, 1 Dec 2007 22:29:33 +0000 (22:29 -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
(trunk r8796)

svn path=/main/branches/2.1.2/; revision=8797

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

svn path=/main/branches/2.1.2/; revision=8795

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

svn path=/main/branches/2.1.2/; revision=8793

16 years agoMove duplicate module loading code into a function. (trunk r8789)
Zac Medico [Sat, 1 Dec 2007 12:52:53 +0000 (12:52 -0000)]
Move duplicate module loading code into a function. (trunk r8789)

svn path=/main/branches/2.1.2/; revision=8790

16 years agoAdd missing newline after message. (trunk r8787)
Zac Medico [Sat, 1 Dec 2007 12:29:18 +0000 (12:29 -0000)]
Add missing newline after message. (trunk r8787)

svn path=/main/branches/2.1.2/; revision=8788

16 years agoIn create_trees(), when isolating the environment of the ROOT=/ config,
Zac Medico [Sat, 1 Dec 2007 08:39:33 +0000 (08:39 -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. (trunk r8785)

svn path=/main/branches/2.1.2/; revision=8786

16 years agoWhen die has been called and ${T}/environment does not exist,
Zac Medico [Sat, 1 Dec 2007 08:05:50 +0000 (08:05 -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. (trunk r8783)

svn path=/main/branches/2.1.2/; revision=8784

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

svn path=/main/branches/2.1.2/; revision=8782

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

svn path=/main/branches/2.1.2/; revision=8780

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

svn path=/main/branches/2.1.2/; revision=8778

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

svn path=/main/branches/2.1.2/; revision=8775

16 years agoIn doebuild_environment(), fix KV logic so that it
Zac Medico [Sat, 1 Dec 2007 00:35:46 +0000 (00:35 -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.
(trunk r8771)

svn path=/main/branches/2.1.2/; revision=8773

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

svn path=/main/branches/2.1.2/; revision=8772

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

svn path=/main/branches/2.1.2/; revision=8769

16 years agoFix broken module loading logic.
Zac Medico [Fri, 30 Nov 2007 19:38:48 +0000 (19:38 -0000)]
Fix broken module loading logic.

svn path=/main/branches/2.1.2/; revision=8767

16 years agoBug #200775 - Save more portage generated environment
Zac Medico [Fri, 30 Nov 2007 11:08:19 +0000 (11:08 -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. (trunk r8765)

svn path=/main/branches/2.1.2/; revision=8766

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

svn path=/main/branches/2.1.2/; revision=8764

16 years agoDon't use sandbox's BASH_ENV for new shells because it does
Zac Medico [Fri, 30 Nov 2007 09:03:26 +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. (trunk r8761)

svn path=/main/branches/2.1.2/; revision=8762

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

svn path=/main/branches/2.1.2/; revision=8760

16 years ago* After the initial setup phase, the original ebuild and eclasses are no
Zac Medico [Fri, 30 Nov 2007 02:00:27 +0000 (02:00 -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/branches/2.1.2/; revision=8758

16 years agoBug #189417 - When ${T}/environment exists, isolate the ebuild
Zac Medico [Fri, 30 Nov 2007 00:59:48 +0000 (00:59 -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. (trunk r8752:8755)

svn path=/main/branches/2.1.2/; revision=8756

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

svn path=/main/branches/2.1.2/; revision=8752

16 years agoWhen portage reinstalls itself, pre-load elog modules in
Zac Medico [Thu, 29 Nov 2007 09:14:28 +0000 (09:14 -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). (trunk r8749)

svn path=/main/branches/2.1.2/; revision=8750

16 years agoDon't modify sys.path inside dblink.merge() because it doesn't seem
Zac Medico [Thu, 29 Nov 2007 08:29:32 +0000 (08:29 -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. (trunk r8745)

svn path=/main/branches/2.1.2/; revision=8748

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

svn path=/main/branches/2.1.2/; revision=8746

16 years agoWhen portage reinstalls itself, copy both the bin and pym
Zac Medico [Thu, 29 Nov 2007 06:30:55 +0000 (06:30 -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. (trunk r8743)

svn path=/main/branches/2.1.2/; revision=8744

16 years agoIn dblink.treewalk(), make portage unmerge multiple instances
Zac Medico [Thu, 29 Nov 2007 03:12:15 +0000 (03:12 -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/branches/2.1.2/; revision=8742

16 years agoIf portage is reinstalling itself, create a temporary
Zac Medico [Thu, 29 Nov 2007 02:40:41 +0000 (02:40 -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.
(trunk r8730:8739)

svn path=/main/branches/2.1.2/; revision=8740

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

svn path=/main/branches/2.1.2/; revision=8730

16 years agoCondense duplicate eerror log generation code into a single
Zac Medico [Wed, 28 Nov 2007 09:25:09 +0000 (09:25 -0000)]
Condense duplicate eerror log generation code into a single
_eerror() function.

svn path=/main/branches/2.1.2/; revision=8728

16 years agoIn chk_updated_cfg_files(), avoid scanning for config files for
Zac Medico [Wed, 28 Nov 2007 08:28:20 +0000 (08:28 -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. (trunk r8726)

svn path=/main/branches/2.1.2/; revision=8727

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

svn path=/main/branches/2.1.2/; revision=8725

16 years agoAdd a sanity check in dblink.treewalk() so that a broken ebuild
Zac Medico [Wed, 28 Nov 2007 05:25:17 +0000 (05:25 -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.
(trunk r8720)

svn path=/main/branches/2.1.2/; revision=8723

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

svn path=/main/branches/2.1.2/; revision=8722

16 years agoIn the preprocess_ebuild_env() subshell, check for errors and
Zac Medico [Wed, 28 Nov 2007 00:04:49 +0000 (00:04 -0000)]
In the preprocess_ebuild_env() subshell, check for errors and
return early when necessary. (trunk r8718)

svn path=/main/branches/2.1.2/; revision=8719

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

svn path=/main/branches/2.1.2/; revision=8717

16 years agoportage upgrade or downgrade invalidates EBUILD_EXIT_STATUS_FILE
Zac Medico [Tue, 27 Nov 2007 21:58:30 +0000 (21:58 -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. (trunk r8714)

svn path=/main/branches/2.1.2/; revision=8715

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

svn path=/main/branches/2.1.2/; revision=8713

16 years agoFix logic wrt exit_status_check and elog_process in doebuild(). (trunk r8710)
Zac Medico [Tue, 27 Nov 2007 21:12:26 +0000 (21:12 -0000)]
Fix logic wrt exit_status_check and elog_process in doebuild(). (trunk r8710)

svn path=/main/branches/2.1.2/; revision=8711

16 years agoBug #200229 - The gimp ebuild defines AA as a local variable. In order
Zac Medico [Tue, 27 Nov 2007 18:53:55 +0000 (18:53 -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). (trunk r8708)

svn path=/main/branches/2.1.2/; revision=8709

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

svn path=/main/branches/2.1.2/; revision=8707

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

svn path=/main/branches/2.1.2/; revision=8705

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

svn path=/main/branches/2.1.2/; revision=8703