portage.git
13 years agopkg_use_enabled: return early for built pkgs
Zac Medico [Mon, 13 Jun 2011 21:50:04 +0000 (14:50 -0700)]
pkg_use_enabled: return early for built pkgs

Built/installed packages have frozen USE settings, so there's no sense
in considering them for autounmask USE config changes. They'll simply
be rejected by select_package, and an unbuilt ebuild will be selected
instead. This will fix bug 371423 by avoiding unnecessary use_reduce
calls on the deps of installed packages.

13 years agodigestgen: spawn_nofetch (fix previous commit)
Zac Medico [Mon, 13 Jun 2011 15:25:58 +0000 (08:25 -0700)]
digestgen: spawn_nofetch (fix previous commit)

This call was erroneously removed in the previous commit. We have to
call spawn_nofetch since the fetch() function no longer calls it
automatically.

13 years agodigestgen: always allow fetch from mirror://
Zac Medico [Mon, 13 Jun 2011 13:40:39 +0000 (06:40 -0700)]
digestgen: always allow fetch from mirror://

This fixes repoman and ebuild(1) to fetch from mirror:// URIs even
though RESTRICT=fetch is set (this behavior already works for emerge
since it does not call fetch() via digestgen).

13 years agoScheduler: make --fetchonly skip pkg_pretend
Zac Medico [Mon, 13 Jun 2011 13:01:26 +0000 (06:01 -0700)]
Scheduler: make --fetchonly skip pkg_pretend

13 years agotest_merge_order: test smallest runtime cycle
Zac Medico [Sun, 12 Jun 2011 22:12:26 +0000 (15:12 -0700)]
test_merge_order: test smallest runtime cycle

In the case of multiple runtime cycles, where some cycles
may depend on smaller independent cycles, it's optimal
to merge smaller independent cycles before other cycles
that depend on them. Therefore, we search for the
smallest cycle in order to try and identify and prefer
these smaller independent cycles.

13 years agoFix a typo in a comment. v2.2.0_alpha40
Arfrever Frehtes Taifersar Arahesis [Sat, 11 Jun 2011 19:12:09 +0000 (21:12 +0200)]
Fix a typo in a comment.

13 years agoserialize_tasks: debug output for runtime cycles
Zac Medico [Sat, 11 Jun 2011 16:26:47 +0000 (09:26 -0700)]
serialize_tasks: debug output for runtime cycles

13 years agoserialize_tasks: asap ignore medium_soft earlier
Zac Medico [Sat, 11 Jun 2011 15:51:24 +0000 (08:51 -0700)]
serialize_tasks: asap ignore medium_soft earlier

This allows us to avoid the less efficient runtime cycle pathway for
cases in which an asap node is a leaf if medium_soft deps are ignored.
Ths should increase efficiency without changing behavior.

13 years agoserialize_tasks: minimize runtime cycles more
Zac Medico [Sat, 11 Jun 2011 09:05:51 +0000 (02:05 -0700)]
serialize_tasks: minimize runtime cycles more

13 years agoserialize_tasks: minimize nodes in runtime cycles
Zac Medico [Sat, 11 Jun 2011 06:25:46 +0000 (23:25 -0700)]
serialize_tasks: minimize nodes in runtime cycles

When gathering the nodes belonging to a runtime cycle, we want to
minimize the number of nodes gathered, since this tends to produce
a more optimal merge order. Ignoring all medium_soft deps serves
this purpose.

13 years agodepgraph._serialize_tasks: revert formatting diff
Zac Medico [Sat, 11 Jun 2011 05:21:19 +0000 (22:21 -0700)]
depgraph._serialize_tasks: revert formatting diff

13 years agodepgraph._serialize_tasks: move libperl/perl code
Zac Medico [Sat, 11 Jun 2011 03:58:38 +0000 (20:58 -0700)]
depgraph._serialize_tasks: move libperl/perl code

This ensures that all asap_nodes are explored before setting
prefer_asap to False.

