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

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

17 years agoRemove the depgraph.pkg_node_map attribute and use other
Zac Medico [Mon, 12 Nov 2007 18:36:47 +0000 (18:36 -0000)]
Remove the depgraph.pkg_node_map attribute and use other
means to accomplish the same thing.

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

17 years agoAdd DependencyArg instances as parents of packages in the
Zac Medico [Mon, 12 Nov 2007 07:54:37 +0000 (07:54 -0000)]
Add DependencyArg instances as parents of packages in the
digraph since these relationships should be useful during
backtracking.

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

17 years ago* Remove all references to the obsolete Package.digraph_node attribute.
Zac Medico [Mon, 12 Nov 2007 06:43:03 +0000 (06:43 -0000)]
* Remove all references to the obsolete Package.digraph_node attribute.
* Reimplement Package comparison methods since the previous way didn't
  seem to function properly for dict keys.
* Clean up depgraph._add_pkg() to use the Package object attributes.

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

17 years agoMake the Package class emulate the interface of it's own
Zac Medico [Mon, 12 Nov 2007 03:34:22 +0000 (03:34 -0000)]
Make the Package class emulate the interface of it's own
digraph_node tuple so that the Package instance itself
can be added directly to the digraph.

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

17 years agoBug #197797 - Set umask to 022 so that created files (such as the
Zac Medico [Mon, 12 Nov 2007 01:42:08 +0000 (01:42 -0000)]
Bug #197797 - Set umask to 022 so that created files (such as the
world file) have sane permissions.

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

17 years agoMake diefunc() clean up QA_INTERCEPTORS in case it is
Zac Medico [Sun, 11 Nov 2007 22:17:05 +0000 (22:17 -0000)]
Make diefunc() clean up QA_INTERCEPTORS in case it is
called from inherit() since sed called below.

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

17 years ago* Provide reasonable default values for Dependency
Zac Medico [Sun, 11 Nov 2007 10:51:42 +0000 (10:51 -0000)]
* Provide reasonable default values for Dependency
  priority and depth attributes.
* Remove depgraph.create() since it's no longer needed.
* Remove depgraph._get_parent_sets() and instead get the
  information from DependencyArg attributes.

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

17 years agoFix depgraph._get_arg_for_pkg() so that it compares package
Zac Medico [Sun, 11 Nov 2007 08:47:43 +0000 (08:47 -0000)]
Fix depgraph._get_arg_for_pkg() so that it compares package
types to help ensure a proper match.

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

17 years agoImplement mapping of packages to instances of DependencyArg
Zac Medico [Sun, 11 Nov 2007 06:20:08 +0000 (06:20 -0000)]
Implement mapping of packages to instances of DependencyArg
in depgraph._get_arg_for_pkg(). Among other things, this
provides a way to know whether or not a specific package
has been specified as an argument, which determines whether
or not it can be removed from the graph during backtracking.

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

17 years agoWrap accesses to depgraph._set_atoms.findAtomForPackage() in
Zac Medico [Sun, 11 Nov 2007 01:01:34 +0000 (01:01 -0000)]
Wrap accesses to depgraph._set_atoms.findAtomForPackage() in
a new depgraph._get_arg_for_pkg() method.

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

17 years agoMake the EbuildQuote.missing_quotes regex accept single
Zac Medico [Sat, 10 Nov 2007 17:31:08 +0000 (17:31 -0000)]
Make the EbuildQuote.missing_quotes regex accept single
quotes where it accepts double quotes in order to
eliminate some false positives. Thanks to Krzysiek
Pawlik <nelchael@gentoo.org> for reporting.

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

17 years agoFix WorldSet.cleanPackage() so that it properly preserves
Zac Medico [Sat, 10 Nov 2007 06:48:24 +0000 (06:48 -0000)]
Fix WorldSet.cleanPackage() so that it properly preserves
nonatoms (sets) in the world file.

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

17 years agoConvert all the checks in repoman.checks to use a new LineCheck
Zac Medico [Sat, 10 Nov 2007 03:12:09 +0000 (03:12 -0000)]
Convert all the checks in repoman.checks to use a new LineCheck
interface that takes a single line as an argument. This has at
least a few of benefits:

 * Eliminates lots of redundant code
 * Error messages are ordered by line number across all checks

The performance is slightly worse due to the increased number
of method calls, but it's not really noticeable in comparison
to the time consumed by dependency checks.

