portage.git
19 years agoMerged from trunk 5758:5768
Fabian Groffen [Sat, 27 Jan 2007 22:54:55 +0000 (22:54 -0000)]
Merged from trunk 5758:5768

Add new ** for package.keywords token to bypass keyword visibility layer
(genone)

Update package.keywords section in portage(5) with info about new **
token (genone)

For bug #142279, detect and warn about null bytes in CONTENTS.

Fix broken line number counting for CONTENTS.

demote KEYWORDS.missing to a warning to make KEYWORDS='' valid (genone)

svn path=/main/branches/prefix/; revision=5797

19 years agofix a tiny logic error in repoman (grobian plz don't kill me)
Alec Warner [Wed, 24 Jan 2007 02:02:18 +0000 (02:02 -0000)]
fix a tiny logic error in repoman (grobian plz don't kill me)

svn path=/main/branches/prefix/; revision=5769

19 years agoMerged from trunk 5748:5757
Fabian Groffen [Tue, 23 Jan 2007 08:54:55 +0000 (08:54 -0000)]
Merged from trunk 5748:5757

For bug #163083, handle an UnsupportedAPIException thrown from the prerm
phase.

use svn export (SpankMan)

move gen_usr_ldscript from eutils to toolchain-funcs to reflect actual
eclass status (SpankMan)

remove functions that dont exist anymore: draw_line get_number_of_jobs
have_NPTL (SpankMan)

document the functions built_with_use doicon newicon domenu newmenu
ebeep emktemp epause make_wrapper preserve_old_lib
preserve_old_lib_notify (SpankMan)

For bug #163219, handle binpkgs that have missing PF metadata.

svn path=/main/branches/prefix/; revision=5758

19 years agoMerged from trunk 5740:5746
Fabian Groffen [Sun, 21 Jan 2007 20:55:09 +0000 (20:55 -0000)]
Merged from trunk 5740:5746

Use XARGS for portable xargs handling when find doesn't find any files.

Minor fixes thanks to Fabio Correa <facorread@alexandria.cc> in bug
#162647.

Don't require MANIFEST2 hashes since that can trigger excessive fetches
when sufficient digests already exist.  Thanks to vapier for reporting.

To ease transition while Manifest 1 is being removed, only require
hashes that will exist before and after the transition.

svn path=/main/branches/prefix/; revision=5748

19 years agoMerged from trunk 5732:5737
Fabian Groffen [Sat, 20 Jan 2007 20:36:23 +0000 (20:36 -0000)]
Merged from trunk 5732:5737

forgot to document strict alias warnings (SpankMan)

fix programlisting output to match the sections they are in (SpankMan)

Some minor fixes for manifest code (genone)

For bug #161356, fix the SLOT match code to handle a KeyError thrown due
to a corrupt ebuild.

For bug #161356, prevent an AttributeError if the exception has no
__module__ attribute.

svn path=/main/branches/prefix/; revision=5739

19 years agoRemove code that I forgot to remove after I "ported" it.
Fabian Groffen [Fri, 19 Jan 2007 20:44:26 +0000 (20:44 -0000)]
Remove code that I forgot to remove after I "ported" it.

svn path=/main/branches/prefix/; revision=5732

19 years agoTypo (, not .)
Fabian Groffen [Fri, 19 Jan 2007 20:28:11 +0000 (20:28 -0000)]
Typo (, not .)

svn path=/main/branches/prefix/; revision=5731

19 years agoReduce confusement a bit, by including the prefix in the directory being
Fabian Groffen [Fri, 19 Jan 2007 20:24:09 +0000 (20:24 -0000)]
Reduce confusement a bit, by including the prefix in the directory being
processed.

svn path=/main/branches/prefix/; revision=5730

19 years agoFix ecompressdir looking into prefix, and use prefix shells/tools in
Fabian Groffen [Fri, 19 Jan 2007 20:10:13 +0000 (20:10 -0000)]
Fix ecompressdir looking into prefix, and use prefix shells/tools in
shebangs.

svn path=/main/branches/prefix/; revision=5729

19 years agoMerged from trunk 5697:5722
Fabian Groffen [Fri, 19 Jan 2007 19:44:53 +0000 (19:44 -0000)]
Merged from trunk 5697:5722

dump emerge's normpath in favor of portage_util's normalize_path
(WarnerBro)

fix apply_permissions import and use keyworded args in the call, as well
as PORTAGE_INST_UID instead of root, also fix some spacies in
emerge, thanks for Zac for reporting (WarnerBro)

lock file around chown/chmod (WarnerBro)

locking, try 100 (WarnerBro)

Syntax error (genone)

Attribute error (genone)

I really meant NEWS_LIB_PATH (/var/lib/gentoo) but decent idea to have a
timestamp per repo ;) (WarnerBro)

but news lib path is global, not an attr (WarnerBro)

more trivial fixes (genone)

Allow per-module filtering based on loglevels in addition to the global
PORTAGE_ELOG_CLASSES one, add wildcard support for loglevels (genone)

update make.conf.example with per-module filtering (genone)

Don't load a module if there is nothing to process after filtering
(genone)

don't force a comparison (WarnerBro)

Unified try-except-finally only works with python-2.5 (genone)

Remove -- from params so the length check works (genone)

Validate ebuild names inside portdbapi.cp_list() in order to prevent
problems later on.  Thanks to delusions for reporting on irc.

Raise an informative InvalidData exception instead of 'TypeError:
unsubscriptable object' when pkgsplit returns None.

Simplify rsync timestamp.chk handling and print the correct path for bug
#50738.  Thanks to jeka for reporting on irc.

For bug #162404, when sesandbox is enabled, only log if PORT_LOGDIR is
explicitly enabled since it is possible that local SELinux security
policies do not allow ouput to be piped out of the sesandbox domain.

Fix syntax.

svn path=/main/branches/prefix/; revision=5728

19 years agoMerged from trunk 5673:5697
Fabian Groffen [Fri, 19 Jan 2007 19:31:53 +0000 (19:31 -0000)]
Merged from trunk 5673:5697

For consistency, respect the use_binaries flag inside
_expand_new_virtuals().

Allow --usepkgonly/--getbinpkgonly to work with installed deps when
binpkgs aren't available for some packages.  Thanks to Brent Baude
<ranger@gentoo.org> for reporting.

Use the portable -o option for tar.  Thanks to Timothy Redaelli
<drizzt@gentoo.org> for the patch.

make it executable (SpankMan)

make sure we rename links and not just what they point to #162451
(SpankMan)

Prevent packages that are installed but masked from being incorrectly
flagged as "available" (unless --usepkgonly is enabled, which currently
has no package.mask support).

For --usepkgonly, allow _expand_new_virtuals() to fall back to the vardb
in case all binaries aren't available.

Fix elimination of duplicate virtuals between the binpkg repo and
installed packages.

Remove one last reference to ${tarvars}.

For bug #162404, spawn tee outside the sesandbox domain so that it reads
from a pipe between two domains.

Use elif where appropriate.  Thanks to ferringb.

start documenting qa notices so antarus stops whining (SpankMan)

superh supports sane exec stack stuff now (SpankMan)

arm supports sane exec stack stuff now (SpankMan)

add try finally blocks around locking for news (WarnerBro)

svn path=/main/branches/prefix/; revision=5727

19 years agoMerged from trunk 5659:5673
Fabian Groffen [Fri, 19 Jan 2007 19:24:28 +0000 (19:24 -0000)]
Merged from trunk 5659:5673

fix minor syntax issues with locking (WarnerBro)

Enable repoman to commit a Manifest alone instead of bailing out with
"Didn't find any changed files".

ferringb pointed out this portroot parameter, ended up not using it, try
an os.path.exists to save a very common (and slow) except on missing
repo_name files for overlays, use a dict to facility a nicer regex
comparison loop for news restrictions. (WarnerBro)

document FEATURES=sesandbox #161985 (SpankMan)

make.conf is not a manual so only list common FEATURES #161985 (SpankMan)

dirty dirty lies (WarnerBro)

Make repoman commit removals together with the other changes (instead of
with the final Manifest commit).

For consistency, just use os.environ.

Fix broken commitmessagefile handling.

Replace mktemp with mkstemp since the former is deprecated for security
reasons.

Various glep 42 fixes, fix up the portageq calls to fail properly,
rewrite the news checking code to check news for all repos with a name.
(WarnerBro)

fix a few typos in tests (WarnerBro)

If repo/profiles/news doesn't exist, return 0 updates (WarnerBro)

switch news timestamp and unread/read storage to '/var/lib/gentoo' like
the GLEP states. (WarnerBro)
(Prefix adjusted)

svn path=/main/branches/prefix/; revision=5726

19 years agoMerged from trunk 5657:5659
Fabian Groffen [Fri, 19 Jan 2007 19:07:50 +0000 (19:07 -0000)]
Merged from trunk 5657:5659

merge glep42 into trunk (WarnerBro)

merge didn't bring in portage_news, no idea why (WarnerBro)

svn path=/main/branches/prefix/; revision=5725

19 years agoMerged from trunk 5649:5657
Fabian Groffen [Fri, 19 Jan 2007 18:58:31 +0000 (18:58 -0000)]
Merged from trunk 5649:5657

exithandler is not a portageq func, so ignore it (WarnerBro)

For bug #162275, make doebuild validate *DEPEND and bail out if
necessary.

Clean up variables when finished.

Make invalid deps non-fatal for some phases.

elevate the importance of 64bit clean code on 64bit hosts (SpankMan)

Clean up imports in portage_locks.py

svn path=/main/branches/prefix/; revision=5724

19 years agoMerged from trunk 5631:5649
Fabian Groffen [Fri, 19 Jan 2007 18:55:56 +0000 (18:55 -0000)]
Merged from trunk 5631:5649

make sure people call addread/addwrite/adddeny/addpredict correctly
(SpankMan)

fix tabs with patch from Grobian and bug # 161911, fix developing a bit
(WarnerBro)

Fix 'TypeError: not all arguments converted during string formatting'.
Thanks to marienz.

Fix reversed arguments.

Fix dohtml so that it continues to install files even after some fail.
Thanks to brad walker <bradmwalker@cableone.net> in bug #149745.

Document PORTAGE_LOG_FILE, update PORTAGE_TMPDIR path which now includes
CATEGORY, and lots of style/syntax fixes.  Thanks to Arfrever Frehtes
Taifersar Arahesis <FFTA@WP.PL> from bug #161979.

For bug #161975, document the fact that GENTOO_MIRRORS supports mounted
filesystem mirrors.

For bug #69021, add news about FEATURES="test" implying USE="test".

Disable the test phase when USE=test is masked (for consistency with the
fix for bug #69021).

Don't warn about /etc/make.profile not being a symlink if it has a
parent file.

Document DOC_SYMLINKS_DIR.

Fix alphabetical order.

svn path=/main/branches/prefix/; revision=5723

19 years agoRemoving file which seems not to be used.
Fabian Groffen [Sat, 13 Jan 2007 16:41:40 +0000 (16:41 -0000)]
Removing file which seems not to be used.
Fixing tabcheck warnings (now I know how to read them).  The remaining
tabcheck warnings, are up for "upstream" to solve them.

svn path=/main/branches/prefix/; revision=5631

19 years agoMerged from trunk 5620:5629
Fabian Groffen [Sat, 13 Jan 2007 16:30:33 +0000 (16:30 -0000)]
Merged from trunk 5620:5629

Send the slot collision notice to stderr and only show minimal output in
--quiet mode.

Send the unmerge failure message to stderr.

Use end_paragraph(1) instead of add_line_break() so that there is really
a blank line.

For bug #144380, disable color at emerge startup and then enable it only
when it's absolutely sure that color should be enabled (after
EMERGE_DEFAULT_OPTS has been parsed).

Document PORTAGE_COMPRESS and PORTAGE_COMPRESS_FLAGS.

Obey the silent parameter when parsing options.

Fix a typo.

Catch InvalidData exceptions for bad atoms passed as emerge arguments.

svn path=/main/branches/prefix/; revision=5630

19 years agoMerged from trunk 5597:5620
Fabian Groffen [Fri, 12 Jan 2007 23:25:41 +0000 (23:25 -0000)]
Merged from trunk 5597:5620

Use startswith and endswith to simplify code.

Fix typos from the previous commit.

purge string module from emerge (WarnerBro)

fix "" " " bug (WarnerBro)

another annoy space bug (WarnerBro)

purge string module from repoman (WarnerBro)

purge string from portage.py, fix minor bug in portage_util (WarnerBro)

Fix a typo.

Fix a typo.

Revert accidentally modified joins.

Fix more typos.

Fix another typo.

Add a few pretty basic comments on writing code, particularly things
that portage used to do (and still does) that are...a bit out of style
;) (WarnerBro)