13 years agobintree: verify that default REPO is legit
Zac Medico [Sat, 11 Jun 2011 03:38:02 +0000 (20:38 -0700)]
bintree: verify that default REPO is legit

We need to check the RepoConfig.missing_repo_name attribute to make
sure the repo_name is really defined.

13 years agodepgraph._serialize_tasks: tweak last commit more
Zac Medico [Sat, 11 Jun 2011 02:58:33 +0000 (19:58 -0700)]
depgraph._serialize_tasks: tweak last commit more

13 years agodepgraph._serialize_tasks: tweak last commit
Zac Medico [Sat, 11 Jun 2011 02:45:08 +0000 (19:45 -0700)]
depgraph._serialize_tasks: tweak last commit

This code is only intended when more than one node is selected.

13 years agotest_fakedbapi: define PORTDIR, test missing IUSE
Zac Medico [Sat, 11 Jun 2011 02:31:22 +0000 (19:31 -0700)]
test_fakedbapi: define PORTDIR, test missing IUSE

13 years agotest_fakedbapi: use tempdir for config paths
Zac Medico [Sat, 11 Jun 2011 02:17:10 +0000 (19:17 -0700)]
test_fakedbapi: use tempdir for config paths

13 years agoAdd tests for fakedbapi.
Zac Medico [Sat, 11 Jun 2011 02:08:46 +0000 (19:08 -0700)]
Add tests for fakedbapi.

13 years agoslot_collision_notice: don't omit any use dep
Zac Medico [Sat, 11 Jun 2011 01:30:37 +0000 (18:30 -0700)]
slot_collision_notice: don't omit any use dep

When USE flags are removed, it can be essential to see all broken
reverse dependencies here, so don't omit any. If the list is long,
people can simply use a pager.

13 years agoshow_unsatisfied_blockers: don't omit any pkgs
Zac Medico [Sat, 11 Jun 2011 00:42:18 +0000 (17:42 -0700)]
show_unsatisfied_blockers: don't omit any pkgs

It can be essential to see all the packages here, so don't omit any.
If the list is long, people can simply use a pager.

13 years agoFix a typo.
Arfrever Frehtes Taifersar Arahesis [Sat, 11 Jun 2011 00:02:27 +0000 (02:02 +0200)]
Fix a typo.

13 years agodepgraph._serialize_tasks: fix libperl/perl order
Zac Medico [Fri, 10 Jun 2011 23:24:54 +0000 (16:24 -0700)]
depgraph._serialize_tasks: fix libperl/perl order

In some cases, the asap_nodes code caused selection of a large runtime
cycle that was obviously sub-optimal. Now such cases are detected and
avoided.

13 years agofakedbapi: add myrepo args for portdbapi compat
Zac Medico [Fri, 10 Jun 2011 17:19:36 +0000 (10:19 -0700)]
fakedbapi: add myrepo args for portdbapi compat

13 years agobintree: handle pkgindex CHOST header like REPO
Zac Medico [Fri, 10 Jun 2011 12:21:06 +0000 (05:21 -0700)]
bintree: handle pkgindex CHOST header like REPO

This allows an existing CHOST header entry to properly override our
default.

13 years agobintree: always populate pkgindex REPO header
Zac Medico [Fri, 10 Jun 2011 12:04:17 +0000 (05:04 -0700)]
bintree: always populate pkgindex REPO header

The previous code would only populate it when there was no existing
index file. Now, the default will be populated even if the file exists
already. If an existing pkgindex header already defines these keys,
then they will appropriately override our defaults.

13 years agoFix some typoes in docs and comments. v2.2.0_alpha39
Zac Medico [Fri, 10 Jun 2011 01:10:51 +0000 (18:10 -0700)]
Fix some typoes in docs and comments.

13 years agoportage.5: doc repo and wildcard atom extensions
Zac Medico [Thu, 9 Jun 2011 22:08:29 +0000 (15:08 -0700)]
portage.5: doc repo and wildcard atom extensions