Thanks to Petteri Räty <betelgeuse@gentoo.org> for the initial
patch which I only made a few minor modifications to.

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

17 years agoClean up expansion of set arguments in depgraph.select_files().
Zac Medico [Fri, 9 Nov 2007 20:17:47 +0000 (20:17 -0000)]
Clean up expansion of set arguments in depgraph.select_files().

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

17 years agofix typo and missing classmethod declaration
Marius Mauch [Fri, 9 Nov 2007 16:35:05 +0000 (16:35 -0000)]
fix typo and missing classmethod declaration

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

17 years agoif multiple glsas result in the same cat/pkg:slot being affected only use the highest...
Marius Mauch [Fri, 9 Nov 2007 15:51:10 +0000 (15:51 -0000)]
if multiple glsas result in the same cat/pkg:slot being affected only use the highest resulting atom

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

17 years agomove checkfile parsing into its own function
Marius Mauch [Fri, 9 Nov 2007 15:38:48 +0000 (15:38 -0000)]
move checkfile parsing into its own function

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

17 years agoMove glsa-check from gentoolkit into portage so the gentoolkit version can be removed...
Marius Mauch [Fri, 9 Nov 2007 15:10:37 +0000 (15:10 -0000)]
Move glsa-check from gentoolkit into portage so the gentoolkit version can be removed after 2.2 is released

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

17 years agorevert getMergeList to return CPVs again instead of atoms
Marius Mauch [Fri, 9 Nov 2007 15:07:18 +0000 (15:07 -0000)]
revert getMergeList to return CPVs again instead of atoms

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

17 years agoFix incorrect type in depgraph._missing_args.
Zac Medico [Fri, 9 Nov 2007 08:21:50 +0000 (08:21 -0000)]
Fix incorrect type in depgraph._missing_args.

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

17 years agoCreate classes to encapsulate eache of the depgraph argument
Zac Medico [Fri, 9 Nov 2007 07:15:55 +0000 (07:15 -0000)]
Create classes to encapsulate eache of the depgraph argument
types: atoms, packages and sets.

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

17 years agoRemove the workaround for \n -> \r\n transformations in
Zac Medico [Fri, 9 Nov 2007 03:35:38 +0000 (03:35 -0000)]
Remove the workaround for \n -> \r\n transformations in
SpawnTestCase.testLogfile() since the problem is solved
by the patch from bug #198491.

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

17 years agoBug #198491 - Disable termios.OPOST post-processing of output on
Zac Medico [Fri, 9 Nov 2007 03:33:07 +0000 (03:33 -0000)]
Bug #198491 - Disable termios.OPOST post-processing of output on
the slave pty file descriptor since otherwise weird things like
\n -> \r\n transformations may occur. Thanks to Ulrich Mueller
<ulm@gentoo.org> for this patch.

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

17 years agoRevert accidental hunk from bug 198491. Haven't tested
Zac Medico [Fri, 9 Nov 2007 01:54:28 +0000 (01:54 -0000)]
Revert accidental hunk from bug 198491. Haven't tested
this yet.

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

17 years agomake.globals should not be relative to config_root
Zac Medico [Fri, 9 Nov 2007 01:33:41 +0000 (01:33 -0000)]
make.globals should not be relative to config_root
because it only contains constants.

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

17 years agoTweak EOutput.term_columns calculation for TERM="dumb" so
Zac Medico [Thu, 8 Nov 2007 22:36:32 +0000 (22:36 -0000)]
Tweak EOutput.term_columns calculation for TERM="dumb" so
that it behaves like TERM="cons25" currently does. Thanks
to Ulrich Mueller <ulm@gentoo.org> for the patch.

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

17 years agoDon't do:
Zac Medico [Thu, 8 Nov 2007 22:11:23 +0000 (22:11 -0000)]
Don't do:
  Calculating dependencies |Fetching binary packages info...
but instead put "Fetching ..." on it's own line.
(branches/prefix r8461)

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

17 years agoBug #198492 - Make quickpkg create $PKGDIR if it doesn't
Zac Medico [Thu, 8 Nov 2007 22:03:32 +0000 (22:03 -0000)]
Bug #198492 - Make quickpkg create $PKGDIR if it doesn't
already exist.

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

17 years agoIt is not cool and/or helpfull to see an HTML dump of some
Zac Medico [Thu, 8 Nov 2007 21:57:12 +0000 (21:57 -0000)]
It is not cool and/or helpfull to see an HTML dump of some
page in case it is not what is expected (like a 404).
(branches/prefix r8460)

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

