portage.git
19 years agoMerged from trunk 5861:5880
Fabian Groffen [Sat, 3 Feb 2007 21:52:00 +0000 (21:52 -0000)]
Merged from trunk 5861:5880

fix doc typo; more test fiddling (WarnerBro)

A somewhat more intelligent layout, move tests into portaage namespace
so we can import them easier, seems to be a more common layout from what
I've seen.  Also rewrite the test runner to work with new layout
(WarnerBro)

apparently I'm retarded and missed some of the tests.. (WarnerBro)

Rename dir.bz2 since that's the most likely case now.

add warning about storing data in PORTDIR (WarnerBro)

For bug #153109, replace our old chflags module with the one provided by
the py-freebsd package.  Thanks to Diego Petten?\195?\178
<flameeyes@gentoo.org> for the initial patch.

remove redundant directory now (WarnerBro)

grrr I thought I removed this (WarnerBro)

For bug #165065, use the proper RESTRICT setting when fetching files in
digestgen().

Make the tests pass.

For bug #165034, make sure that symlinks are excluded from chmod calls.

Use ! -type l to exclude symlinks better.  Thanks to marienz.

Fix a typo from the previos commit.

In order to correctly handl the case of target caches that don't have
complete eclass entries, validate the set of interited eclasses to make
sure it is correct (since timestamp validation is not applicable).

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

19 years agoMerged from trunk 585{1,9}
Fabian Groffen [Thu, 1 Feb 2007 08:34:00 +0000 (08:34 -0000)]
Merged from trunk 585{1,9}

Don't use os.path.isdir() because it can swallow errors related to
filesystem/disk corruption.

add some new tests (WarnerBro)

rename file (WarnerBro)

Round one of dep_getusedeps() (WarnerBro)

increase test coverage to cover slots, uncovering a few corner cases
that need fixing (WarnerBro)

fix regression in test changes (WarnerBro)

Load the most current variables from /etc/profile.env for post_emerge
stuff.

Fix --newuse so that it works correctly with --usepkg.

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

19 years agoMerged from trunk 5839:5849
Fabian Groffen [Wed, 31 Jan 2007 13:12:43 +0000 (13:12 -0000)]
Merged from trunk 5839:5849

For bug #164532, don't rely on ${USERLAND} since the portage tree might
be empty.

For bug #164617, don't change permissions on ${WORKDIR} with unpack().

Use find + xargs to avoid a potential 'Argument list too long' from
bash.  Thanks to solar for reporting.

add some useful options (SpankMan)

try and fix $LastChangedRevision$ (SpankMan)

try and fix $Rev$ (SpankMan)

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