13 years agouseflag/dep_re: less strict if eapi None
Zac Medico [Thu, 9 Jun 2011 18:48:19 +0000 (11:48 -0700)]
useflag/dep_re: less strict if eapi None

When eapi is None then validation is not as strict, since we want the
same to work for multiple EAPIs that may have slightly different rules.

13 years agoSubProcess: fix status for _set_returncode caller
Zac Medico [Thu, 9 Jun 2011 18:19:38 +0000 (11:19 -0700)]
SubProcess: fix status for _set_returncode caller

These callers don't intend to make WIFSIGNALED return True, so they
need to shift their codes 8 bits to the left. This ensures that
commit 88f5bf84e2fd23125910b2ecaffc035971445696 behaves as intended.

13 years agoAbstractEbuildProcess: handle kill by signal
Zac Medico [Thu, 9 Jun 2011 16:19:33 +0000 (09:19 -0700)]
AbstractEbuildProcess: handle kill by signal

This will fix bug #368817.

13 years agoSubProcess: make returncode like Popen
Zac Medico [Thu, 9 Jun 2011 16:07:54 +0000 (09:07 -0700)]
SubProcess: make returncode like Popen

13 years agolockfile: use hasattr() instead of dir()
Zac Medico [Thu, 9 Jun 2011 15:43:40 +0000 (08:43 -0700)]
lockfile: use hasattr() instead of dir()

13 years agoebuild.sh: fix libdir for ccache/distcc
Zac Medico [Thu, 9 Jun 2011 15:11:08 +0000 (08:11 -0700)]
ebuild.sh: fix libdir for ccache/distcc

This will fix bug #355283.

13 years agoebuild.sh: don't hardcode distcc pump path
Jeremy Murphy [Thu, 9 Jun 2011 14:34:35 +0000 (07:34 -0700)]
ebuild.sh: don't hardcode distcc pump path

13 years agotest_use_reduce: test empty parens (bug 370565)
Zac Medico [Thu, 9 Jun 2011 14:28:14 +0000 (07:28 -0700)]
test_use_reduce: test empty parens (bug 370565)

13 years agouse_reduce: disallow empty parens
Arfrever Frehtes Taifersar Arahesis [Thu, 9 Jun 2011 14:23:28 +0000 (07:23 -0700)]
use_reduce: disallow empty parens

This will fix bug #370565.

13 years agogetmaskingstatus: fix keywords logic
Zac Medico [Thu, 9 Jun 2011 13:58:37 +0000 (06:58 -0700)]
getmaskingstatus: fix keywords logic

This will fix bug #370477.

13 years agogetmaskingreason: EAPI metadata safety
Zac Medico [Thu, 9 Jun 2011 13:13:32 +0000 (06:13 -0700)]
getmaskingreason: EAPI metadata safety

Return early since otherwise we might produce invalid results given
that the EAPI is not supported.

13 years agoshow_masked_packages: EAPI metadata safety
Zac Medico [Thu, 9 Jun 2011 13:03:30 +0000 (06:03 -0700)]
show_masked_packages: EAPI metadata safety

When masked by EAPI, metadata is mostly useless since it doesn't
contain essential things like SLOT.

13 years agoFix a typo and update a comment.
Arfrever Frehtes Taifersar Arahesis [Thu, 9 Jun 2011 13:00:55 +0000 (15:00 +0200)]
Fix a typo and update a comment.

13 years ago_show_unsatisfied_dep: fix logic for EAPI mask
Zac Medico [Thu, 9 Jun 2011 12:56:42 +0000 (05:56 -0700)]
_show_unsatisfied_dep: fix logic for EAPI mask

This will fix bug #370465.

13 years agoSpawnTestCase: check returncode
Zac Medico [Thu, 9 Jun 2011 10:59:08 +0000 (03:59 -0700)]
SpawnTestCase: check returncode

13 years agolocks: use a private constant for fcntl.lockf
Zac Medico [Thu, 9 Jun 2011 10:39:37 +0000 (03:39 -0700)]
locks: use a private constant for fcntl.lockf