ignore py[co] in tests (WarnerBro)

remove the last of the string module from portage.py (WarnerBro)

svn path=/main/branches/prefix/; revision=5622

19 years agoMerged from trunk 5581:5597
Fabian Groffen [Fri, 12 Jan 2007 23:05:07 +0000 (23:05 -0000)]
Merged from trunk 5581:5597

portage_versions.py, more string.atoi -> int, fix another except: that
should be ValueError (WarnerBro)
(Prefix: string.atof -> float)

Fix broad except statement, should only be KeyError (WarnerBro)

comment the excepts in a few places (WarnerBro)

getbinpkg.py fix except: open can be IOERror or OSError and cPickle can
throw an unpicklingError (WarnerBro)

EOFError is also important according to Zac (WarnerBro)

os.cwd can return OSError (maybe IOError with wrong perms for ./, will
test actually), load_mod should be IMportError, nuke a stupid try except
around shuffle which used to break years ago with old glibcs, remove try
except around what appears to be a regex? and make the try except around
the unlink a bit cleaner (WarnerBro)

FIx a bunch of random Except: statements in portage.py, most of them are
IO/OS related (WarnerBro)

Return early from finddigest if findname2 found nothing.

For bug #88485, show the location of the build log whenever a build
fails.

Prevent an InvalidData exception during global updates due to the new
stricter catpkgsplit behavior.

Fix incremental virtuals code for the new stricter catpkgsplit behavior.

Remove a duplicate % character.

Begin the deprecation of the string module (WarnerBro)

more string deprecation (WarnerBro)

set Id on tests (WarnerBro)

More String deprecation (WarnerBro)

svn path=/main/branches/prefix/; revision=5619

19 years agoMerged from trunk 5565:5581
Fabian Groffen [Fri, 12 Jan 2007 22:54:13 +0000 (22:54 -0000)]
Merged from trunk 5565:5581

add some invalid ops to getcpv to make sure it returns the cpv still
(WarnerBro)

print the incorrect atom (WarnerBro)

Valid categories in catpkgsplit (WarnerBro)

catch and validate new ValueError Exception (WarnerBro)

Fix comments for catpkgsplit (WarnerBro)

Handle the exception in isvalidatom, change it to use a portage
exceptoin, thanks to Zac for pointing this out (WarnerBro)

learn to spell (WarnerBro)

SpanKY likes the latin categories (WarnerBro)

Use a global to ensure that the valid_category regex is cached.

dont compress files that are already compressed and dont do sanity
checking on the link dest as we cant properly verify things like
absolute symlinks (SpankMan)

use cached suffix value and if it is not valid, lets warn (SpankMan)

Allow catpkgsplit to be less strict for atoms that come from installed
packages (for backward compatibility).

Fix ebuild environment color.map support so that it works properly
through exec calls (since the color variables can not be directly
exported due to env pollution).

drop lazy bindings check once and for all ... the system ldso should
have the logic #71609 (SpankMan)

For bug #147512, don't print a cryptic error message when an
EnvironmentError occurs.  Also, allow the user to get a traceback via
--debug.

Change vercmp to use int() instead of string atoi, catch ValueError in
pkgcmp (WarnerBro)

svn path=/main/branches/prefix/; revision=5618

19 years agoMerged from trunk 5549:5565
Fabian Groffen [Fri, 12 Jan 2007 22:43:47 +0000 (22:43 -0000)]
Merged from trunk 5549:5565

continue is only for loops (genone)

Make FEATURES=test imply USE=test (genone)

Add note that any value enables EPAUSE_IGNORE (genone)

Use isinstance(foo, basestring) so that it can work with unicode strings
too.

Use dict.get() to prevent a potential (bug unlikely) KeyError.

add support for user-customizable compression #9870 (SpankMan)

docs for grabdict (WarnerBro)

Commit unit tests, hey look THEY ARE BROKEN (WarnerBro)

get_operator tests (WarnerBro)

add some invalid operators to the test to denote that get_operator
doesn't validate them, also make sure some common mis-typed things are
tested (=> instead of >= fex) (WarnerBro)

take some advice and use AssertEqual/NotEqual (WarnerBro)

I owed brian harring 3.50, for th previous advice about
assertEqual/NotEqual, oh, add dep_getcpv tests too (WarnerBro)

getslot tests (WarnerBro)

elaborate a bit on isjustname() (WarnerBro)

isjustname tests (WarnerBro)

For bug #50738, inform the user about the location of the timestamp file
and that it can be removed to force sync.

svn path=/main/branches/prefix/; revision=5617

