Zac Medico [Wed, 18 May 2011 05:38:07 +0000 (22:38 -0700)]
_find_libs_to_preserve: always return set
Zac Medico [Wed, 18 May 2011 05:27:07 +0000 (22:27 -0700)]
preserve-libs: check for broken linkmap more
Zac Medico [Wed, 18 May 2011 04:37:08 +0000 (21:37 -0700)]
_pkg_visibility_check: if in graph then visible
Zac Medico [Wed, 18 May 2011 04:00:39 +0000 (21:00 -0700)]
_LockProcess.unlock: assert successful returncode
Zac Medico [Wed, 18 May 2011 03:46:36 +0000 (20:46 -0700)]
etc-update: clear term when appropriate
This solves an issue like bug #142508, but involving etc-update instead
of dispatch-conf. This is also relevant to bug #70668, which is the
same issue, though the reporter suggested to use colors to delimit the
output instead of using clear.
Zac Medico [Wed, 18 May 2011 02:15:58 +0000 (19:15 -0700)]
--autounmask-write: use CONFIGROOT more
Zac Medico [Wed, 18 May 2011 01:49:57 +0000 (18:49 -0700)]
Fix a typo in a comment.
Zac Medico [Wed, 18 May 2011 01:43:32 +0000 (18:43 -0700)]
digraph: implement __bool__
Zac Medico [Wed, 18 May 2011 01:31:15 +0000 (18:31 -0700)]
depgraph._resolve: use temp set for autounmask
Zac Medico [Wed, 18 May 2011 00:54:34 +0000 (17:54 -0700)]
display_autounmask: optimize check_if_latest
Zac Medico [Tue, 17 May 2011 22:19:20 +0000 (15:19 -0700)]
test_asynchronous_lock: simulate SIGINT from tty
Zac Medico [Tue, 17 May 2011 21:32:33 +0000 (14:32 -0700)]
AsynchronousTask: tweak poll() logic
Zac Medico [Tue, 17 May 2011 21:25:47 +0000 (14:25 -0700)]
AsynchronousLock: implement _poll() and test
Zac Medico [Tue, 17 May 2011 21:14:20 +0000 (14:14 -0700)]
test_asynchronous_lock: test returncode more
Zac Medico [Tue, 17 May 2011 21:02:12 +0000 (14:02 -0700)]
test_asynchronous_lock: test wait and cancel
Zac Medico [Tue, 17 May 2011 20:56:15 +0000 (13:56 -0700)]
test_asynchronous_lock: test waiting
Zac Medico [Tue, 17 May 2011 20:33:10 +0000 (13:33 -0700)]
test_autounmask: test missing keyword
Zac Medico [Tue, 17 May 2011 19:50:38 +0000 (12:50 -0700)]
Update timestamps in headers of modified files.
Zac Medico [Tue, 17 May 2011 19:43:48 +0000 (12:43 -0700)]
--autounmask-write: don't write hidden files
Zac Medico [Tue, 17 May 2011 07:10:21 +0000 (00:10 -0700)]
--autounmask-write: use CONFIGROOT and EROOT
Zac Medico [Tue, 17 May 2011 06:54:52 +0000 (23:54 -0700)]
--autounmask-write: handle non-existent file
Zac Medico [Tue, 17 May 2011 06:29:21 +0000 (23:29 -0700)]
--autounmask-write: only prompt when necessary
Zac Medico [Tue, 17 May 2011 06:10:38 +0000 (23:10 -0700)]
--autounmask-write: handle config file recursion
Zac Medico [Tue, 17 May 2011 04:30:08 +0000 (21:30 -0700)]
Document that --autounmask is enabled by default.
Sebastian Luther [Mon, 16 May 2011 20:06:40 +0000 (22:06 +0200)]
Enable --autounmask by default
Sebastian Luther [Mon, 16 May 2011 19:21:12 +0000 (21:21 +0200)]
--autounmask-write: respect --ask
Zac Medico [Mon, 16 May 2011 07:21:03 +0000 (00:21 -0700)]
BinpkgFetcher: handle AsynchronousLock failure
Zac Medico [Mon, 16 May 2011 07:10:07 +0000 (00:10 -0700)]
EbuildBuildDir: handle AsynchronousLock failure
Zac Medico [Mon, 16 May 2011 06:54:49 +0000 (23:54 -0700)]
_LockProcess: handle process failure more
Zac Medico [Mon, 16 May 2011 06:17:27 +0000 (23:17 -0700)]
_LockProcess: handle process failure if cancelled
Zac Medico [Mon, 16 May 2011 01:25:59 +0000 (18:25 -0700)]
preserve-libs: lock vardb for removeFromContents
Zac Medico [Sun, 15 May 2011 23:28:32 +0000 (16:28 -0700)]
Revert "counter_tick_core: don't lock if parallel-install"
This reverts commit
405ad9eed65393205ec28af8772f7ea45ce0371e.
The root problem is fixed by commit
8380ec9d7590a47b912e0d1e1db2ebb6049b903b.
Zac Medico [Sun, 15 May 2011 23:17:36 +0000 (16:17 -0700)]
treewalk: unlockdb/lockdb typo triggers EDEADLK
Zac Medico [Sun, 15 May 2011 22:29:15 +0000 (15:29 -0700)]
make.conf.txt: remove because unused/unmaintained
Arfrever Frehtes Taifersar Arahesis [Sun, 15 May 2011 21:24:31 +0000 (23:24 +0200)]
Fix some typos.
Sebastian Luther [Sun, 15 May 2011 19:05:19 +0000 (12:05 -0700)]
--autounmask: Treat missing keywords as masks
Sebastian Luther [Sun, 15 May 2011 19:03:20 +0000 (12:03 -0700)]
--autounmask: Allow package.mask changes
Sebastian Luther [Sun, 15 May 2011 19:01:03 +0000 (12:01 -0700)]
Implement --autounmask-write
Enabling this option together with --autounmask writes proposed
changes to config files, honoring CONFIG_PROTECT.
Zac Medico [Sun, 15 May 2011 09:30:15 +0000 (02:30 -0700)]
counter_tick_core: don't lock if parallel-install
This is the same as commit
461564ae94ff936918eeaa18493bc1da3846796f
but this time with comments that make sense.
Zac Medico [Sun, 15 May 2011 09:02:08 +0000 (02:02 -0700)]
EbuildMerge: inherit from CompositeTask
Zac Medico [Sun, 15 May 2011 08:14:09 +0000 (01:14 -0700)]
EbuildPhase: fix locking for setup phase
Zac Medico [Sun, 15 May 2011 08:03:14 +0000 (01:03 -0700)]
EbuildPhase: AsynchronousLock for ebuild-locks
Zac Medico [Sun, 15 May 2011 05:21:08 +0000 (22:21 -0700)]
Use vardbapi.lock() where applicable.
Zac Medico [Sun, 15 May 2011 04:39:26 +0000 (21:39 -0700)]
movefile: handle EEXIST when os.symlink fails
Zac Medico [Sun, 15 May 2011 04:29:48 +0000 (21:29 -0700)]
Revert "counter_tick_core: don't lock if parallel-install"
This reverts commit
461564ae94ff936918eeaa18493bc1da3846796f.
Disabling the lock here doesn't really make sense, and I'm still
triggering EDEADLK is some other places.
Zac Medico [Sun, 15 May 2011 02:55:24 +0000 (19:55 -0700)]
preserve-libs: use vardbapi _fs_lock/unlock
The preserve-libs code is too dependent on the filesystem state to
allow merging/unmerge/env_update to execute concurrently.
Zac Medico [Sun, 15 May 2011 02:43:12 +0000 (19:43 -0700)]
vardbapi: add reentrant _fs_lock/unlock methods
Zac Medico [Sun, 15 May 2011 01:56:39 +0000 (18:56 -0700)]
_LibGraphNode: re-use the _key attribute
This allows us to avoid repeating any previous stat calls, which helps
to avoid potential race conditions due to inconsistent stat results
when the file system is being modified concurrently.
Zac Medico [Sat, 14 May 2011 23:53:35 +0000 (16:53 -0700)]
counter_tick_core: don't lock if parallel-install
Hopefully this avoids the following exception:
File "/usr/lib/portage/pym/portage/locks.py", line 138, in lockfile
fcntl.lockf(myfd, fcntl.LOCK_EX)
IOError: [Errno 35] Resource deadlock avoided
Arfrever Frehtes Taifersar Arahesis [Sat, 14 May 2011 22:56:35 +0000 (00:56 +0200)]
Fix a typo in a comment.
Zac Medico [Sat, 14 May 2011 22:14:45 +0000 (15:14 -0700)]
find_unused_preserved_libs: fix unmerge handling
Since commit
c64d4abee145d083c70273be8fd23bd56dffe7ec (bug #286714),
preserved libs have not been properly garbage collected when packages
are unmerged without replacement, due to a difference in LinkageMap
state. It should behave correcly now.
Zac Medico [Sat, 14 May 2011 21:41:22 +0000 (14:41 -0700)]
prune_plib_registry: display preserved libs
Since commit
c64d4abee145d083c70273be8fd23bd56dffe7ec, sometimes we
preserve libs for unmerged packages here (bug #286714), so we should
display them like we do in _add_preserve_libs_to_contents().
Zac Medico [Sat, 14 May 2011 21:25:16 +0000 (14:25 -0700)]
treewalk: fix plib_collisions with same cpv
Sebastian Luther [Sat, 14 May 2011 20:44:22 +0000 (22:44 +0200)]
--autounmask: Use >= atoms if possible
If the package is the latest avaiable it now uses >=cat/pkg-ver instead
of =cat/pkg-ver. If the package is not the latest, but the latest in
its slot, >=cat/pkg-ver:slot is used. In all other case =cat/pkg-ver
is used. Rational is that it's more likely that newer versions, added
in the future, will work with the same configuration changes as the
currently latest version than not.
Zac Medico [Sat, 14 May 2011 08:45:06 +0000 (01:45 -0700)]
preserve-libs: preserve during uninstall
This will fix bug #286714. The emerge --depclean-lib-check option will
now be ignored when FEATURES=preserve-libs is enabled, since any
libraries that have consumers will simply be preserved.
Zac Medico [Thu, 12 May 2011 19:04:54 +0000 (12:04 -0700)]
cache.sqlite: handle readonly more
Zac Medico [Thu, 12 May 2011 19:02:27 +0000 (12:02 -0700)]
porttree: use pure volatile cache if necessary
Zac Medico [Thu, 12 May 2011 18:58:27 +0000 (11:58 -0700)]
cache.volatile: discard "perms" param
Zac Medico [Thu, 12 May 2011 18:42:08 +0000 (11:42 -0700)]
cache.sqlite: handle readonly
Zac Medico [Thu, 12 May 2011 17:51:08 +0000 (10:51 -0700)]
expand_new_virt: return early for non-virtual cat
Zac Medico [Thu, 12 May 2011 07:09:19 +0000 (00:09 -0700)]
expand_new_virt: skip match for non-virtual cat
Zac Medico [Thu, 12 May 2011 05:35:40 +0000 (22:35 -0700)]
treewalk: fix inverted counter init logic
Zac Medico [Thu, 12 May 2011 01:14:54 +0000 (18:14 -0700)]
portdbapi: tweak cache permission handling
This is a reponse to the following issue:
http://code.google.com/p/chromium-os/issues/detail?id=15234
Zac Medico [Wed, 11 May 2011 23:50:15 +0000 (16:50 -0700)]
EbuildPhase: extract binpkg env for pkg_pretend
This will fix bug #366939.
Zac Medico [Wed, 11 May 2011 20:24:22 +0000 (13:24 -0700)]
unmerge: use frozenset for syslist
Zac Medico [Wed, 11 May 2011 19:00:27 +0000 (12:00 -0700)]
depgraph: in complete mode respect --with-bdeps
If you want the graph as complete as possible, now you'll have to use
--with-bdeps=y together with --complete-graph.
Zac Medico [Wed, 11 May 2011 04:03:02 +0000 (21:03 -0700)]
dep_check_composite_db: return early from cp_list
Since this implementation is only intended to check for existence of
new-style virtuals, it's a waste of time to return more than one cpv.
Zac Medico [Tue, 10 May 2011 23:54:55 +0000 (16:54 -0700)]
depgraph: traverse ignored DEPEND if "complete"
David James [Tue, 10 May 2011 20:41:06 +0000 (13:41 -0700)]
Strip build-time dependencies when they're ignored and we're not in --rebuild mode.
This should improve depgraph calculation performance.
TEST=Ran test suite.
BUG=chromium-os:15144
Change-Id: I9e06817201d7a17ae9b44b424d01c1a2bd89210a
Zac Medico [Tue, 10 May 2011 19:52:36 +0000 (12:52 -0700)]
MergeProcess: lock vdb earlier when appropriate
Zac Medico [Tue, 10 May 2011 05:11:33 +0000 (22:11 -0700)]
depgraph: don't clear vardbapi cache in _load_vdb
Most of the memory is probably held on the heap by the installed
package instances anyway, and the cache is useful for being inherited
by subprocess in MergeProcess.
Zac Medico [Tue, 10 May 2011 05:05:40 +0000 (22:05 -0700)]
get_counter_tick_core: use cpv_all
It's more efficient to use cpv_all since cp_all calls cpv_all anyway,
and calls to cp_list induce additional stat calls.
David James [Tue, 10 May 2011 04:11:47 +0000 (21:11 -0700)]
Cache counter values, avoiding I/O when it doesn't change.
This improves merge times by up to 25%, since looping over the vardb for
each package install is slow.
TEST=Emerge a bunch of packages, notice 25% speed improvement.
BUG=chromium-os:15112
Change-Id: I51dd617219cd1820ceeb702291bd790990995be4
Zac Medico [Tue, 10 May 2011 01:03:27 +0000 (18:03 -0700)]
dep_check_composite_db: remove unused _dep_expand
This code has been unused since dep_check started passing
token_class=Atom to use_reduce in commit
c9f7930883d62fc26af72bff0c4623db0bbc8221. Since then, any atoms
without categories are dropped by dep_check because it returns
early after catching an InvalidDependString exception.
Zac Medico [Mon, 9 May 2011 22:34:06 +0000 (15:34 -0700)]
dep_check_composite_db: implement cp_list
This is used by dep_check since commit
6f9ee9c508c1506cdf8eb0dc46796dbe30f268db.
Zac Medico [Mon, 9 May 2011 20:41:56 +0000 (13:41 -0700)]
config: call _populate_treeVirtuals directly
Zac Medico [Mon, 9 May 2011 20:36:22 +0000 (13:36 -0700)]
cpv_expand: avoid old-style virtuals more
Zac Medico [Mon, 9 May 2011 20:30:04 +0000 (13:30 -0700)]
dep_check: avoid old-style virtuals code
Zac Medico [Mon, 9 May 2011 06:27:39 +0000 (23:27 -0700)]
display_news_notification: don't populate virts
This typically isn't useful anymore, since Gentoo has stopped using
old-style virtuals.
Zac Medico [Mon, 9 May 2011 06:23:07 +0000 (23:23 -0700)]
cpv_expand: populate old-style virts on demand
If old-style virtuals code is triggered here and we are given a
vartree, use it to avoid creating a temporary instance.
Zac Medico [Mon, 9 May 2011 06:08:43 +0000 (23:08 -0700)]
unmerge: skip getvirtuals() if cat is not virtual
This allows us to avoid triggering the old-style virtual code which
scans /var/db/pkg/*/*/PROVIDE.
Zac Medico [Mon, 9 May 2011 05:13:52 +0000 (22:13 -0700)]
unmerge: use expand_new_virt for sys pkg warnings
Zac Medico [Mon, 9 May 2011 04:51:47 +0000 (21:51 -0700)]
vardbapi: disable subprocess vdb cache updates
Since commit
7535cabdf2fab76fc55df83643157613dfd66be9,
vardbapi.flush_cache() is often called within subprocesses spawned
from MergeProcess. The _aux_cache_threshold doesn't work as designed
if the cache is flushed from a subprocess like this, can lead to the
vdb cache being flushed for every single merge. This is a waste of
disk IO, so disable vdb cache updates in subprocesses.
Zac Medico [Sun, 8 May 2011 21:36:48 +0000 (14:36 -0700)]
LinkageMapELF: remove unused imports
Zac Medico [Sun, 8 May 2011 21:31:11 +0000 (14:31 -0700)]
PreservedLibsRegistry: normalize counter as str
Zac Medico [Sun, 8 May 2011 20:46:40 +0000 (13:46 -0700)]
Add back cpv_exists check from previous commit.
Zac Medico [Sun, 8 May 2011 20:19:47 +0000 (13:19 -0700)]
Remove obsolete others_in_slot plibs code.
This code dates back to commit
79a2ade5a6cb5a6c2d7ace838a39a634265c5522
and the preserve-libs logic was different back then. At that time, the
dblink._preserve_libs() method would earlier register preserved libs
for the new package currently being merged, while the vardb entry was
still a -MERGING- node. Current code does not register preserve_paths
until later, so this others_in_slot code is obsolete.
Zac Medico [Sun, 8 May 2011 19:31:07 +0000 (12:31 -0700)]
treewalk: always initialize "needed"
Zac Medico [Sun, 8 May 2011 19:05:49 +0000 (12:05 -0700)]
merge_wait_queue: use deque.clear()
Zac Medico [Sun, 8 May 2011 18:24:40 +0000 (11:24 -0700)]
resume_depgraph: don't call break_refs in loop
The break_refs call was unnecessary and it broke the state of the
frozen_config instance, causing the following error:
File "pym/_emerge/depgraph.py", line 1290, in
_wrapped_add_pkg_dep_string
inst_pkgs = vardb.match_pkgs(atom)
AttributeError: 'vardbapi' object has no attribute 'match_pkgs'
David James [Sun, 8 May 2011 07:26:42 +0000 (00:26 -0700)]
Fix typos in unmerge function.
BUG=none
TEST=Try unmerging some packages.
Change-Id: Ib643ec95b8da14b49a6b519e445fe57f8995c52c
Zac Medico [Sun, 8 May 2011 07:09:37 +0000 (00:09 -0700)]
linkmap: use exclude_pkgs for the registry too
David James [Sun, 8 May 2011 06:08:01 +0000 (23:08 -0700)]
Use new vardbapi lock function in FakeVartree.
BUG=none
TEST=Merged some packages with new code. Ran test suite.
Change-Id: Ibb9380122631bf6c79e39691233cfd641931b75a
Zac Medico [Sun, 8 May 2011 05:58:33 +0000 (22:58 -0700)]
Be careful with system pkgs + parallel-install.
This should prevent FEATURES=parallel-install from interfering with
the fixes from bug #256616 and bug #259954.
Zac Medico [Sun, 8 May 2011 05:02:38 +0000 (22:02 -0700)]
linkmap: check for access before locking vardbapi
Zac Medico [Sun, 8 May 2011 04:46:08 +0000 (21:46 -0700)]
Use EROOT with VDB_PATH in recent changes.
Zac Medico [Sun, 8 May 2011 04:16:58 +0000 (21:16 -0700)]
Scheduler: add queue for ebuild-locks
Use a separate queue for ebuild-locks when the merge
queue allows more than 1 job (due to parallel-install),
since the portage.locks module does not behave as desired
if we try to lock the same file multiple times
concurrently from the same process.
Zac Medico [Sun, 8 May 2011 03:29:27 +0000 (20:29 -0700)]
Add FEATURES=parallel-install for finer locks.
Zac Medico [Sun, 8 May 2011 03:05:21 +0000 (20:05 -0700)]
vardbapi: acquire lock during counter_tick_core
Zac Medico [Sun, 8 May 2011 02:57:29 +0000 (19:57 -0700)]
Add vardbapi reentrant lock/unlock methods.