13 years agoTest noblocking locks.
Zac Medico [Thu, 9 Jun 2011 00:32:56 +0000 (17:32 -0700)]
Test noblocking locks.

13 years agounmerge: show virtual in system unmerge warning
Zac Medico [Wed, 8 Jun 2011 20:24:26 +0000 (13:24 -0700)]
unmerge: show virtual in system unmerge warning

This is intended to clarify the messages shown in bug #370295, so that
it's obvious when a package is a member of the system set due to it
being a virtual provider.

13 years agoAtom: avoid TypeError with PyPy
Zac Medico [Wed, 8 Jun 2011 19:03:25 +0000 (12:03 -0700)]
Atom: avoid TypeError with PyPy

Our test cases pass in raw bytes here, which causes _atom_base.__init__
to raise TypeError with PyPy.

13 years agoautounmask-write: prefer package.accept_keywords
Zac Medico [Wed, 8 Jun 2011 17:30:43 +0000 (10:30 -0700)]
autounmask-write: prefer package.accept_keywords

13 years agoextract_affecting_use: _get_useflag_re(eapi)
Zac Medico [Wed, 8 Jun 2011 17:24:23 +0000 (10:24 -0700)]
extract_affecting_use: _get_useflag_re(eapi)

This is needed for EAPI="4-python" added in commit
586760f37fb9784327d8447182d49810662f4427.

13 years agoautounmask-write: support package.accept_keywords
Zac Medico [Wed, 8 Jun 2011 17:05:20 +0000 (10:05 -0700)]
autounmask-write: support package.accept_keywords

13 years agoAdd initial support for EAPI="4-python".
Arfrever Frehtes Taifersar Arahesis [Wed, 8 Jun 2011 16:10:23 +0000 (18:10 +0200)]
Add initial support for EAPI="4-python".

13 years agoFix some typos.
Arfrever Frehtes Taifersar Arahesis [Mon, 6 Jun 2011 16:00:40 +0000 (18:00 +0200)]
Fix some typos.

13 years agobintree: populate REPO header for empty pkgindex v2.2.0_alpha38
Zac Medico [Mon, 6 Jun 2011 11:51:54 +0000 (04:51 -0700)]
bintree: populate REPO header for empty pkgindex

13 years agogetmaskingreason: assume myrepo arg is valid
Zac Medico [Mon, 6 Jun 2011 10:29:48 +0000 (03:29 -0700)]
getmaskingreason: assume myrepo arg is valid

13 years agoconfig: add missing Package import
Zac Medico [Mon, 6 Jun 2011 10:09:51 +0000 (03:09 -0700)]
config: add missing Package import

13 years agoUse Package.UNKNOWN_REPO where appropriate.
Zac Medico [Mon, 6 Jun 2011 10:03:58 +0000 (03:03 -0700)]
Use Package.UNKNOWN_REPO where appropriate.

13 years agogetmaskingreason: add myrepo argument
Zac Medico [Mon, 6 Jun 2011 09:11:31 +0000 (02:11 -0700)]
getmaskingreason: add myrepo argument

13 years agoportageq: support --version
Zac Medico [Mon, 6 Jun 2011 02:52:42 +0000 (19:52 -0700)]
portageq: support --version

13 years agoScheduler: init _fetch_log in constructor
Zac Medico [Mon, 6 Jun 2011 02:24:29 +0000 (19:24 -0700)]
Scheduler: init _fetch_log in constructor

This ensures that we account for EMERGE_LOG_DIR.

13 years agoInternalPackageSet: default allow_repo=True
Zac Medico [Mon, 6 Jun 2011 02:01:02 +0000 (19:01 -0700)]
InternalPackageSet: default allow_repo=True

Repo atoms are allowed more often than not, so it makes sense for this
class to allow them by default. The Atom constructor and isvalidatom()
functions default to allow_repo=False, which is sufficient to ensure
that repo atoms are prohibited when necessary.