19 years agoMerged from trunk 5533:5549
Fabian Groffen [Fri, 12 Jan 2007 22:30:39 +0000 (22:30 -0000)]
Merged from trunk 5533:5549

For bug #161422, make slot collisions non-fatal in cases where an
invalid depgraph is acceptable (--fetchonly, for example).

Don't allow slot collision nodes to block other packages since blocker
validation is only able to account for one package per slot.

Rename depgraph._invalid_depgraph_is_acceptable() to
_accept_collisions() for a better description.

Add a bit of path mangling to allow deeper tests (WarnerBro)

remove bogs test dir, add portage_versions (WarnerBro)

edit test-notes (WarnerBro) (duh! you can do better)

more test re-arranging as Alec can't read what functions are in what
files (WarnerBro)

Remove / character from module names.

Remove RESTRICT=sandbox docs until bug #161045 is resolved (genone)

Update CCACHE docs, patch by Ryan Hill (bug #156865) (genone)

Add 'stricter' description, misc typo fixes, patch by Max Lorenz (bug
#153755) (genone)

Rename 'Last Sync' to 'Timestamp of tree' to clarify the meaning (bug
#150051) (genone)

Don't escape strings in PortageException as that breaks newline handling
(bug 147785) (genone)

More portage_util tests (WarnerBro)

Extend ignore filter for grablines (bug #144445) (genone)

add stack_lists checks (WarnerBro)

svn path=/main/branches/prefix/; revision=5616

19 years agoMerged from trunk 5521:5533
Fabian Groffen [Fri, 12 Jan 2007 22:25:10 +0000 (22:25 -0000)]
Merged from trunk 5521:5533

rework test import code, rename test_vercmp to be more generic, add
tests for =* glob matches (WarnerBro)

Make the tests pass.

Fix Fail test (WarnerBro)

Take Genone's suggestion and break the modules up into module oriented
fashion.  Tests for portage.py go in portage/ and so on and so forth...
(WarnerBro)

shift test cases around (WarnerBro)

shift test cases around (WarnerBro)

rename atoms back to vercmp (WarnerBro)

split out util tests (WarnerBro)

remove monolithic test (WarnerBro)

add a few tips on adding tests, and kinks in the current system, I hope
to fix the import bug soon (WarnerBro)

Fix module loading.

Fix sys.path so that imports work correctly.

svn path=/main/branches/prefix/; revision=5615

19 years agoMerged from trunk 5508:5521
Fabian Groffen [Fri, 12 Jan 2007 22:20:33 +0000 (22:20 -0000)]
Merged from trunk 5508:5521

make.globals has no business in profiles (genone)

create symlinks to html documentation if DOC_SYMLINK_DIR is set,
original patch by TGL <degrenier@easyconnect.fr> (bug #67130) (genone)

Make env variable example about USE shell independent (genone)

Always use vercmp for cpv comparisons (genone)

Stupid me, shouldn't jsut move a part of the patch (genone)

Attach the problematic data to the exception for debugging (genone)

Make the =* operator more robust (genone)

Documenting the loop a bit (genone)

=* operator sucks (genone)

also sanitize mycpv for =* handling (genone)

minor performance improvement (genone)

I hate this thing (genone)

Minor fixes for the =* operator (I hope we're done now :). (finally,
just dad again)

Use startwith to simplify =* matching.

svn path=/main/branches/prefix/; revision=5614

19 years agoMerged from trunk 5506:5507
Fabian Groffen [Fri, 12 Jan 2007 19:24:50 +0000 (19:24 -0000)]
Merged from trunk 5506:5507

For bug #160075, send all 'QA Notice' messages to eqawarn.  Also, modify
eqawarn to use vecho and send ouput to stderr.

svn path=/main/branches/prefix/; revision=5611

19 years agoMerged from trunk 5501:5506
Fabian Groffen [Fri, 12 Jan 2007 19:16:40 +0000 (19:16 -0000)]
Merged from trunk 5501:5506

For bug #161003, disallow virtuals in package.provided and document it.  Thanks
to Robin Johnson <robbat2@gentoo.org> for the initial patch.

For bug #160971, rename dir.gz to dir.gz.old when necessary to avoid problems
with install-info.  Thanks to Ed Catmur <ed@catmur.co.uk> for the initial patch.

Misc typo fixes, patch by Benno Schulenberg (bug #157812) (genone)

Update x86 CFLAGS section, original patch by Peter Gantner (bug #133402) (genone)

Add elog related variables to make.conf(5) with a pointer to make.conf.example.
Add elog() description to ebuild(5) and update einfo() description. (genone)

svn path=/main/branches/prefix/; revision=5610

19 years agoMerged from trunk 5486:5499
Fabian Groffen [Tue, 9 Jan 2007 19:34:05 +0000 (19:34 -0000)]
Merged from trunk 5486:5499

Note: 5486 (Make PORTAGE_BASE_PATH dynamic based on __file__) not merged
into prefix, as in prefix PORTAGE_BASE_PATH is controlled by the prefix
itself, semi-dynamic.

Always run src_test when calling 'ebuild foo test' (genone)

Disable qa_source usage until it actually works (genone)

Zac pointed out that the retcodes would be wrong if stuff
failed...Yeah... (WarnerBro)

Add new eqawarn function and QA loglevel to be used for QA messages (genone)

Mention new QA loglevel in make.conf.example (genone)

Okies this works locally for me now (and Zac) (WarnerBro)

This file apparently uses spaces to line everything up pretty (I have
weird tabs set, so spacies are good :P) (WarnerBro)

Update NEWS with eqawarn and 'ebuild foo test' changes (genone)

Split PORTAGE_ELOG_CLASSES outside the loop for better efficiency.

Make digestgen() force fetch unless all required digest types are
available.  Thanks to jokey for reporting on irc.

For bug #161103, don't skip collision-protect checks in cases where the
beginning of the file path matches a symlink but is not acually inside a
symlinked directory (check the path against symlink + os.path.sep).

svn path=/main/branches/prefix/; revision=5501

19 years agoMerged from trunk 5479:5485
Fabian Groffen [Tue, 9 Jan 2007 19:25:22 +0000 (19:25 -0000)]
Merged from trunk 5479:5485

Don't automatically fix digests in --pretend mode.
(prefix also has isSvn mode)

s/prefix/suffix/ Thanks to hydrogen for reporting on irc.

s/suffix/version prefix/ since it really is a prefix for the version
string.

For bug #160893, ignore a KeyError during cache cleansing since that key
isn't wanted anyway.

Implement QA checks that attempt to detect changed shopts and IFS in
ebuild/eclass/profile code.  Spit a warning if that is the case.  I
expect this check will eventually reset the shopts and IFS, but in this
case it may break things that depend on the current behavior. (WarnerBro)

Antarus' bash improvements, thanks for Genone for reporting this major
bug. (WarnerBro)

svn path=/main/branches/prefix/; revision=5500

19 years agoMerged from trunk 5476:5478
Fabian Groffen [Sun, 7 Jan 2007 10:49:57 +0000 (10:49 -0000)]
Merged from trunk 5476:5478

Fix the digestentry.unused check so that it works properly when
old-style files/digest-* don't exist.

Don't swallow an IOError if it is thrown from the aux_get call in
portdbapi.getfetchlist().

svn path=/main/branches/prefix/; revision=5479

19 years agoMerged from trunk 5460:5471
Fabian Groffen [Sat, 6 Jan 2007 10:39:59 +0000 (10:39 -0000)]
Merged from trunk 5460:5471

As a workaround for bug #147625, spawn `id -g portage` in order to get a list of
groups for the portage user without the need to call grp.getgrall().
(prefix uses portage_const.portageuser instead of hardcoded value)

Use -G instead of -g (typo from the previous commit).

Make repoman use portage.normalize_path instead of os.path.normpath.  This might
solve an issue with incorrect repolevel detection that was reported by drizzt.

For python-2.3 compatibility, don't pass an iterable into dict.update().

For bug #160299, make sure that emerge sees a somewhat valid COUNTER even when
the counter is missing.

Fix shell glob logic that leads to false positives.  Thanks to Flameeyes for
reporting.

Fix one more potential false glob match.

revert previous changes ... ruby.eclass is wrongly polluting env with nullglob (SpankMan)

force C locale for now when parsing gcc log files #160234 (SpankMan)

For bug #160310, allow \ inside `` quotes in order to prevent a false Line
continuation ("\") Syntax Error.

For bug #160310, remove the line continuation syntax check since it's still
possible for it to generate false positives.

svn path=/main/branches/prefix/; revision=5476

19 years agoMerged from trunk 5447:5459
Fabian Groffen [Thu, 4 Jan 2007 20:43:41 +0000 (20:43 -0000)]
Merged from trunk 5447:5459

Try to create DISTDIR before disabling fetch due to it's nonexistence.  Thanks
to astinus for reporting.

add support for scanning of build logs for common issues #111436 (SpankMan)

Allow - in elog module names (genone)

undo (genone)

When using the spawn's returnpid parameter, manually remove the returned pids
from portage_exec.spawned_pids.

Use os._exit instead of sys.exit in a forked child process.

Make sure stderr is flushed since os._exit doesn't flush stdio buffers.

Make sure stderr is flushed since os._exit doesn't flush stdio buffers.

Implement distlocks for --getbinpkg so that it works properly when
parallel-fetch is enabled.  Thanks to Brent Baude <ranger@gentoo.org> for
reporting.

Export EBUILD_PHASE="" when running misc-function.sh in order to prevent bogus
phase values coming from ${T}/environment.  Thanks to solar for reporting.

When fetching metadata from a binhost, reconnect if the http server closes the
connection before sending a valid response.  Thanks to ranger for reporting.

Make sure that myid is defined for the previous commit.

svn path=/main/branches/prefix/; revision=5460

19 years agoDon't install sed wrapper, as that h0rk3ns the system, with infinite
Fabian Groffen [Tue, 2 Jan 2007 20:05:59 +0000 (20:05 -0000)]
Don't install sed wrapper, as that h0rk3ns the system, with infinite
loops as result.

svn path=/main/branches/prefix/; revision=5447

19 years agoRemoved very dubious chown/chgrp to portage owner of all files.
Fabian Groffen [Tue, 2 Jan 2007 20:00:41 +0000 (20:00 -0000)]
Removed very dubious chown/chgrp to portage owner of all files.

svn path=/main/branches/prefix/; revision=5446

19 years agoMerged from trunk 5427:5444
Fabian Groffen [Tue, 2 Jan 2007 19:59:18 +0000 (19:59 -0000)]
Merged from trunk 5427:5444

For bug #151326, prevent invalid comments from being returned by
portage.getmaskingreason().

Correct the package.mask lookup order in getmaskingreason().

For bug #141361, use an alarm signal to implement a 1 minute timeout for
processing inside an elog module.

Use a try/finally block to ensure that the alarm will always be
cancelled appropriately.

Use return values instead of direct sys.exit(123) calls when a merge
fails.

Send errors in elog_process() to stderr via writemsg.

For bug #159518, increase the "database is locked" timeout.

Use slot atom matching to simplify detection of downgrades relative to
installed packages.

For bug #159224, use separate xmatch caches for each value of
ACCEPT_KEYWORDS.

For bug #159638, fix the UnboundLocalError in vartree.getprovide().

Fix the writemsg noiselevel from the previous commit.

merge all of the QA related checks together (SpankMan)
(needed manual diff)

Don't bother to list the contents of directories before they are
unmerged since it triggers unnecessary stat calls.  Thanks to James
Cloos <cloos@jhcloos.com> for reporting.

Optimize dep_zapdeps to work without a vartree when called by repoman.

svn path=/main/branches/prefix/; revision=5445

19 years agoMerged from trunk 5414:5425
Fabian Groffen [Sat, 30 Dec 2006 16:23:53 +0000 (16:23 -0000)]
Merged from trunk 5414:5425

keep things quiet when uninstalling (SoLudd)

Send stuff that's not a warning or error to stdout rather than stderr.

fixup style (SpankMan)

detect incorrect absolute symlinks in libdirs (SpankMan)

For bug #159360, make sure that the highest available new-style virtual is
selected even if it has depes that aren't already installed.

Sort the --info USE flags for bug #159161.

Be slightly more defensive when loading the vdb/blockers caches.

Improve the logic for bug #159360 to ensure that an actual upgrade is selected
without any downgrades.

Do some small fixes to prevent slot collision nodes from interfering with the
depgraph.

Fix 'TypeError: unpack non-sequence' that occurs if myparent is None.

Punt the abort_unpack() handler since it's pointless anyway.

svn path=/main/branches/prefix/; revision=5427

19 years agoMerged from trunk 4500:4514
Fabian Groffen [Sat, 30 Dec 2006 16:08:50 +0000 (16:08 -0000)]
Merged from trunk 4500:4514

try to give the emerge manpage a facelift, upgrade clean and prune docs, change
'dependency' to 'atom', other minor fixes (WarnerBro)

Use a pickle to cache vdb metadata.  This greatly improves the performance for
loading the vdb when the buffer cache is cold.

Make portdbapi.flush_cache() consistent with vardbapi.flush_cache().

Update emerge --metadata docs for more clarity.

Allow the list of keys cached by the vardb to change without forcing a cache
version bump.

Make vartree.getslot() use the dbapi for aux_get caching.

Make vardbapi.cpv_counter() use aux_get for caching.

For bug #159252, don't preserve file attributes when copying files for
installsources.  Thanks to Ed Catmur <ed@catmur.co.uk> for this patch.

For bug #159295 and python-2.3 compatibility, don't assume that dict.update can
use an iterable.

Use a pickle to cache blockers for all installed packages so that dep_check
doesn't have to be called for every single installed package on every invocation
of emerge.

For bug #159161, make emerge --info show USE_EXPAND flags similar to the way it
does in merge list output.

Add some docs for the blockers cache format.

For bug #159310, don't show a slot collision notice if there are unresolvable
blockers.

Do some minor cleanup in the dep_zapdeps downgrade avoidance logic (while
working toward a fix for bug #159360).

svn path=/main/branches/prefix/; revision=5426

19 years agoMerged from trunk 5397:5398
Fabian Groffen [Wed, 27 Dec 2006 18:03:15 +0000 (18:03 -0000)]
Merged from trunk 5397:5398

Allow dep_check to use the global db for compatibility (fixes
python-updater breakage).

svn path=/main/branches/prefix/; revision=5400

19 years agoAlign DEFAULT_PATH with path as set by shell: usr/bin then bin
Fabian Groffen [Wed, 27 Dec 2006 18:01:34 +0000 (18:01 -0000)]
Align DEFAULT_PATH with path as set by shell: usr/bin then bin

svn path=/main/branches/prefix/; revision=5399

19 years agoMerged from trunk 5393:5394
Fabian Groffen [Tue, 26 Dec 2006 09:49:25 +0000 (09:49 -0000)]
Merged from trunk 5393:5394

Make _setitem do a deepcopy just in case.

svn path=/main/branches/prefix/; revision=5397

19 years agoFix syntax error
Fabian Groffen [Tue, 26 Dec 2006 08:57:42 +0000 (08:57 -0000)]
Fix syntax error

svn path=/main/branches/prefix/; revision=5396

19 years agoCreate the metadata directory if it doesn't exist yet.
Fabian Groffen [Tue, 26 Dec 2006 08:44:32 +0000 (08:44 -0000)]
Create the metadata directory if it doesn't exist yet.
Fix gmtime() being an argument of strftime, not write.

svn path=/main/branches/prefix/; revision=5395

19 years agoMerged from trunk 5381:5392
Fabian Groffen [Mon, 25 Dec 2006 21:34:10 +0000 (21:34 -0000)]
Merged from trunk 5381:5392

Clone cached match results before returning them from portdbapi.xmatch().
Thanks to Brian <dol-sen@telus.net> for reporting this issue.

Make bindbapi.aux_get() selectively cache metadata in order to optimize dep
matching (like portdbapi does).

Make sure that bindbapi makes EAPI correctly default to 0 in all possible cases.

more docstrings.. (WarnerBro)

Docstrings for mergeme... (WarnerBro)

Drop the warning messages for users that aren't in the portage group since
tpordbapi now correctly puts the on-disk cache into readonly mode in this case
(and allows metadata generation in-memory if necessary).

Prevent the regen action from running in --pretend mode.

When the user has insufficient access privileges, specify whether superuser
access or portage group access is required.  When only portage group access is
required but the user is not in the portage group, call
portage_data.portage_group_warning() to remind people that the portage group is
a system administration group.

Make sure that portage_group_warning() will be shown even in quiet mode.

Use a SIGTERM signal to support a die call inside of a subshell.

For bug #148603, when an ebuild dies, print eclasses that are from overlays.
Thanks to Alec Warner for the initial patch.

svn path=/main/branches/prefix/; revision=5393

19 years agoDon't die if we can't write the timestamp.chk file. It's not vital or
Fabian Groffen [Sun, 24 Dec 2006 16:38:44 +0000 (16:38 -0000)]
Don't die if we can't write the timestamp.chk file.  It's not vital or
important, just handy.

svn path=/main/branches/prefix/; revision=5381

19 years agoPrint value of EPREFIX in emerge --info output.
Fabian Groffen [Sun, 24 Dec 2006 14:40:30 +0000 (14:40 -0000)]
Print value of EPREFIX in emerge --info output.

svn path=/main/branches/prefix/; revision=5380

19 years agoAfter a svn sync, write timestamp.chk with the current UTC time such
Fabian Groffen [Sun, 24 Dec 2006 14:27:08 +0000 (14:27 -0000)]
After a svn sync, write timestamp.chk with the current UTC time such
that emerge --info shows something nice next timee on Last Sync date.

svn path=/main/branches/prefix/; revision=5379

19 years agoLook in the prefix for etc/gentoo-release.
Fabian Groffen [Sun, 24 Dec 2006 13:51:32 +0000 (13:51 -0000)]
Look in the prefix for etc/gentoo-release.

svn path=/main/branches/prefix/; revision=5378

19 years agoMake the inter-revision regex tighter, and teach repoman the same trick.
Fabian Groffen [Sun, 24 Dec 2006 11:56:50 +0000 (11:56 -0000)]
Make the inter-revision regex tighter, and teach repoman the same trick.
(So in total this code seems to be at three places implemented.)

svn path=/main/branches/prefix/; revision=5377

19 years agoPREFIX hack: a revision starting with 0 is an 'inter-revision',
Fabian Groffen [Sun, 24 Dec 2006 10:59:12 +0000 (10:59 -0000)]
PREFIX hack: a revision starting with 0 is an 'inter-revision',
which means that it is possible to create revisions on revisions.
An example is -r01.1 which is the first revision of -r1.  Note
that a period (.) is used to separate the real revision and the
secondary revision number.  This trick is in use to allow revision
bumps in ebuilds synced from the main tree for prefix changes,
while still staying in the main tree versioning scheme.

svn path=/main/branches/prefix/; revision=5376

19 years agoMerged from trunk 5366:5372
Fabian Groffen [Sun, 24 Dec 2006 10:04:14 +0000 (10:04 -0000)]
Merged from trunk 5366:5372

For bug #158931, add some release notes to explain performance penalties for
dependency calculations.

For forward compatibility, make metadata_overlay pass any additional positional
and keyword parameters into the super constructor.

Manpage fix for bug # 158983, thanks to Fabio Correa for the patch (WarnerBro)

More code cleanup, packagetree appears to be completely unused, so lets remove
it in favor of inheriting from object (WarnerBro)

Docstrings for doebuild (WarnerBro)

cptot appears to be unused, punting it along with this commented out function,
it appears to be unused as well. (WarnerBro)

svn path=/main/branches/prefix/; revision=5375

19 years agoMerged from trunk 5350:5366
Fabian Groffen [Sun, 24 Dec 2006 10:00:55 +0000 (10:00 -0000)]
Merged from trunk 5350:5366

I hate docstrings (WarnerBro)

Remove two old functions, appear to be relics from 2.0.X branch, no longer used
by portage or gentoolkit or esearch (WarnerBro)

When an unprivileged user runs portage (not in the portage group), use
metadata_overlay together with a volatile in-memory cache module in order to
implement cache writes.  This allows, for example, a user who's not in the
portage group to run `ebuild foo.ebuild digest` (issue reported by Charlie
Shepherd <masterdriverz@gentoo.org>).

Add volatile cache module missing from the previous commit.

Pass a cache instance into metadata_overlay since it doesn't have enough
information to construct one itself.

Make metadata_overlay use the autocommits attribute of the underlying database.

Fix inverted EAPI default logic.

Combine two default EAPI settings in portdbapi.aux_get().

Only write repo.stats and repo.fails when the repoman user has write access to
/var/cache/edb.

Show the "Calculating dependencies .. done!" message with --resume since the
spinner now runs inside the depgraph constructor.  Thanks to antarus for
reporting.

startime is set up in treewalk, so no need to do it globally... (WarnerBro)

List package in summary logfile (genone)

disable display of elapsed time for collision-protect as it's for benchmarking
purposes and useless to most people. (genone)

More Docstrings in portage.py (WarnerBro)

move actionmap_deps out of global scope and into doebuild where it is actually
used, add docstrings to config class in the meantime. (WarnerBro)

svn path=/main/branches/prefix/; revision=5374

19 years agoMerged from trunk 5336:5350
Fabian Groffen [Sun, 24 Dec 2006 09:53:02 +0000 (09:53 -0000)]
Merged from trunk 5336:5350

For bug #158649, minimize portdb cache pulls for installed packages when
--nodeps is enabled.  This patch also allows the vardb lock to be released
before doing any cache pulls (even when --nodeps is not enabled), and updates
the spinner while the metadata is being pulled.

More intelligently handle CacheCorruption errors in the writable cache.

For bug #158558, ignore invalid depstrings for packages that are being replaced
anyway (otherwise the user would be forced to manually unmerge the package).

When a removal phase fails, tell the user where the ebuild is and advise them
that the ebuild can be removed in order to skip the removal phases.

For installed packages with invalid depstrings, tell the user the location of
the *DEPEND files.

For bug #158632, make aux_get caching safe for missing values in cache entries.

For bug #158658, fix the 'TypeError: int argument required' that happens in the
finalize() routine.

Use the return value from setdefault to avoid an extra dict lookup.

Create a backward compatibility mode for dep_check() so that emerge can use it
to gracefully deal with installed packages that have invalid atoms or dep
syntax.

Make emerge enable backward compatibility mode for dep_check() calls on
installed packages so that it can gracefully invalid atoms or dep syntax.

Fix the "help" phase so that it works without build dirs.

For bug #158649, allow --buildpkgonly to bypass the fakedb population like
--nodeps does.

Revert the default choice for --ask --unmerge (bug #158354) because people are
complaining.

Use a pipe instead of a temp file for the depend phase.

svn path=/main/branches/prefix/; revision=5373

19 years agoUse eerror to signal errors instead of manual !!!
Fabian Groffen [Fri, 22 Dec 2006 22:52:05 +0000 (22:52 -0000)]
Use eerror to signal errors instead of manual !!!

svn path=/main/branches/prefix/; revision=5352

19 years agoMerged from trunk 5334:5335
Fabian Groffen [Wed, 20 Dec 2006 19:32:07 +0000 (19:32 -0000)]
Merged from trunk 5334:5335

Fix broken exception handling syntax causing strange exception reported
in bug #158608.

svn path=/main/branches/prefix/; revision=5336

19 years agoMerged from trunk 5320:5333
Fabian Groffen [Wed, 20 Dec 2006 18:11:14 +0000 (18:11 -0000)]
Merged from trunk 5320:5333

For bug #158503, allow --nodeps to override blockers.

Increase cache hits in portdbapi.xmatch().

Use a separate digraph to store parent/child relationships (PDEPEND
relationships are not reversed) so that relationship is always known in
case a slot collision occurs.

New elog modules for dismerging messages into a single file/mail
(genone)

Make binarytree.move_ent() properly update PF.

For bug #158558, fix broken ebuild rename logic in vardbapi.move_ent().

For bug #158558, make the unmerge phase do automatic cleanup for broken
vardbapi.move_ent() in portage versions before 2.1.2.

Fix an import statement typo.

For bug #158608, don't attempt to use distlocks when it's detected that
the filesystem is readonly (unless "skiprocheck" is in FEATURES for some
strange reason).

Add missing newlines to the warning message that's printed when the user
has distlocks enabled together with skiprocheck and the filesystem is
readonly.

Give the user some advice whenever an invalid dependency string is
encountered.

Fix the invalid dependency message so there's no confusion about which
package has the problem.

svn path=/main/branches/prefix/; revision=5334

19 years agoMerged from trunk 5305:5318
Fabian Groffen [Mon, 18 Dec 2006 20:27:05 +0000 (20:27 -0000)]
Merged from trunk 5305:5318

remove pointless redirects to /dev/null when using hasq() (SpankMan)

force environment.bz2 to be clobbered if it already exists (SpankMan)

In depgraph.altlist(), pop as many leaf nodes as possible when no
relationship has been ignored.  This can halve the time taken for a
large merge order calculation.

Don't optimize depgraph.altlist() in reversed mode since the
optimization destroys --tree ouput.

Add --debug support for --depclean.

Do some minor cleanup of the --depclean code.

Make depclean skip empty depstrings.

Disable the spinner when --debug is enabled so that it doesn't
interfere.

Catch PortageException from portdbapi.aux_get since it can happen when
gpg is in FEATURES.

For bug #158354, make "No" the default response for unmerge actions.

svn path=/main/branches/prefix/; revision=5320

19 years agoMerged from trunk 5295:5305
Fabian Groffen [Mon, 18 Dec 2006 20:22:40 +0000 (20:22 -0000)]
Merged from trunk 5295:5305

Cache blocked slots for better efficiency.

For bug #157897, show parent nodes in order to help the user decide
about what action to take.

Cache KEYWORDS and EAPI metadata values in order to speed up
portdbapi.gvisible() calls.  This greatly improves repoman performance
(help emerge a little too).

Make sure eapi is defined in order to prevent a NameError.

Split ACCEPT_KEYWORDS before entering the loop for better efficiency.

Make repoman cache per-profile xmatch results.

For bug #158177, force configure scripts that automatically detect
ccache to respect FEATURES="-ccache".  Thanks to Horst Schirmeier
<gentoo@schirmeier.com> for this suggestion.

Fix global updates error handling to prevent a traceback with python-2.5
as reported in bug #158264.

Make dep_check validate all depstring atoms in order to prevent problems
from occuring later due to unexpected invalid atoms.

Make use_reduce raise an InvalidDependString exception for use?
conditionals that aren't followed by parenthesis and add appropriate
exception handling in dep_check.

svn path=/main/branches/prefix/; revision=5319

19 years agoMerged from trunk 5284:5294
Fabian Groffen [Thu, 14 Dec 2006 15:03:58 +0000 (15:03 -0000)]
Merged from trunk 5284:5294

For bug #157897, handle the case of multiple versions within a single
package slot have been pulled into the dependency graph.  If possible,
the package that has already been pulled in will be reused.  Otherwise,
an error message will advise the user to mask an unwanted version.

handle --cols when displaying blockers (SpankMan)

For bug #157897, add slot collision handling in depgraph.create(), since
create() is called from places other than select_dep().

Update the comment about depgraph.pkg_node_map since it now maps all
nodes added to the graph.

Use depgraph.pkg_node_map so simplify comparison against existing nodes
at the  beginning of depgraph.create().

Fix the --onlydeps conditional logic in depgraph.create().  These aren't
real nodes and shouldn't be added to the digraph, etc...

Remove redundant priority handling since that's always handled in
select_dep() for nodes that have parents.

Remove pointless unpacking of the parent node.

Make --columns blockers output more consistent when --quiet is not
enabled.

svn path=/main/branches/prefix/; revision=5295

19 years agoMerged from trunk 5271:5283
Fabian Groffen [Wed, 13 Dec 2006 16:22:34 +0000 (16:22 -0000)]
Merged from trunk 5271:5283

For bug #157823, ignore blocker collisions between two packages that are
already installed if no merge is currently scheduled for either of those
package slots.  These blockers will be handled as necessary the next
time that a merge of either package is triggered.

Make the fetch phase bail out if FETCHCOMMAND or RESUMECOMMAND are
missing.  Thanks to Flameeyes for reporting.

All portage.fetch() to succeed even if FETCHCOMMAND and RESUMECOMMAND
aren't defined.

Centralize all of the vardb metadata mangling in FakeVartree.

Store dependency metadata in depgraph.mydbapi so that it can be used in
place of the portdb for optimized dep_check calls in
depgraph.validate_blockers().

Optimize dep_check calls in depgraph.validate_blockers() by using a
fakedbapi instance instead of the real pordbapi (minimizes available
matches).

For higher efficiency, call self.__int__() instead of int(self).

For bug #157897, only let depgraph.create() inject "merge" nodes into
the final state dbapi.

For bug #157897, ensure that only "merge" nodes are stored in
digraph.pkg_node_map.

Move the biolerplate cpv_all() implementation from portdbapi to dbapi.

Track slot atom to digraph node mappings as the depgraph is built.  This
mapping will be used to detect node collisions for bug #157897.

Remove redundant digraph.pkg_node_map node insertions.  Once per
digraph.create() call will cover all nodes.

svn path=/main/branches/prefix/; revision=5284

19 years agoMerged from trunk 5265:5270
Fabian Groffen [Mon, 11 Dec 2006 19:42:42 +0000 (19:42 -0000)]
Merged from trunk 5265:5270

Ignore blockers when "--buildpkgonly" is enabled.

Ensure that the root of the vdb exists before attempting to lock it.
Thanks to Flameeyes for reporting.

When there are multiple packages occupying the same slot, only consider
the one with the highest COUNTER.  Thanks to leio for reporting.

For bug #157823, don't forget to split the USE.

svn path=/main/branches/prefix/; revision=5271

19 years agoMerged from trunk 5261:5264
Fabian Groffen [Sun, 10 Dec 2006 21:53:39 +0000 (21:53 -0000)]
Merged from trunk 5261:5264

Don't collapse the tuple into a hash, since dict can use __eq__ to avoid
problems with hash collisions.  Thanks to Brian Harring for reporting.

For bug #157734, fix repoman isvalidatom() checks.  Thanks to Brian
Harring for the patch.

Add an allow_blockers parameter to isvalidatom so that the behavior is
optional.  Thanks to Brian Harring for the suggestion.

svn path=/main/branches/prefix/; revision=5265

19 years agoMerged from trunk 5259:5260
Fabian Groffen [Sun, 10 Dec 2006 16:16:47 +0000 (16:16 -0000)]
Merged from trunk 5259:5260

To minimize memory consumption and maximize performance, use hash values
for cache keys.

svn path=/main/branches/prefix/; revision=5261

19 years agoMerged from trunk 5247:5256
Fabian Groffen [Sun, 10 Dec 2006 11:23:47 +0000 (11:23 -0000)]
Merged from trunk 5247:5256

For bug #128809, process blockers for all installed packages.  Due to
the performance penalty incurred by additional dep_check calls, this is
only enabled with the --deep option.

Avoid unnecessary dbapi.cp_list() calls inside cpv_expand().

Cache the results of match_from_list() calls.

Cache results of dep_getcpv() calls.

Use dep_getcpv() inside dep_expand() for code sharing and caching.

Cache the results of fakedbapi.match() calls and clear the cache
automatically when necessary.

Initialize the match cache in the bindbapi constructor.

For bug #128809, optimize dep_check calls and enable the blocker
detection by default since the performance now seems acceptable.

Make sure the SLOT comes from the vardb instead of the portdb (for
multislot,   etc..). Thanks to jakub for reporting.

svn path=/main/branches/prefix/; revision=5259

19 years agoMerged from trunk 5238:5247
Fabian Groffen [Sun, 10 Dec 2006 11:20:04 +0000 (11:20 -0000)]
Merged from trunk 5238:5247

Add use.force support to dep_check for repoman especially. Thanks to
Flameeyes for reporting and tesing.

Use portage.isvalidatom() for atom validation in repoman.

Make isvalidatom() (and thus repoman) reject atoms containing |()
characters.  Thanks to Brian Harring for the suggestion.

Add ? to the invalid atom characters.

Clean up depstring/atom splitting and filtering.

For bug #157369, clean  when  cleanup has been triggered by changed
timestamps.  Also, allow FEATURES=keepwork to override the ebuild mtime
check.

This patch cleans up the blocker validation logic.  Unlike the previous
implementation, this one carefully considers each parent/block package
relationship in order to ensure that no unresolved blocks slip through.

Don't attempt to enforce merge order unless the blocker parent is
actually a "merge" node.

Escape a newline from the previous commit.

svn path=/main/branches/prefix/; revision=5258

19 years agoMerged from trunk 5226:5238 (+ one added modification in bin/repoman)
Fabian Groffen [Sun, 10 Dec 2006 11:16:12 +0000 (11:16 -0000)]
Merged from trunk 5226:5238 (+ one added modification in bin/repoman)

Indicate test failure with an exit code.

Remove all traces of FEATURES=cvs since code for that feature no longer
exists  (apparently since portage-2.1).
+ Remove traces of FEATURES=svn for the same reason

Clean up vardbapi.aux_get().

Remove locking from dbapi.aux_update() implementations so that the
caller can handle locking instead.

Go ahead and populate depgraph.mydbapi even when --emptytree is enabled
since it doesn't matter anymore (dep_check now returns all deps anyway).

Move the reset of the per-root initializations into the loop.

Remove unused depgraph.match() method.

Use tuples for digraph nodes in order to avoid lots of pointless join
and split calls.

Split some global updates functions out of depgraph and use them for
depclean when necessary.

Fix broken SLOT update logic in fakedbapi.cpv_inject().

adjust QA_* variable names for complex values of  like x86-fbsd

svn path=/main/branches/prefix/; revision=5257

19 years agoMerged from trunk 5212:5219
Fabian Groffen [Fri, 8 Dec 2006 08:12:21 +0000 (08:12 -0000)]
Merged from trunk 5212:5219

Add pretty basic vercmp unit testing...need more cases

Make all lock files hidden for bug #142369.

minor syntax changes ( in is faster than has_key ) and docstrings

Allow searching for action terms again

add some portage_util tests

Avoid bogus 'Deprecated use of action' warnings for valid commands such
as `emerge -s sync`.

Simplfy deprecated action parsing logic.

svn path=/main/branches/prefix/; revision=5226

19 years agoMerged from trunkk 5205:5212
Fabian Groffen [Fri, 8 Dec 2006 08:08:58 +0000 (08:08 -0000)]
Merged from trunkk 5205:5212

Share the same config instance between portagetree and portdbapi
instances since clone isn't needed here. Also, trigger population of
virtuals prior to cloning  in emerge.  This reduces the number of times
the virtuals are populated from 3  to just 1.

Enable FakeVartree to populate the virtuals so that the vdb doesn't have
to be  scanned separately.

portage_versions lacks a header or copyright notice :x

Catch an exception instead of using a redundant os.access call.

A quick docstring for vercmp.

s/zip/izip/  Thanks to Brian Harring for the suggestion.

s/zip/izip/ some more

svn path=/main/branches/prefix/; revision=5225

19 years agoMerged from trunk 5196:5205
Fabian Groffen [Fri, 8 Dec 2006 08:05:32 +0000 (08:05 -0000)]
Merged from trunk 5196:5205

For bug #157385, enable portage.digestgen() to fetch any distfiles for
which there are no existing digests.

Fix broken SRC_URI logic from the previous commit.

Fix broken SRC_URI logic in doebuild.

Make repoman bail out if it's unable to generate the Manifest.

For bug #157393, fix up ebuild path normalization so that it's
compatible with portdbapi handling and works properly with symlinks
(like crossdev creates).

Make sure the ebuild path is properly normalized.

Revert r5175 for bug #152127 since the original = behavior seems more
desirable.  We can change the >= and <= behavior instead.

For bug #152127, make vercmp give less value to implcit .0, so two
versions that aren't literally equal are not ambiguously given the same
value (in sorting, for example).

svn path=/main/branches/prefix/; revision=5224

19 years agoMerged from trunk 5188:5196
Fabian Groffen [Fri, 8 Dec 2006 08:01:42 +0000 (08:01 -0000)]
Merged from trunk 5188:5196

Use a fake vartree for depgraph calculations.  This minimizes the time
that a lock needs to be held on the vardb, and allows in-memory global
updates when necessary.

Delete the depgraph when it's no longer needed.

Use FakeVartree for vardb lock/cache during depclean.

Allow depclean to silently skip packages unmerged behind it's back.

Fix depclean so the fake vartree is used in dep_check calls.

Always silently ingnore missing packages during unmerge.

Remove all traces of the unmerge raise_on_missing parameter.

Fix indentation.

svn path=/main/branches/prefix/; revision=5223

19 years agoOops, commands was not imported, only the function, so no need to call
Fabian Groffen [Wed, 6 Dec 2006 21:09:00 +0000 (21:09 -0000)]
Oops, commands was not imported, only the function, so no need to call
it absolute.

svn path=/main/branches/prefix/; revision=5188

19 years agoMerged from trunk 5183:5185
Fabian Groffen [Wed, 6 Dec 2006 20:42:14 +0000 (20:42 -0000)]
Merged from trunk 5183:5185

Remove dependence on the vartree api by using equivalent vardbapi calls.

Only call calc_changelog if there is an installed version in the same
slot.

svn path=/main/branches/prefix/; revision=5187

19 years agocheck given paths first, then fall back to some hard-coded ones.
Fabian Groffen [Wed, 6 Dec 2006 20:40:01 +0000 (20:40 -0000)]
check given paths first, then fall back to some hard-coded ones.

svn path=/main/branches/prefix/; revision=5186

19 years agoAdd missing slash
Fabian Groffen [Wed, 6 Dec 2006 20:26:31 +0000 (20:26 -0000)]
Add missing slash

svn path=/main/branches/prefix/; revision=5183

19 years agoMerged from trunk 5179:5180
Fabian Groffen [Wed, 6 Dec 2006 19:43:53 +0000 (19:43 -0000)]
Merged from trunk 5179:5180

Remove unused depgraph.is_newer_ver_installed() method.

svn path=/main/branches/prefix/; revision=5182

19 years agoPimp Repoman version thingy such that I can better see where I did what.
Fabian Groffen [Wed, 6 Dec 2006 19:41:51 +0000 (19:41 -0000)]
Pimp Repoman version thingy such that I can better see where I did what.

svn path=/main/branches/prefix/; revision=5181

19 years agoMerged from trunk 5177:5178
Fabian Groffen [Wed, 6 Dec 2006 19:28:18 +0000 (19:28 -0000)]
Merged from trunk 5177:5178

Implement fakedbapi.aux_update().

svn path=/main/branches/prefix/; revision=5179

19 years agoMerged from trunk 5172:5176
Fabian Groffen [Wed, 6 Dec 2006 19:26:56 +0000 (19:26 -0000)]
Merged from trunk 5172:5176

For bug #157134, make `emerge --digest` automatically reload the config
with FEATURES=digest enabled globally.

Fix up mtimedb["ldpath"] references broken by the previous commit.

Make match_to_list = behavior consistent with >= and <= for bug #152127.

Sync match_to_list >=, <=, etc.. code with the new = code.

svn path=/main/branches/prefix/; revision=5177

19 years agoMerged from trunk 5165:5171
Fabian Groffen [Mon, 4 Dec 2006 20:35:50 +0000 (20:35 -0000)]
Merged from trunk 5165:5171

When portdbapi.aux_get() generates a KeyError in
portage.getmaskingstatus(), handle it by reporting "corruption".

Make `repoman fix` work with the new ebuild Manifest checks during
depend phase.

Update the RESTRICT=binchecks docs.  Thanks to jakub for the suggestion
and antarus for the patch.

For `ebuild --force digest`, exempt the depend phase from Manifest
checks.

Use portage.chdir() instead of os.chdir() in order to avoid an 'OSError:
[Errno 2] No such file or directory' if the working directory doesn't
exist.  Thanks to Caster for reporting.

svn path=/main/branches/prefix/; revision=5172

19 years agoJust use EPREFIX, as we imported it.
Fabian Groffen [Mon, 4 Dec 2006 09:54:10 +0000 (09:54 -0000)]
Just use EPREFIX, as we imported it.

svn path=/main/branches/prefix/; revision=5170

19 years agoMerged from trunk 5163:5164
Fabian Groffen [Sun, 3 Dec 2006 20:05:39 +0000 (20:05 -0000)]
Merged from trunk 5163:5164

drop RESTRICT=stricter since every aspect it covers can be handled
properly via other means

svn path=/main/branches/prefix/; revision=5165

19 years ago- fixed emerge not reporting on files which need updating (missing call
Fabian Groffen [Sun, 3 Dec 2006 13:33:20 +0000 (13:33 -0000)]
- fixed emerge not reporting on files which need updating (missing call
  to chk_updated_cfg_files)
- cosmetic change to import/use EPREFIX
- Drop wheelgroup warning, as it makes no sense in prefix.

svn path=/main/branches/prefix/; revision=5163

19 years agoMerged from trunk 5158:5161
Fabian Groffen [Sun, 3 Dec 2006 09:58:52 +0000 (09:58 -0000)]
Merged from trunk 5158:5161

Skip digest checks when digest is in features.

Make portage.digestgen() automatically exempt the depend phase from
Manifest checks so that it works for repoman without triggering a digest
verification failure.

Move the global statement out of the try block so that it's clearly in
scope for the finally block.

svn path=/main/branches/prefix/; revision=5162

19 years agoMerged from trunk 5149:5157
Fabian Groffen [Sat, 2 Dec 2006 15:21:14 +0000 (15:21 -0000)]
Merged from trunk 5149:5157

Always verify the ebuild checksums before executing it.  Thanks to solar
for the suggestion and antarus for the initial patch.

For manifest and digest phases, use a global variable to temporarily
exempt the depend phase from manifest checks (in cache regeneration is
triggered).

Temporarily exempt the depend phase during the help phase also.

Avoid checking the same Manifest several times in a row during a regen
with an empty cache.

For consistent behavior in all timezones, make emerge-webrsync use UTC
time for decisions about which snapshots to download.

Only attempt to verify the Manifest if the ebuild is actually in a
portage tree.

Make sure that *all* of the ebuilds are listed in the Manifest.

Make sure that all depend phases triggered by the digest phase are
exempt from digest checks.

svn path=/main/branches/prefix/; revision=5158

19 years agoMerged from trunk 5145:5148
Fabian Groffen [Fri, 1 Dec 2006 18:33:20 +0000 (18:33 -0000)]
Merged from trunk 5145:5148

add ReST template to be used for manpage/make.globals/make.conf.example
generation later on (+ fixes)

svn path=/main/branches/prefix/; revision=5149

19 years agoMerged from trunk 5141:5143
Fabian Groffen [Wed, 29 Nov 2006 22:00:18 +0000 (22:00 -0000)]
Merged from trunk 5141:5143

Make sure QUIET mode is exported to the environment properly when using
-q mode.

No point in forking a call to true when we can simply use the bash
internal of : for true.

svn path=/main/branches/prefix/; revision=5145

19 years agoOn a second thought it's much better if portage makes sure it can find
Fabian Groffen [Wed, 29 Nov 2006 21:41:57 +0000 (21:41 -0000)]
On a second thought it's much better if portage makes sure it can find
its own binaries itself.  This also solves problems during
bootstrapping, since the portage binpath now always ends up last.

svn path=/main/branches/prefix/; revision=5144

19 years agoI hope this time I really get the path right.
Fabian Groffen [Wed, 29 Nov 2006 19:54:26 +0000 (19:54 -0000)]
I hope this time I really get the path right.

svn path=/main/branches/prefix/; revision=5141

19 years agoIt comes in handy sometimes to have access to your own executables.
Fabian Groffen [Wed, 29 Nov 2006 19:44:56 +0000 (19:44 -0000)]
It comes in handy sometimes to have access to your own executables.

svn path=/main/branches/prefix/; revision=5140

19 years agoFix default path order
Fabian Groffen [Wed, 29 Nov 2006 18:48:58 +0000 (18:48 -0000)]
Fix default path order

svn path=/main/branches/prefix/; revision=5139

19 years agoMerged from trunk 5132:5135
Fabian Groffen [Sun, 26 Nov 2006 16:38:30 +0000 (16:38 -0000)]
Merged from trunk 5132:5135

Never overwrite an untouched config file and trigger config protection
instead (in case the new config has an unwanted change).  In cases where
an installed package in the same slot owns a protected file that will be
merged, bump the mtime on the installed file in order to ensure that it
isn't unmerged.  Thanks to Ciaran McCreesh <ciaranm@ciaranm.org> for his
suggestion on bug #8423, comment #40.

Update the dblink.isprotected() docstring.

For bug #8423, make etc-update preserve timestamps when possible.

svn path=/main/branches/prefix/; revision=5138

19 years agoUse latest/default autotools, unset possibly unused variable
Fabian Groffen [Sun, 26 Nov 2006 11:18:46 +0000 (11:18 -0000)]
Use latest/default autotools, unset possibly unused variable

svn path=/main/branches/prefix/; revision=5132

19 years agoRequire Python 2.4
Fabian Groffen [Sun, 26 Nov 2006 11:11:28 +0000 (11:11 -0000)]
Require Python 2.4

svn path=/main/branches/prefix/; revision=5131

19 years agoMerged from trunk 5128:5129
Fabian Groffen [Sun, 26 Nov 2006 11:01:12 +0000 (11:01 -0000)]
Merged from trunk 5128:5129

For bug #8423, allow the merge phase to overwrite untouched config files
and also allow the unmerge phase to unmerge untouched config files.

svn path=/main/branches/prefix/; revision=5130

19 years agoMerged from trunk 5120:5123
Fabian Groffen [Thu, 23 Nov 2006 17:13:30 +0000 (17:13 -0000)]
Merged from trunk 5120:5123

For bug #150585, stack package.keywords incrementally so that -keyword
works as expected for any incremental variable.  This brings the
gvisible and getmaskingstatus logic into sync so that the confusing
(masked by: ) message will not be generated in cases where
package.keywords contains -keyword followed by keyword.

For bug #156014, always round up the next kB so that it doesn't show 0
kB when some small file still needs to be fetched.

Allow -keyword to be matched since some ebuilds use it.  Thanks to Brian
Harring reporting on bug #150585.

svn path=/main/branches/prefix/; revision=5124

19 years agoMerged from trunk 5113:5119
Fabian Groffen [Wed, 22 Nov 2006 18:38:15 +0000 (18:38 -0000)]
Merged from trunk 5113:5119

For bug #142993, make sure that chown and chgrp calls preserve S_ISUID
and S_ISGID mode bits.

Fix apply_permissions logic for cases where mode is unspecified.

Fix bit mask support when preserving S_ISUID and S_ISGID in
apply_permissions.
Really fix bit mask support when preserving S_ISUID and S_ISGID in
apply_permissions.

Fix a KeyError in emerge --info <pkg> when there is no matching ebuild
in the tree.  Thanks to Bo ?\195?\152rsted Andresen
<bo.andresen@zlin.dk> for reporting.

Use portage_data.lchown for compatibility.

svn path=/main/branches/prefix/; revision=5120

19 years agoAlso for digests hold that svn list won't show added files, so run svn
Fabian Groffen [Mon, 20 Nov 2006 20:53:06 +0000 (20:53 -0000)]
Also for digests hold that svn list won't show added files, so run svn
status afterwards to get them.

svn path=/main/branches/prefix/; revision=5109

19 years agoMerged from trunk 5091:5107
Fabian Groffen [Mon, 20 Nov 2006 17:51:48 +0000 (17:51 -0000)]
Merged from trunk 5091:5107

Use mydbapi is None to eliminate the return_all_deps parameter from
dep_check and dep_zapdeps.  The result is the same and this way we
avoid having an additional parameter with overlapping meaning.

Allow dep_wordreduce to mark things satisfied by package.provided even
when mydbapi is None.

For depclean, just pass in None for mydbapi (instead of an empty
fakedbapi instance) since that's now supported.

Remove redundant package.provided handling that is now covered by
dep_wordreduce.

Allow the ROOT setting to come from make.conf.  Thanks to Daniel
Barkalow <barkalow@iabervon.org> for this patch (submitted on the
gentoo-portage-dev mailing list).

For bug #155739, only check if a dep is in the args when myroot ==
self.target_root.

Print a warning message if a user requests a package from
package.provided (since it won't be merged).

Enable PORTAGE_CONFIGROOT to be set via an new --config-root option.
Thanks to Daniel Barkalow <barkalow@iabervon.org> for the initial patch
(submitted on the gentoo-portage-dev mailing list).

svn path=/main/branches/prefix/; revision=5108

19 years agoImproved repoman SVN support:
Fabian Groffen [Sun, 19 Nov 2006 17:02:23 +0000 (17:02 -0000)]
Improved repoman SVN support:
- svn list returns outdated information if not preceded by svn update
- svn list doesn't return information on newly added files, so for SVN
  run svn status to get the added files
This fixes problems with phantom files being reported as not added,
while they either don't exist any more in the repo, or are added for
sure.

svn path=/main/branches/prefix/; revision=5090

19 years agoMerged from trunk 5080:5088
Fabian Groffen [Sun, 19 Nov 2006 16:39:04 +0000 (16:39 -0000)]
Merged from trunk 5080:5088

Revert ACCEPT_LICENSE support, since license group support is a
requirement and it remain unimplemented.  This brings trunk back into
sync with the 2.1.2 branch.

For bug #155559, force depclean dep_check calls to preference installed
packages.

Use fake_vardb for cached aux_get calls.

Fix portdbapi.cpv_all() so that it actually returns a list of all
available ebuilds.

svn path=/main/branches/prefix/; revision=5089

19 years agoMerged from trunk 5060:5075
Fabian Groffen [Fri, 17 Nov 2006 18:26:25 +0000 (18:26 -0000)]
Merged from trunk 5060:5075

Pull in the new-style virtuals and install them so that the vdb has
complete standalone dep info, in case a portage tree isn't available.

For bug #141118, make dep_zapdeps assign zero cost to new-style
virtuals.

Revert the depclean message, since new-style virtuals will now be kept.

Update the _expand_new_virtuals docstring with a not about zero cost for
new-style virtuals.

Fix _expand_new_virtuals so that it doesn't allow any virtual deps to go
unaccounted for.

Integrate old-style virtuals handling into _expand_new_virtuals() and
prefer new-style over old-style whenever they are available.

For bug #155484, apply PORTAGE_NICENESS as soon as possible (especially
before global updates).

Make fixpackages use PORTAGE_NICENESS.

svn path=/main/branches/prefix/; revision=5077

19 years agoDon't use hard-coded group names, but use the portage group from
Fabian Groffen [Thu, 16 Nov 2006 21:36:06 +0000 (21:36 -0000)]
Don't use hard-coded group names, but use the portage group from
configure instead.

svn path=/main/branches/prefix/; revision=5060