19 years agoIn prefix we _always_ have GNU xargs, so we can *always* use -r (which
Fabian Groffen [Tue, 30 Jan 2007 20:54:48 +0000 (20:54 -0000)]
In prefix we _always_ have GNU xargs, so we can *always* use -r (which
is short for --no-run-if-empty)

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

19 years agoxpak -> portage.xpak
Fabian Groffen [Tue, 30 Jan 2007 20:34:37 +0000 (20:34 -0000)]
xpak -> portage.xpak

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

19 years agoimport xpak -> import portage.xpak
Fabian Groffen [Tue, 30 Jan 2007 20:23:17 +0000 (20:23 -0000)]
import xpak -> import portage.xpak

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

19 years agovimdiff against trunk, found some code that was not in.
Fabian Groffen [Tue, 30 Jan 2007 20:01:49 +0000 (20:01 -0000)]
vimdiff against trunk, found some code that was not in.
removed "import portage.process" call in function because this "unsets"
portage, such that portage.spawn yields in an UnboundLocalError.  In any
way, this allows us prefixers to sync the tree.

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

19 years agoMerged from trunk r58{20,33}
Fabian Groffen [Tue, 30 Jan 2007 16:53:04 +0000 (16:53 -0000)]
Merged from trunk r58{20,33}

Minor cleanup for the LIVEVCS.stable code.

add support for transparently decompressing gz/Z/bz2 files since some
upstream packages will compress for us (SpankMan)

For bug #164078, don't trigger the CLEAN_DELAY countdown for autoclean
operations since those are most likely unattended.  Thanks to Dan
<hydrogen@notyetimplemented.com> for the initial patch.

For bug #164363, shuffle the ip addresses returned from
socket.getaddrinfo().

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

19 years agoBleh... can't commit when repoman is still broken.
Fabian Groffen [Sun, 28 Jan 2007 21:57:29 +0000 (21:57 -0000)]
Bleh... can't commit when repoman is still broken.

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

19 years agoMerged from trunk 5816:5817
Fabian Groffen [Sun, 28 Jan 2007 21:46:18 +0000 (21:46 -0000)]
Merged from trunk 5816:5817

Can't delete variable that doesn't exist anymore (bug #164280) (genone)

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

19 years agoFix a first batch of _ vs .
Fabian Groffen [Sun, 28 Jan 2007 21:43:00 +0000 (21:43 -0000)]
Fix a first batch of _ vs .

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

19 years agoMerged from trunk 5813:5814
Fabian Groffen [Sun, 28 Jan 2007 19:37:45 +0000 (19:37 -0000)]
Merged from trunk 5813:5814

use errno.EACCES as suggested by Brian Harring (WarnerBro)

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

19 years agoFix tarball.sh using the right file
Fabian Groffen [Sun, 28 Jan 2007 19:36:53 +0000 (19:36 -0000)]
Fix tarball.sh using the right file

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

19 years agoMerged from trunk 5795:5804
Fabian Groffen [Sun, 28 Jan 2007 18:22:17 +0000 (18:22 -0000)]
Merged from trunk 5795:5804

add support for parsing of unicode quotes (SpankMan)

Ignore EEXIST from rmdir since some kernels (such as solaris) return
that instead of ENOTEMPTY.

Remove a stray print statement.  Thanks to Rick Warner in bug #125261.

fix format bug and mention default built_with_use behavior (SpankMan)

Add a warning about confcache to make.conf(5) (genone)

Catch EACCESS when running env-update, orignal patch by
<phajdan.jr@gmail.com> (bug #106061) (genone)

translate unicode quotes to ascii ones so we can keep our regex simple
(SpankMan)

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

19 years agoMerged from trunk 5791:5795 (WarnerBro)
Fabian Groffen [Sun, 28 Jan 2007 17:49:39 +0000 (17:49 -0000)]
Merged from trunk 5791:5795  (WarnerBro)

fix namespacing in tests

add test to entice svn mv

Move tests into new directory structure

fix minor sed overzeallousness

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

19 years agoMerged from trunk 5789:5791
Fabian Groffen [Sun, 28 Jan 2007 17:46:43 +0000 (17:46 -0000)]
Merged from trunk 5789:5791

For consistency, do not imply --pretend with --changelog since that
prevents --changelog from being usable in EMERGE_DEFAULTS_OPTS.
Thanks to Ryan Hill <dirtyepic@gentoo.org> in #151250.

if requested argv cannot be matched to anything, exit with non-zero
status (SpankMan)

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

19 years agoNamespace "sanitizing" into portage.const_autotool
Fabian Groffen [Sun, 28 Jan 2007 17:40:19 +0000 (17:40 -0000)]
Namespace "sanitizing" into portage.const_autotool

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

19 years agoMerged from trunk 5785:5786
Fabian Groffen [Sun, 28 Jan 2007 17:38:18 +0000 (17:38 -0000)]
Merged from trunk 5785:5786

Document namespace sanitizing (genone)

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

19 years agoThe great "try and see if you can do what genone did" challenge part 3:
Fabian Groffen [Sun, 28 Jan 2007 17:36:33 +0000 (17:36 -0000)]
The great "try and see if you can do what genone did" challenge part 3:
"namespace sanitizing" (trunk 5780:5785)

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

19 years agoThe great "try and see if you can do what genone did" challenge part 2:
Fabian Groffen [Sun, 28 Jan 2007 17:23:45 +0000 (17:23 -0000)]
The great "try and see if you can do what genone did" challenge part 2:
merged "rename of exec to process", which included the change of all
portage_XXX calls to portage.XXX.  Commit message could have been
clearer there genone...

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

19 years agoThe great "try and see if you can do what genone did" challenge part 1:
Fabian Groffen [Sun, 28 Jan 2007 17:15:29 +0000 (17:15 -0000)]
The great "try and see if you can do what genone did" challenge part 1:
move the files into the "right" location

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

19 years agoRemove seemingly stale file
Fabian Groffen [Sun, 28 Jan 2007 11:08:57 +0000 (11:08 -0000)]
Remove seemingly stale file

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

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