13 years agocreate_world_atom: fix slot/repo atom logic
Zac Medico [Sun, 5 Jun 2011 16:31:33 +0000 (09:31 -0700)]
create_world_atom: fix slot/repo atom logic

13 years agoEnable atom::repo in the @selected package set.
Zac Medico [Sun, 5 Jun 2011 16:13:35 +0000 (09:13 -0700)]
Enable atom::repo in the @selected package set.

13 years agoMergeListItem: fix "unknown repo" display
Zac Medico [Sun, 5 Jun 2011 15:12:18 +0000 (08:12 -0700)]
MergeListItem: fix "unknown repo" display

The Package class uses an UNKNOWN_REPO constant so that MergeListItem
can distinguish this case.

13 years agomatch-all-cpv-only: share match-all cache when ok
Zac Medico [Sun, 5 Jun 2011 09:15:54 +0000 (02:15 -0700)]
match-all-cpv-only: share match-all cache when ok

13 years agoportdbapi.xmatch: remove redundant myval check
Zac Medico [Sun, 5 Jun 2011 08:59:49 +0000 (01:59 -0700)]
portdbapi.xmatch: remove redundant myval check

13 years agoportdbapi.xmatch: always pass mytree to cp_list
Zac Medico [Sun, 5 Jun 2011 08:55:27 +0000 (01:55 -0700)]
portdbapi.xmatch: always pass mytree to cp_list

13 years agodbapi._iter_match: remove redundant myrepo args
Zac Medico [Sun, 5 Jun 2011 08:14:07 +0000 (01:14 -0700)]
dbapi._iter_match: remove redundant myrepo args

The myrepo arguments are redundant since the Atom.repo attribute
carries the same information.

13 years agodep_expand: fix orig_dep for previous commit
Zac Medico [Sun, 5 Jun 2011 07:23:33 +0000 (00:23 -0700)]
dep_expand: fix orig_dep for previous commit

13 years agodep_expand: optimize away cpv_expand if possible
Zac Medico [Sun, 5 Jun 2011 07:10:17 +0000 (00:10 -0700)]
dep_expand: optimize away cpv_expand if possible

13 years agoUniformly check EAPI when avoiding setcpv calls.
Zac Medico [Sun, 5 Jun 2011 00:08:08 +0000 (17:08 -0700)]
Uniformly check EAPI when avoiding setcpv calls.

13 years ago--ask: show group warning before pretend prompt
Zac Medico [Sat, 4 Jun 2011 13:18:34 +0000 (06:18 -0700)]
--ask: show group warning before pretend prompt

13 years agoautounmask: reference EMERGE_DEFAULT_OPTS in docs
Zac Medico [Sat, 4 Jun 2011 13:01:26 +0000 (06:01 -0700)]
autounmask: reference EMERGE_DEFAULT_OPTS in docs

13 years agoBinpkg: cleanup PORTAGE_BINPKG_FILE code
Zac Medico [Sat, 4 Jun 2011 03:48:55 +0000 (20:48 -0700)]
Binpkg: cleanup PORTAGE_BINPKG_FILE code

13 years agoFix a typo in a comment.
Zac Medico [Sat, 4 Jun 2011 03:08:35 +0000 (20:08 -0700)]
Fix a typo in a comment.

13 years agoautounmask: include comments from package.mask
Zac Medico [Sat, 4 Jun 2011 02:37:45 +0000 (19:37 -0700)]
autounmask: include comments from package.mask

This will fix bug #369985.

13 years agoemergelog: tweak _disabled comment
Zac Medico [Sat, 4 Jun 2011 02:31:20 +0000 (19:31 -0700)]
emergelog: tweak _disabled comment

13 years agoemergelog: only enable when called by emerge
Zac Medico [Sat, 4 Jun 2011 02:11:09 +0000 (19:11 -0700)]
emergelog: only enable when called by emerge

We disable emergelog by default, since it's called from dblink.merge()
and we don't want that to trigger log writes unless it's really called
via emerge.