17 years agoFor unsatisfied dependencies, shorten the per-package EAPI mask
Zac Medico [Wed, 7 Nov 2007 23:54:15 +0000 (23:54 -0000)]
For unsatisfied dependencies, shorten the per-package EAPI mask
output and show an informative message whenever an EAPI mask is
encountered.

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

17 years agoReally fix broken logic for --update greedy slot atoms in
Zac Medico [Wed, 7 Nov 2007 08:19:21 +0000 (08:19 -0000)]
Really fix broken logic for --update greedy slot atoms in
depgraph.select_files().

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

17 years agoFix broken logic for --update greedy slot atoms in
Zac Medico [Wed, 7 Nov 2007 08:15:49 +0000 (08:15 -0000)]
Fix broken logic for --update greedy slot atoms in
depgraph.select_files().

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

17 years agoMake depgraph.select_files() perform internal expansion of
Zac Medico [Tue, 6 Nov 2007 22:58:16 +0000 (22:58 -0000)]
Make depgraph.select_files() perform internal expansion of
package set arguments since ideally the depgraph needs to
be awary of the precise origin of each atom.

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

17 years agoRemove the usage.obsolete "KEYWORDS contain -*" warning since people
Zac Medico [Tue, 6 Nov 2007 17:21:13 +0000 (17:21 -0000)]
Remove the usage.obsolete "KEYWORDS contain -*" warning since people
are using -* to indicate that a package should not be tried on archs
other than those for which it already has KEYWORDS.

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

17 years agoSimplify and fix bugs in is_valid_package_atom().
Zac Medico [Tue, 6 Nov 2007 09:39:26 +0000 (09:39 -0000)]
Simplify and fix bugs in is_valid_package_atom().

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

17 years agoRemove references to ${O} in dyn_spec() since antarus
Zac Medico [Tue, 6 Nov 2007 08:58:08 +0000 (08:58 -0000)]
Remove references to ${O} in dyn_spec() since antarus
made that variable mutable.

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

