Zac Medico [Fri, 20 Aug 2010 04:28:10 +0000 (21:28 -0700)]
Add experimental EPREFIX/EROOT support to the config and vartree
classes, and use it in ResolverPlayground to emulate a prefix-like
environment. This fixes ResolverPlayground so that it doesn't have
to abuse the --root and --root-deps options in order to create a
testing environment. Instead it simply creates a temporary EPREFIX.
WARNING: EPREFIX/EROOT support is experimental and may be incomplete
for cases in which EPREFIX is non-empty.
Zac Medico [Fri, 20 Aug 2010 01:46:12 +0000 (18:46 -0700)]
Stop trying to read /etc/make.globals because it's been a symlink to
/usr/share/portage/config/make.globals since portage-2.1.6.
Zac Medico [Fri, 20 Aug 2010 01:42:24 +0000 (18:42 -0700)]
Update docs, comments, and messages to refer to make.globals in
/usr/share/portage/config/ instead of /etc/make.globals.
Zac Medico [Fri, 20 Aug 2010 00:05:53 +0000 (17:05 -0700)]
Rename the bdeps_root variable to depend_root, since it's used to control
DEPEND and in the future we may have separate build-time dep types for
host and target.
Zac Medico [Fri, 20 Aug 2010 00:01:16 +0000 (17:01 -0700)]
Eliminate the bdeps_optional variables inside depgraph._add_pkg_deps(),
and use the pkg.built attribute instead.
Sebastian Luther [Thu, 19 Aug 2010 22:56:27 +0000 (00:56 +0200)]
Tests: Properly test the circular dep handler
Sebastian Luther [Thu, 19 Aug 2010 22:55:46 +0000 (00:55 +0200)]
Tests: ResolverPlayground: Support checking the suggestions given by the circular dep handler.
Sebastian Luther [Thu, 19 Aug 2010 22:54:34 +0000 (00:54 +0200)]
Move the clever parts of depgraph._show_circular_deps into its own module.
This also fixes some bugs related to autounmask.
Sebastian Luther [Thu, 19 Aug 2010 13:10:40 +0000 (15:10 +0200)]
cycle-finder: Don't try to change flags that are in use.{make,focrce}
Zac Medico [Thu, 19 Aug 2010 08:58:27 +0000 (01:58 -0700)]
Move code from EbuildProcess to EbuildPhase.
Zac Medico [Thu, 19 Aug 2010 08:54:16 +0000 (01:54 -0700)]
Raise ValueError if fromlist contains an extra comma.
Zac Medico [Thu, 19 Aug 2010 07:34:36 +0000 (00:34 -0700)]
Remove duplicate attributes from __slots__.
Zac Medico [Thu, 19 Aug 2010 06:31:49 +0000 (23:31 -0700)]
* In helpers_die arguments, display ${0##*/} instead of $0 since $0
is needlessly long.
* When calling helpers_die from a function, use ${FUNCNAME[0]} in
arguments instead of $0.
Zac Medico [Thu, 19 Aug 2010 00:52:10 +0000 (17:52 -0700)]
Use doebuild_environment() to ensure proper environment initialization
for clean/cleanrm phases, and use the simpler _spawn_phase() function
instead of doebuild to spawn the phases.
Zac Medico [Thu, 19 Aug 2010 00:26:23 +0000 (17:26 -0700)]
Use simpler _spawn_phase() instead of doebuild() since
doebuild_environment() already done the env setup.
Zac Medico [Thu, 19 Aug 2010 00:08:59 +0000 (17:08 -0700)]
Move the code from _prepare_env_file() to a new BinpkgEnvExtractor
class.
Zac Medico [Wed, 18 Aug 2010 22:42:58 +0000 (15:42 -0700)]
Remove unnecessary call to _prepare_env_file(), since it only makes
sense for binary or installed packages.
Zac Medico [Wed, 18 Aug 2010 22:31:29 +0000 (15:31 -0700)]
Move environment sanity check to the Scheduler and do it if there
are any source packages in the merge list.
Zac Medico [Wed, 18 Aug 2010 21:53:44 +0000 (14:53 -0700)]
When suggesting solutions inside _show_circular_deps(), ignore solutions
that involve changes to use.mask or use.force settings.
Zac Medico [Wed, 18 Aug 2010 20:49:52 +0000 (13:49 -0700)]
Fix get_cycles() to handle None return value from shortest_path().
Zac Medico [Wed, 18 Aug 2010 20:45:19 +0000 (13:45 -0700)]
Fix deprecation warnings from paren_reduce.
Sebastian Luther [Wed, 18 Aug 2010 20:08:58 +0000 (22:08 +0200)]
Fix small bug in _show_circular_deps and add some tests
Sebastian Luther [Wed, 18 Aug 2010 19:40:26 +0000 (21:40 +0200)]
portage.util.digraph: Raise KeyError in newly added functions. Add tests.
Sebastian Luther [Wed, 18 Aug 2010 17:42:11 +0000 (19:42 +0200)]
extract_affecting_use: Fix the same bug as in use_reduce
Sebastian Luther [Mon, 14 Jun 2010 12:37:59 +0000 (14:37 +0200)]
_show_circular_deps: Ignore solution that violate use dpendencies specified by parents. Warn the user if there are many cycles.
Sebastian Luther [Mon, 14 Jun 2010 09:53:38 +0000 (11:53 +0200)]
_show_circular_deps: Stop prunning the graph to show (other) parents of the involved packages in the merge list
Sebastian Luther [Mon, 14 Jun 2010 09:51:44 +0000 (11:51 +0200)]
_show_circular_deps: Fix handling of 'None' returned by extract_affecting_use and remove debug output
Sebastian Luther [Fri, 11 Jun 2010 09:26:43 +0000 (11:26 +0200)]
_emerge.depgraph._show_circular_deps(): Find suggestions if an atom occures more than once in a dep string
Sebastian Luther [Tue, 8 Jun 2010 18:29:15 +0000 (20:29 +0200)]
Print suggestions for circular dependencies
Sebastian Luther [Tue, 8 Jun 2010 12:00:38 +0000 (14:00 +0200)]
_emerge.depgraph._show_circular_deps(): Display only the smallest cycle
Sebastian Luther [Tue, 8 Jun 2010 11:59:41 +0000 (13:59 +0200)]
portage.util.digraph: Add get_cycles() and its helpers shortest_path() and bfs()
Sebastian Luther [Wed, 18 Aug 2010 16:44:08 +0000 (18:44 +0200)]
Tests: Make sure the ResolverPlayground doesn't ignore DEPEND
Sebastian Luther [Wed, 18 Aug 2010 16:43:20 +0000 (18:43 +0200)]
Tests: ResolverPlaygound: change --root-deps parameter to include build time deps
Zac Medico [Wed, 18 Aug 2010 20:01:54 +0000 (13:01 -0700)]
Use _prepare_env_file() to extract the binary package environment.bz2
prior to the pkg_setup phase. This fixes a regression since EbuildPhase
no longer calls doebuild(), and therefore _prepare_env_file() needs
to be called now.
Zac Medico [Wed, 18 Aug 2010 19:26:19 +0000 (12:26 -0700)]
Use _prepare_env_file() to extract environment.bz2 prior to the
pkg_prerm phase. This fixes a regression since EbuildPhase no
longer calls doebuild(), and therefore _prepare_env_file() needs
to be called now.
Zac Medico [Wed, 18 Aug 2010 14:37:28 +0000 (07:37 -0700)]
Bug #324075 - If the vcs doesn't preserve mtimes then disable the
copyright date check unless the ebuild has just been added or
modified.
Sebastian Luther [Wed, 18 Aug 2010 13:50:53 +0000 (15:50 +0200)]
check_required_use: Fix the same bug as in use_reduce
Sebastian Luther [Wed, 18 Aug 2010 13:33:55 +0000 (15:33 +0200)]
paren_reduce: Fix the same bug as in use_reduce
Sebastian Luther [Wed, 18 Aug 2010 13:19:24 +0000 (15:19 +0200)]
Revert "Tests: Remove paren_reduce tests"
This reverts commit
67f3bef9efeff7061765edc9515a97143c2f2e55.
Zac Medico [Wed, 18 Aug 2010 13:36:21 +0000 (06:36 -0700)]
* Replace config._iuse_implicit_re with a callable _iuse_implicit_match
object that simply returns boolean, and update consumers.
* Make check_required_use() take a callable for the iuse parameter,
and pass in Package.use.is_valid_flag or iuse.__contains__ as
appropriate.
Sebastian Luther [Wed, 18 Aug 2010 12:58:19 +0000 (14:58 +0200)]
use_reduce: code cleanup
Zac Medico [Wed, 18 Aug 2010 12:21:28 +0000 (05:21 -0700)]
Bug #312085 - Make config.setcpv() treat USE_EXPAND_HIDDEN flags as if
they are in IUSE. This helps for the embedded profile which does not have
typical use.force/use.mask settings. The flags are matched with a regular
expression and match results are memoized in order to optimize performance.
Zac Medico [Wed, 18 Aug 2010 12:07:12 +0000 (05:07 -0700)]
Bug #308933 - Export os.path.realpath(PORTAGE_TMPDIR), to make sandbox
happy.
Zac Medico [Wed, 18 Aug 2010 11:24:01 +0000 (04:24 -0700)]
Remove unused iuse_implicit attribute.
Zac Medico [Wed, 18 Aug 2010 10:48:06 +0000 (03:48 -0700)]
Add opconvert test for "|| ( ( A B ) C )".
Zac Medico [Wed, 18 Aug 2010 10:24:13 +0000 (03:24 -0700)]
Fix use_reduce() to correctly handle "|| ( ( A B ) C )", and also
fix some test cases that had erroneous expected_result values.
Zac Medico [Wed, 18 Aug 2010 07:29:05 +0000 (00:29 -0700)]
Add commented test case for a known regression.
Zac Medico [Tue, 17 Aug 2010 20:22:35 +0000 (13:22 -0700)]
Temporarily disable portage.dep deprecation warnings for external api
consumers. Once the relevant api changes are in a portage release with
stable keywords, make these warnings unconditional.
Zac Medico [Tue, 17 Aug 2010 18:55:13 +0000 (11:55 -0700)]
Use binarytree._ensure_dir() to create the binpkg parent dir.
Zac Medico [Tue, 17 Aug 2010 18:41:34 +0000 (11:41 -0700)]
Use binarytree._ensure_dir() to create the binpkg parent dir.
Zac Medico [Tue, 17 Aug 2010 18:24:15 +0000 (11:24 -0700)]
Fix breakage in REPLACING_VERSIONS support for emerge.
Zac Medico [Tue, 17 Aug 2010 18:00:15 +0000 (11:00 -0700)]
Add pretend to actionmap_deps.
Zac Medico [Tue, 17 Aug 2010 17:55:21 +0000 (10:55 -0700)]
Fix the REPLACING_VERSIONS code to work in cases when the pretend/setup
phases are pulled in as dependencies of other phases.
Zac Medico [Tue, 17 Aug 2010 17:30:12 +0000 (10:30 -0700)]
Discard REPLACING_VERSIONS and REPLACED_BY_VERSION when they are no
longer needed.
Zac Medico [Tue, 17 Aug 2010 16:42:20 +0000 (09:42 -0700)]
Use EbuildPhase instead of EbuildProcess, for things like die_hooks
support.
Zac Medico [Tue, 17 Aug 2010 16:35:41 +0000 (09:35 -0700)]
Make EbuildBinpkg inherit from CompositeTask since the EbuildPhase
class is capable of executing the 'package' phase.
Arfrever Frehtes Taifersar Arahesis [Tue, 17 Aug 2010 15:50:56 +0000 (17:50 +0200)]
Remove no longer needed code.
Zac Medico [Tue, 17 Aug 2010 14:38:13 +0000 (07:38 -0700)]
Tweak the EbuildSpawnProcess test and add comments.
Zac Medico [Tue, 17 Aug 2010 14:18:30 +0000 (07:18 -0700)]
Make EbuildBinpkg inherit from EbuildProcess since the 'package'
phase is already a member of actionmap.
Zac Medico [Tue, 17 Aug 2010 14:03:23 +0000 (07:03 -0700)]
Pass actionmap keyword argument as keyword, rather than positional.
Zac Medico [Tue, 17 Aug 2010 13:54:42 +0000 (06:54 -0700)]
Write compiled bytecodes to /dev/null, rather than write and unlink
them.
Zac Medico [Tue, 17 Aug 2010 13:43:31 +0000 (06:43 -0700)]
Fix _spawn_phase() to pass actionmap to EbuildPhase.
Zac Medico [Tue, 17 Aug 2010 13:39:17 +0000 (06:39 -0700)]
Unify ebuild spawing some more. All proper ebuild phases which execute
ebuild.sh are spawned via _doebuild_spawn() now. No exceptions.
Zac Medico [Tue, 17 Aug 2010 08:22:58 +0000 (01:22 -0700)]
Fix _spawn_phase() to spawn phases without sandbox when necessary.
Zac Medico [Tue, 17 Aug 2010 07:58:44 +0000 (00:58 -0700)]
Source isolated-functions.sh for helpers_die function.
Zac Medico [Tue, 17 Aug 2010 07:48:23 +0000 (00:48 -0700)]
Make doebuild() use EbuildPhase to execute all phase (unless returnpid
is True, which is only for the "depend" phase now).
Zac Medico [Tue, 17 Aug 2010 07:23:36 +0000 (00:23 -0700)]
Make sure doebuild() doesn't erroneously unlink a logfile when returnpid
is True.
Zac Medico [Tue, 17 Aug 2010 05:38:49 +0000 (22:38 -0700)]
Make EbuildBuild check the manifest before beginning, since with
--keep-going mode it's currently possible to get this far with a
broken manifest.
Zac Medico [Tue, 17 Aug 2010 04:52:31 +0000 (21:52 -0700)]
For ebuilds from $ROOT/var/db/pkg, don't give /var/db/pkg with the
"Appending /var/db/pkg to PORTDIR_OVERLAY..." treatment.
Zac Medico [Tue, 17 Aug 2010 04:40:25 +0000 (21:40 -0700)]
Use EbuildPhase to eliminate duplicate phase conditionals from doebuild().
Zac Medico [Tue, 17 Aug 2010 04:30:41 +0000 (21:30 -0700)]
Use EbuildPhase to execute preinst/postinst and eliminate duplicate code.
Zac Medico [Tue, 17 Aug 2010 04:19:26 +0000 (21:19 -0700)]
Use MiscFunctionsProcess to eliminate the _spawn_misc_sh() function.
Zac Medico [Tue, 17 Aug 2010 03:59:24 +0000 (20:59 -0700)]
Make spawnebuild() use EbuildPhase to eliminate duplicate code.
Zac Medico [Tue, 17 Aug 2010 01:42:06 +0000 (18:42 -0700)]
Reuse a single TaskScheduler instance.
Zac Medico [Tue, 17 Aug 2010 01:32:30 +0000 (18:32 -0700)]
Fix broken reference to 'myprovide' variable.
Zac Medico [Tue, 17 Aug 2010 01:29:18 +0000 (18:29 -0700)]
Pass token_class=portage.dep.Atom when parsing PROVIDE.
Zac Medico [Tue, 17 Aug 2010 01:16:56 +0000 (18:16 -0700)]
Add a MiscFunctionsProcess test.
Sebastian Luther [Mon, 16 Aug 2010 19:41:02 +0000 (21:41 +0200)]
Pass token_class parameter if possible to use_reduce
Sebastian Luther [Mon, 16 Aug 2010 13:52:38 +0000 (15:52 +0200)]
portage.dep.use_reduce: Add token_class parameter
All non operator token will be converted to this class
Zac Medico [Tue, 17 Aug 2010 00:34:02 +0000 (17:34 -0700)]
Fix ebuild.sh argument for cleanrm phase.
Zac Medico [Tue, 17 Aug 2010 00:25:33 +0000 (17:25 -0700)]
Move the fakeroot_state attribute back to EbuildSpawnProcess from
AbstractEbuildProcess (only EbuildSpawnProcess uses it).
Arfrever Frehtes Taifersar Arahesis [Mon, 16 Aug 2010 19:22:14 +0000 (21:22 +0200)]
Expand sys.executable earlier, so that change of sys.executable symlink
between starting main Portage process and starting ebuild.sh process
doesn't affect ebuild.sh subprocesses.
Arfrever Frehtes Taifersar Arahesis [Mon, 16 Aug 2010 18:35:03 +0000 (20:35 +0200)]
Fix typos in comments.
Zac Medico [Mon, 16 Aug 2010 16:25:32 +0000 (09:25 -0700)]
Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/portage
Zac Medico [Mon, 16 Aug 2010 16:24:14 +0000 (09:24 -0700)]
Move fakeroot_state attribute from EbuildSpawnProcess to
AbstractEbuildProcess.
Arfrever Frehtes Taifersar Arahesis [Mon, 16 Aug 2010 16:12:29 +0000 (18:12 +0200)]
Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/portage
Arfrever Frehtes Taifersar Arahesis [Mon, 16 Aug 2010 16:11:06 +0000 (18:11 +0200)]
Ensure that PORTAGE_PYTHON isn't a symlink.
Zac Medico [Mon, 16 Aug 2010 16:08:00 +0000 (09:08 -0700)]
Test the EbuildPhase class.
Zac Medico [Mon, 16 Aug 2010 15:55:58 +0000 (08:55 -0700)]
Remove unused attributes from classes.
Zac Medico [Mon, 16 Aug 2010 15:16:08 +0000 (08:16 -0700)]
Split out parts of doebuild() so that EbuildProcess can bypass it
and call the spawn() function directly.
Zac Medico [Mon, 16 Aug 2010 13:50:44 +0000 (06:50 -0700)]
Revert back to using portdbapi.getFetchMap() since the Package class
doesn't cache SRC_URI.
Sebastian Luther [Mon, 16 Aug 2010 13:22:16 +0000 (15:22 +0200)]
portage.dep.use_reduce: More comments and better error messages
Sebastian Luther [Mon, 16 Aug 2010 12:44:51 +0000 (14:44 +0200)]
Pass is_valid_flag to use_reduce if possible
Sebastian Luther [Mon, 16 Aug 2010 12:28:31 +0000 (14:28 +0200)]
portage.dep.use_reduce: Better error messages
Sebastian Luther [Mon, 16 Aug 2010 11:32:28 +0000 (13:32 +0200)]
portage.dep.use_reduce: Better validation of use flags in use conditionals
use_reduce now uses either a regex or, if provided, a is_valid_flag function
to validate use flags
Zac Medico [Mon, 16 Aug 2010 11:57:08 +0000 (04:57 -0700)]
Convert EbuildBinpkg to inherit from MiscFunctionsProcess instead
of EbuildProcess. This bypasses the complex doebuild() function,
and uses the _spawn_actionmap() function that's been split out.
Zac Medico [Mon, 16 Aug 2010 10:47:59 +0000 (03:47 -0700)]
Split the actionmap code out of doebuild() into a _spawn_actionmap()
that EbuildPhase will be able to use.
Zac Medico [Mon, 16 Aug 2010 10:34:12 +0000 (03:34 -0700)]
Handle OSError from os.path.samefile() (breakage from previous commit).
Zac Medico [Mon, 16 Aug 2010 10:02:34 +0000 (03:02 -0700)]
Bug #332967 - In bintree.inject(), add a sanity check to make sure we
don't try to call movefile on a package that's already in the correct
location.
Zac Medico [Mon, 16 Aug 2010 09:52:11 +0000 (02:52 -0700)]
When displaying portage.auxdbkeys, sort and filter unused.