13 years agoRevert "dblink.merge: remove autoclean emergelog calls"
Zac Medico [Sat, 4 Jun 2011 01:49:02 +0000 (18:49 -0700)]
Revert "dblink.merge: remove autoclean emergelog calls"

This reverts commit 352280549c9b72e7b916803dc6b03b959d0817e3.
I'm planning to fix this so the emergelog calls are only enabled when
emerge is the caller.

13 years agoportdbapi: cleanup when base module is reloaded
Zac Medico [Sat, 4 Jun 2011 01:38:40 +0000 (18:38 -0700)]
portdbapi: cleanup when base module is reloaded

This prevents memory leaks via portdbapi.portdbapi_instances when the
module is reloaded. Also, there's no need for ebuild(1) to call
close_portdbapi_caches() since it's now handled automatically during
the reload.

13 years agoUpdate timestamps in headers of modified files.
Zac Medico [Sat, 4 Jun 2011 00:10:41 +0000 (17:10 -0700)]
Update timestamps in headers of modified files.

13 years agoMove pickle import out of base portage module.
Zac Medico [Sat, 4 Jun 2011 00:01:13 +0000 (17:01 -0700)]
Move pickle import out of base portage module.

13 years ago--ask: prompt for --pretend mode when necessary
Zac Medico [Fri, 3 Jun 2011 23:03:40 +0000 (16:03 -0700)]
--ask: prompt for --pretend mode when necessary

13 years ago--autounmask: show note suggesting how to disable
Zac Medico [Fri, 3 Jun 2011 22:27:24 +0000 (15:27 -0700)]
--autounmask: show note suggesting how to disable

Now that --autounmask is enabled by default, people are dealing with
local masks that trigger unsatisfied dependencies often complain about
--autounmask behavior being inappropriate for their situation.
Therefore, show a helpful note when the autounmask code is triggered
and --quiet is not enabled:

  NOTE: This --autounmask behavior can be disabled by setting
        EMERGE_DEFAULT_OPTS="--autounmask=n" in make.conf.

13 years agomake_http_request: fix request arguments
Zac Medico [Fri, 3 Jun 2011 21:47:55 +0000 (14:47 -0700)]
make_http_request: fix request arguments

This will fix "TypeError: must be string or buffer, not dict" with
python 2.7, as reported in bug #369913.

13 years agodblink.merge: remove autoclean emergelog calls
Zac Medico [Fri, 3 Jun 2011 11:20:27 +0000 (04:20 -0700)]
dblink.merge: remove autoclean emergelog calls

This logging is non-essential, and it's somewhat out of place to call
emergelog from dblink.merge since emerge is not the only caller of
this code.

13 years agodblink.merge: remove unused scheduler callbacks
Zac Medico [Fri, 3 Jun 2011 10:16:16 +0000 (03:16 -0700)]
dblink.merge: remove unused scheduler callbacks

13 years agodblink.unmerge: fix some background logic cases
Zac Medico [Fri, 3 Jun 2011 10:13:23 +0000 (03:13 -0700)]
dblink.unmerge: fix some background logic cases

13 years agoautounmask-write: mention --ask in docs
Zac Medico [Fri, 3 Jun 2011 05:40:39 +0000 (22:40 -0700)]
autounmask-write: mention --ask in docs

13 years agoetc-update: disable clear_term by default
Zac Medico [Fri, 3 Jun 2011 05:24:10 +0000 (22:24 -0700)]
etc-update: disable clear_term by default

13 years agoautounmask-write: force configpro if non-existent
Zac Medico [Fri, 3 Jun 2011 05:20:51 +0000 (22:20 -0700)]
autounmask-write: force configpro if non-existent

We want to force new_protect_filename to ensure that the user will see
all our changes via etc-update, even if file_to_write_to doesn't exist
yet.

13 years agoadd_pkg_dep_string: fix reversed inst_pkgs order
Zac Medico [Fri, 3 Jun 2011 03:47:09 +0000 (20:47 -0700)]
add_pkg_dep_string: fix reversed inst_pkgs order