17 years agoGo ahead and exempt selected profile-specific USE_EXPAND
Zac Medico [Tue, 6 Nov 2007 08:31:22 +0000 (08:31 -0000)]
Go ahead and exempt selected profile-specific USE_EXPAND
flags from IUSE QA Notices since we are planning to make
these particular flags into implicit members of IUSE.
We can make this extensible later, but for now we just
want to eliminate some useless QA Notices (a subset of
bug #70648). We're not exempting any non profile-
specific USE_EXPAND flags here. For non profile-specific
flags, we intend to implement an IUSE syntax extension
(bug #133327).

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

17 years agoFix create_world_atom() logic some more for bug #198129.
Zac Medico [Tue, 6 Nov 2007 06:54:41 +0000 (06:54 -0000)]
Fix create_world_atom() logic some more for bug #198129.

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

17 years agoBug #198129 - Prevent SLOT atoms like sys-devel/binutils:0
Zac Medico [Tue, 6 Nov 2007 06:41:04 +0000 (06:41 -0000)]
Bug #198129 - Prevent SLOT atoms like  sys-devel/binutils:0
from being inappropriately recorded in the world file when
USE=multislot is enabled.

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

17 years agoremove O and PPID from being readonly. O is set python side (and we will hopefully...
Alec Warner [Tue, 6 Nov 2007 06:25:50 +0000 (06:25 -0000)]
remove O and PPID from being readonly.  O is set python side (and we will hopefully stop being exported soon.  PPID is ro by bash, so no need to declare it twice

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

17 years agoAllow multislot packages to be added to the world file
Zac Medico [Mon, 5 Nov 2007 22:42:16 +0000 (22:42 -0000)]
Allow multislot packages to be added to the world file
via --noreplace. Having these atoms in the world file
will trigger recommendations to run emaint in some
cases, like when running `emerge -e world`. The atoms
need to be in the world file to prevent multislot
packages from being removed by --depclean though.

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

17 years agoMake WorldHandler lock the world file when in --fix mode.
Zac Medico [Mon, 5 Nov 2007 08:41:00 +0000 (08:41 -0000)]
Make WorldHandler lock the world file when in --fix mode.

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

17 years agoAdd support for package sets in WorldHandler.
Zac Medico [Mon, 5 Nov 2007 08:01:54 +0000 (08:01 -0000)]
Add support for package sets in WorldHandler.

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

17 years agoFix 'TypeError: not all arguments converted during string formatting'
Zac Medico [Mon, 5 Nov 2007 06:49:14 +0000 (06:49 -0000)]
Fix 'TypeError: not all arguments converted during string formatting'
issues with the EbuildNestedDie check.

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

17 years agoReplace StringIO usage with a simple list of lines. The
Zac Medico [Mon, 5 Nov 2007 06:16:16 +0000 (06:16 -0000)]
Replace StringIO usage with a simple list of lines. The
iteration interface is practically identical but the
list of lines if more efficient because the lines only
have to be split one time for each ebuild instead of
for each check.

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

17 years agoMake exception strings more informative.
Zac Medico [Sun, 4 Nov 2007 20:57:12 +0000 (20:57 -0000)]
Make exception strings more informative.

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

17 years agoMake Manifest.create() do some basic validation of ebuild
Zac Medico [Sun, 4 Nov 2007 18:00:56 +0000 (18:00 -0000)]
Make Manifest.create() do some basic validation of ebuild
file names like portdbapi.cp_list() would do.

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

17 years agoIn portdbapi.cp_list(), validate the ebuild name to ensure
Zac Medico [Sun, 4 Nov 2007 09:29:56 +0000 (09:29 -0000)]
In portdbapi.cp_list(), validate the ebuild name to ensure
that it matches the name of the package.

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

17 years agoWhen evaluating *DEPEND conditionals for the Packages metadata
Zac Medico [Sun, 4 Nov 2007 08:10:29 +0000 (08:10 -0000)]
When evaluating *DEPEND conditionals for the Packages metadata
index, do not use IUSE to filter USE since there is currently
no guarantee that IUSE properly defines all of the necessary
flags.

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

17 years agoClean up ACCEPT_KEYWORDS incremental stacking logic and
Zac Medico [Sun, 4 Nov 2007 06:36:02 +0000 (06:36 -0000)]
Clean up ACCEPT_KEYWORDS incremental stacking logic and
fix some minor inconsistencies.

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

17 years agoIn fetch(), replace checksum_failure_counts dict with single
Zac Medico [Sun, 4 Nov 2007 05:32:48 +0000 (05:32 -0000)]
In fetch(), replace checksum_failure_counts dict with single
int counter.

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

17 years agoGenerate a usage.obsolete warning whenever
Zac Medico [Sun, 4 Nov 2007 03:32:29 +0000 (03:32 -0000)]
Generate a usage.obsolete warning whenever
-* is found in KEYWORDS.

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

17 years agoMake fetch() behave like the ebuild has RESTRICT="primaryuri"
Zac Medico [Sun, 4 Nov 2007 02:11:24 +0000 (02:11 -0000)]
Make fetch() behave like the ebuild has RESTRICT="primaryuri"
after 2 checksum failures for a fetched file. This should
increase the probability of fetching the correct file before
the maximum number of tries is reached.

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

17 years agoFor sanity, pass an actual list of keys into aux_get() instead
Zac Medico [Sun, 4 Nov 2007 00:21:02 +0000 (00:21 -0000)]
For sanity, pass an actual list of keys into aux_get() instead
of iterating over a set that happens to be mutable (though it
remains constant in practice).

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

17 years agoBug #197797 - Do not actively clear o+rx permission bits
Zac Medico [Sat, 3 Nov 2007 23:43:31 +0000 (23:43 -0000)]
Bug #197797 - Do not actively clear o+rx permission bits
on the /var/lib/portage directory. Only clear the o+w
bits. This allows users who aren't in the portage group
to have read access to the world file by default, but
administrators can explicitly chmod o-rx that directory
if necessary, and portage will leave those bits alone.

This makes the permission settings in dblink.treewalk()
consistent with those that are already defined in
config._init_dirs().

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

17 years agoCall die() so that the $TMP directory is always properly
Zac Medico [Sat, 3 Nov 2007 22:47:37 +0000 (22:47 -0000)]
Call die() so that the $TMP directory is always properly
cleaned up.

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

17 years agoBug #197965 - Make fetch() bail out after 5 checksum
Zac Medico [Sat, 3 Nov 2007 21:40:12 +0000 (21:40 -0000)]
Bug #197965 - Make fetch() bail out after 5 checksum
failures for a particular file since downloading the
same file repeatedly from every single available
mirror is a waste of bandwidth and time.

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

17 years agoif mode=1 and `dialog` is not usable, abort #197990 by DominikBuerkle
Mike Frysinger [Sat, 3 Nov 2007 21:13:45 +0000 (21:13 -0000)]
if mode=1 and `dialog` is not usable, abort #197990 by DominikBuerkle

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

17 years agoBug #197965 - When fetch() encounters a checksum failure,
Zac Medico [Sat, 3 Nov 2007 20:40:40 +0000 (20:40 -0000)]
Bug #197965 - When fetch() encounters a checksum failure,
look for an identical file from a previous checksum failure
in order to avoid consuming unnecessary disk space with
duplicate files.

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

17 years agoFix update_config_files() so that it uses update_dbentry()
Zac Medico [Sat, 3 Nov 2007 19:11:37 +0000 (19:11 -0000)]
Fix update_config_files() so that it uses update_dbentry()
to handle update commands since that already supports
slotmove commands for SLOT atoms.

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

17 years agoRemove redundant code from previous commit.
Zac Medico [Sat, 3 Nov 2007 16:37:25 +0000 (16:37 -0000)]
Remove redundant code from previous commit.

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

17 years agoBug #197932 - Make dbapi._cpv_sort_ascending()
Zac Medico [Sat, 3 Nov 2007 16:34:23 +0000 (16:34 -0000)]
Bug #197932 - Make dbapi._cpv_sort_ascending()
preserve explicit -r0 for consistency in findname
and aux_get calls.

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

17 years agoTODO: Make update_config_files() handle slotmove commands for SLOT atoms.
Zac Medico [Sat, 3 Nov 2007 09:45:51 +0000 (09:45 -0000)]
TODO: Make update_config_files() handle slotmove commands for SLOT atoms.

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

17 years agoIn portage.fetch(), condense digest check output to a single
Zac Medico [Sat, 3 Nov 2007 01:54:33 +0000 (01:54 -0000)]
In portage.fetch(), condense digest check output to a single
line for all digests.

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

17 years agoSort scanlist and ebuildlist to ensure that repoman always
Zac Medico [Fri, 2 Nov 2007 21:17:40 +0000 (21:17 -0000)]
Sort scanlist and ebuildlist to ensure that repoman always
processes packages in a predictable order.

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

17 years agoMake portdbapi.gvisible() use portdbapi._aux_cache_keys
Zac Medico [Fri, 2 Nov 2007 08:51:34 +0000 (08:51 -0000)]
Make portdbapi.gvisible() use portdbapi._aux_cache_keys
for metadata pulls.

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

17 years agoReturn early from config.getMaskAtom() as soon as a matching
Zac Medico [Fri, 2 Nov 2007 08:33:47 +0000 (08:33 -0000)]
Return early from config.getMaskAtom() as soon as a matching
unmask atom is found.

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

17 years agoBug #197594 - Document FEATURES="lmirror".
Zac Medico [Fri, 2 Nov 2007 07:14:32 +0000 (07:14 -0000)]
Bug #197594 - Document FEATURES="lmirror".

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

17 years agoMake sure vardbapi.cp_list() always sorts the results.
Zac Medico [Fri, 2 Nov 2007 06:14:53 +0000 (06:14 -0000)]
Make sure vardbapi.cp_list() always sorts the results.

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

17 years agoFix ignore_priority logic in depgraph.altlist() in order
Zac Medico [Fri, 2 Nov 2007 04:31:28 +0000 (04:31 -0000)]
Fix ignore_priority logic in depgraph.altlist() in order
to handle some cases where it was possible for nodes to
be selected without their PDEPENDs being propperly added
to the asap_nodes list.

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

17 years agoCollapse 2 identical code hunks into 1.
Zac Medico [Fri, 2 Nov 2007 02:14:48 +0000 (02:14 -0000)]
Collapse 2 identical code hunks into 1.

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

17 years agoOptimize merge order to try and select nodes that only have
Zac Medico [Fri, 2 Nov 2007 01:14:18 +0000 (01:14 -0000)]
Optimize merge order to try and select nodes that only have
unsatisfied PDEPEND slightly earlier. This solves a problem
with xorg-server being merged too early during an all binary
install (since DEPEND is ignored for binaries), triggering
built_with_use() calls to fail as reported in bug #189966.
Since DEPEND is discarded in cases like this, it is
important to exploit the difference between PDEPEND and
RDEPEND in order to optimize merge order. Without this
optimization, the merge order is technically correct, but
not as optimal as it should be and has lots of potential to
trigger issues with built_with_use() or similar things that
require better optimization of merge order.

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

17 years agoIn the 'there are no ebuilds to satisfy "foo"' message, discard
Zac Medico [Thu, 1 Nov 2007 21:14:06 +0000 (21:14 -0000)]
In the 'there are no ebuilds to satisfy "foo"' message, discard
null/ from failed cpv_expand category expansion.

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

17 years agoProperly escape { and } characters in regular expressions even
Zac Medico [Thu, 1 Nov 2007 18:26:41 +0000 (18:26 -0000)]
Properly escape { and } characters in regular expressions even
though it seems to work either way.

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

17 years agoRemove an extra \$ from the EbuildQuote.var_reference regex
Zac Medico [Thu, 1 Nov 2007 18:19:53 +0000 (18:19 -0000)]
Remove an extra \$ from the EbuildQuote.var_reference regex
so that it will properly match things like variable references
without braces, like $S.

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

17 years agoMake the EbuildUselessCdS check for both quoted and unquoted ${S}
Zac Medico [Thu, 1 Nov 2007 17:49:49 +0000 (17:49 -0000)]
Make the EbuildUselessCdS check for both quoted and unquoted ${S}
so the user doesn't have to fix quoting before this check will
recognize the violation.

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

17 years agoAvoid making unnecessary copies of PackageSet._atoms by
Zac Medico [Thu, 1 Nov 2007 06:37:55 +0000 (06:37 -0000)]
Avoid making unnecessary copies of PackageSet._atoms by
replacing calls to self.getAtoms() with self._load().

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

17 years agoAdd a check for redundant cd "${S}" statements on the first
Zac Medico [Thu, 1 Nov 2007 02:25:18 +0000 (02:25 -0000)]
Add a check for redundant cd "${S}" statements on the first
line of src_(compile|install|test) ebuild methods. Thanks to
Petteri Räty <betelgeuse@gentoo.org> for this patch.

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

17 years agoMake depgraph.select_files() recursively expand sets given as
Zac Medico [Wed, 31 Oct 2007 22:12:41 +0000 (22:12 -0000)]
Make depgraph.select_files() recursively expand sets given as
arguments so that containment tests in _get_parent_sets()
properly match atoms in nested sets (like if world contains
system). Otherwise, atoms from nested sets would get recorded
in the world file.

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

17 years agoFix diefunc() so that it doesn't report that the ebuild is from
Zac Medico [Wed, 31 Oct 2007 17:33:00 +0000 (17:33 -0000)]
Fix diefunc() so that it doesn't report that the ebuild is from
an overlay when EMERGE_FROM == binary.

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

17 years agoUpdate the FEATURES=mirror docs to more accurately reflect behavior.
Zac Medico [Wed, 31 Oct 2007 17:12:42 +0000 (17:12 -0000)]
Update the FEATURES=mirror docs to more accurately reflect behavior.

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

17 years agoDefer selection of package dependency atoms until they are
Zac Medico [Wed, 31 Oct 2007 05:27:48 +0000 (05:27 -0000)]
Defer selection of package dependency atoms until they are
actually needed since the appropriate atom selection behavior
can change between the time that the package is initially
added to the graph and when it's dependencies are traversed
(like when --consistent is enabled).

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

17 years agoGather some ignored dependencies so that they can be properly
Zac Medico [Wed, 31 Oct 2007 02:38:29 +0000 (02:38 -0000)]
Gather some ignored dependencies so that they can be properly
processed by the depgraph when "conistent" mode is enabled.

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

17 years agoRemove a few unused depgraph attributes.
Zac Medico [Wed, 31 Oct 2007 01:35:17 +0000 (01:35 -0000)]
Remove a few unused depgraph attributes.

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

17 years agoFix "args" set handling wrt $ROOT in depgraph._complete_graph().
Zac Medico [Tue, 30 Oct 2007 23:33:11 +0000 (23:33 -0000)]
Fix "args" set handling wrt $ROOT in depgraph._complete_graph().

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

17 years agoImplement license filtering for xmatch minimum-visible and
Zac Medico [Tue, 30 Oct 2007 22:00:49 +0000 (22:00 -0000)]
Implement license filtering for xmatch minimum-visible and
bestmatch-visible. Also, make the gvisible license filtering
conditional on config.local_config since repoman doesn't do
license filtering.

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

17 years agoOptimize xmatch "bestmatch-visible" to do fewer metadata
Zac Medico [Tue, 30 Oct 2007 21:48:11 +0000 (21:48 -0000)]
Optimize xmatch "bestmatch-visible" to do fewer metadata
accesses by using the same code as "minimum-visible" but
with a reverse iterator.

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

17 years agoImplement a "consistent" depgraph parameter (enabled by --consistent)
Zac Medico [Tue, 30 Oct 2007 21:25:29 +0000 (21:25 -0000)]
Implement a "consistent" depgraph parameter (enabled by --consistent)
that can be used ensure that installation of new packages does not
break any deep dependencies of required sets (args, system, or world).
Unfortunately, the performance penalty for small dep calculations is
too great to enable this parameter by default. At least it will be
useful for testing backtracking behavior when that is implemented.

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

17 years agoUse rstrip("\n") to remove trailing newlines from
Zac Medico [Mon, 29 Oct 2007 05:26:59 +0000 (05:26 -0000)]
Use rstrip("\n") to remove trailing newlines from
CONTENTS lines.

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

17 years agoRewrite the dblink.getcontents() code to use str.split(" ")
Zac Medico [Mon, 29 Oct 2007 05:22:39 +0000 (05:22 -0000)]
Rewrite the dblink.getcontents() code to use str.split(" ")
for splitting CONTENTS lines so that even file paths that
end with spaces can be handled. This patch makes the fix for
bug #196836#c6 more complete. Some code for parsing old
malformed symlink entries has been removed sinces it's
probably not useful or worth maintaining anymore.

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

17 years agoMake portdbapi.cp_list() use os.listdir() instead of
Zac Medico [Mon, 29 Oct 2007 00:08:28 +0000 (00:08 -0000)]
Make portdbapi.cp_list() use os.listdir() instead of
portage.listdir() since portage.listdir() has unnecessary
overhead and it's cache isn't needed since cp_list() has
it's own cache.

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

17 years agoFix PackageSet.getAtoms() and getNonAtoms() so that they
Zac Medico [Sun, 28 Oct 2007 21:34:36 +0000 (21:34 -0000)]
Fix PackageSet.getAtoms() and getNonAtoms() so that they
don't return references to private data structures.

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

17 years agoFix --depclean to use SetConfig.getSetAtoms() and also fix a
Zac Medico [Sun, 28 Oct 2007 20:47:02 +0000 (20:47 -0000)]
Fix --depclean to use SetConfig.getSetAtoms() and also fix a
broken reference to packagesets which is now settings.sets.

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

17 years agoFix SetConfig.getSetAtoms() to stop initializing ignorelist
Zac Medico [Sun, 28 Oct 2007 20:30:46 +0000 (20:30 -0000)]
Fix SetConfig.getSetAtoms() to stop initializing ignorelist
in the parameter list since otherwise the ignorelist persists
between calls and causes unpredictable results for callers.

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

17 years agoOptimize stdout_spinner.update() methods so that they don't
Zac Medico [Sun, 28 Oct 2007 18:56:59 +0000 (18:56 -0000)]
Optimize stdout_spinner.update() methods so that they don't
waste cpu time by flushing ouput to the tty too frequently.

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

17 years agoFix cp_list() to prevent it from returning a reference
Zac Medico [Sun, 28 Oct 2007 09:05:18 +0000 (09:05 -0000)]
Fix cp_list() to prevent it from returning a reference
to one of it's internal lists.

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

17 years agoSort all dbapi.cp_list() results in ascending order and
Zac Medico [Sun, 28 Oct 2007 07:26:24 +0000 (07:26 -0000)]
Sort all dbapi.cp_list() results in ascending order and
cache the results when possible. The order is preserved
in dbapi.match() so those results are also sorted.

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

17 years agoReplace depgraph._slot_node_map with _slot_pkg_map so
Zac Medico [Sat, 27 Oct 2007 20:43:49 +0000 (20:43 -0000)]
Replace depgraph._slot_node_map with _slot_pkg_map so
that it's easier to get existing Package instances.

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

17 years agoMake depgraph._select_atoms() more flexible by allowing
Zac Medico [Sat, 27 Oct 2007 04:41:56 +0000 (04:41 -0000)]
Make depgraph._select_atoms() more flexible by allowing
the repositories to be passed in as a parameter.

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