This code was intended to iterate over packages in descending order,
but match_pkgs() returns them in ascending order, so we need to
reverse it.

13 years agoadd_pkg_dep_string: remove unused root_slot var
Zac Medico [Fri, 3 Jun 2011 03:31:02 +0000 (20:31 -0700)]
add_pkg_dep_string: remove unused root_slot var

13 years agoUse bool(digraph) instead of empty()/is_empty().
Zac Medico [Fri, 3 Jun 2011 03:09:42 +0000 (20:09 -0700)]
Use bool(digraph) instead of empty()/is_empty().

13 years agodblink.unmerge: init log_path earlier, don't pop
Zac Medico [Fri, 3 Jun 2011 02:35:05 +0000 (19:35 -0700)]
dblink.unmerge: init log_path earlier, don't pop

There's no need to pop PORTAGE_LOG_FILE here, since
PORTAGE_BACKGROUND=subprocess disables logging when necessary.

13 years agorepository/config: PORTDIR/overlay priority tweak
Zac Medico [Fri, 3 Jun 2011 00:36:33 +0000 (17:36 -0700)]
repository/config: PORTDIR/overlay priority tweak

This ensures compatibility with previous portage versions for cases in
which the user has added PORTDIR to PORTDIR_OVERLAY as a means to modify its
priority relative to overlays when selecting ebuilds.

13 years agoNEWS: FEATURES=parallel-install and ebuild-locks
Zac Medico [Thu, 2 Jun 2011 21:55:14 +0000 (14:55 -0700)]
NEWS: FEATURES=parallel-install and ebuild-locks

13 years agoNEW/RELEASE-NOTES: add items for portage-2.1.10
Zac Medico [Thu, 2 Jun 2011 21:43:56 +0000 (14:43 -0700)]
NEW/RELEASE-NOTES: add items for portage-2.1.10

13 years agoportageq: exclude expand_new_virt from commands
Zac Medico [Thu, 2 Jun 2011 21:02:46 +0000 (14:02 -0700)]
portageq: exclude expand_new_virt from commands

This is necessary since portage probes functions in globals() and
treats functions it finds as commands. Also, use lazy import to
minimize global scope imports.

13 years agoportageq: add new expand_virtual function
Zac Medico [Thu, 2 Jun 2011 12:50:54 +0000 (05:50 -0700)]
portageq: add new expand_virtual function

Something like this was requested in bug #157357. Now that Gentoo has
migrated all virtuals to GLEP 37 new-style virtuals, this kind of
function may be helpful in order to resolve the currently installed
provider of a particular virtual in scripts like bootstrap.sh.

Usage:

portageq expand_virtual <root> <atom>

Returns a \n separated list of atoms expanded from a
given virtual atom, excluding blocker atoms. Satisfied
virtual atoms are not included in the output, since
they are expanded to real atoms which are displayed.
Unsatisfied virtual atoms are displayed without
any expansion. The "match" command can be used to
resolve the returned atoms to specific installed
packages.

Example input/output:

$ portageq expand_virtual / virtual/jre
=dev-java/sun-jdk-1.6.0*

$ portageq expand_virtual / virtual/jre:1.5
dev-java/gcj-jdk

$ portageq expand_virtual / virtual/package-manager
sys-apps/portage

$ portageq expand_virtual / virtual/libc
sys-libs/glibc:2.2

$ portageq expand_virtual / virtual/os-headers
sys-kernel/linux-headers:0

13 years agorepoman: disallow EMERGE_FROM in EAPI 4
Zac Medico [Tue, 31 May 2011 22:22:02 +0000 (15:22 -0700)]
repoman: disallow EMERGE_FROM in EAPI 4

We already have the Eapi4GoneVars check for AA and KV which were
removed in EAPI 4, so we can re-use it to disallow EMERGE_FROM.
This will fix bug #368865.

13 years agoetc-update: add clear_term config for bug #142508
Zac Medico [Tue, 31 May 2011 21:48:55 +0000 (14:48 -0700)]
etc-update: add clear_term config for bug #142508