summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi/vartree.py
Commit message (Collapse)AuthorAgeFilesLines
* unmerge: fix lock/UnsupportedAPIException logicv2.1.9.45Zac Medico2011-03-271-1/+1
|
* UnsupportedAPIException: handle unicode in EAPIZac Medico2011-03-271-1/+1
| | | | | Normally EAPI doesn't contain unicode, but as in bug #359675, it can contain practically anything if files in /var/db/pkg are corrupt.
* iter_owners: try the hashed approach in any caseZac Medico2011-03-181-8/+0
| | | | | | Previously, the slow approach was used whenever more than 10 files were given as input. However, large numbers of files don't necessarily mean the hashed approach is a bad choice, so try it in any case.
* Make all temp dirs under $PORTAGE_TMPDIR/portage.Zac Medico2011-03-141-9/+9
| | | | | | | | | | | Before, some temporary directories would be created directly in $PORTAGE_TMPDIR. Now, all are subdirectories of $PORTAGE_TMPDIR/portage since it's common for people to assume that this is the case anyway. With the default PORTAGE_TMPDIR setting of /var/tmp, this allows /var/tmp to be mounted with the "noexec" option, as long as the /var/tmp/portage subdirectory is a separate mount (people have already tended to assume that they can do this, so we're making it a reality in order to avoid any more bug reports). This will fix bug #346899.
* Remove redundant CONTENTS parent dir generation.Zac Medico2011-03-141-28/+1
| | | | | | This code is redunant now, since similar code has been added to dblink.getcontents() in commit e0b4048274b2cfc1617f2eff379cbe8435e13ed4.
* dblink.getcontents(): generate parent directoriesZac Medico2011-03-141-0/+16
| | | | | We can't necessarily assume that they are explicitly listed in CONTENTS, and they are crucial for callers such as dblink.isowner().
* unmerge: log pre/postrm FAILED messagesZac Medico2011-03-011-6/+11
|
* owners_cache: fix EPREFIX miscalculationZac Medico2011-03-011-5/+3
| | | | | This reverts commit 43e0b3ea4289aab9b4258d29d06afac40abd6c01 and renames the root_len variable to eroot_len (for clarity).
* owners_cache: add parent dirs deeper than EPREFIXZac Medico2011-03-011-1/+3
|
* unmerge: implicitly unmerge parent directoriesZac Medico2011-03-011-3/+16
| | | | | We can't necessarily assume that they are explicitly listed in CONTENTS.
* owners_cache: implicitly add parent directoriesZac Medico2011-03-011-1/+18
| | | | | We can't necessarily assume that they are explicitly listed in CONTENTS.
* Recognize git-2.eclass when reinstalling self.Zac Medico2011-02-141-4/+10
|
* Use r'' for regex.Zac Medico2011-01-171-1/+1
|
* Update copyright headers for touched files.Zac Medico2011-01-161-1/+1
|
* CONTENTS: handle malformed sym entriesZac Medico2011-01-161-2/+10
| | | | This will fix bug #351814.
* unmerge: ignore rmdir EPERM from mount pointZac Medico2010-12-271-1/+2
| | | | This will fix bug #349757.
* removeFromContents: don't use EROOTFabian Groffen2010-12-161-1/+1
| | | | | Fix bug #348790, make sure that CONTENTS entries keep their EPREFIX, by using ROOT, instead of EROOT.
* Preserve existing hardlinks during merge.Zac Medico2010-12-081-19/+8
| | | | | | | | | The previous code created hardlinks rather aggressively, which was helpful as a workaround for lack of hardlinks in tarballs created by quickpkg due to bug #185305. Since bug #338509, quickpkg tarballs preserve hardlinks, so there's no need for aggressive hardlink creation. Therefore, simply preserve existing hardlinks during merge, by comparison of st_dev and st_ino from the source files.
* quickpkg: revert hardlink fix from bug #185305Zac Medico2010-12-071-4/+0
| | | | | For some reason, bug #185305 no longer seems to be an issue, and the fix/workaround seems to cause bug 338509.
* vardbapi: unicode safe UnpicklingError messageZac Medico2010-12-031-2/+2
| | | | | Thanks to Fabio Erculiani <lxnay@gentoo.org> for reporting a UnicodeDecodeError here.
* Fix MergeProcess elog handling.Zac Medico2010-11-231-2/+16
|
* Merge package files in a subprocess.Zac Medico2010-11-231-67/+80
| | | | | This allows the Scheduler to run in the main thread while files are moved or copied asynchronously.
* lock-helper.py: use PORTAGE_PYM_PATH for safetyZac Medico2010-11-231-0/+1
|
* AsynchronousLock: use subprocess if no threadsZac Medico2010-11-231-3/+7
|
* Fix _preload_elog_modules() call.Zac Medico2010-10-071-1/+1
|
* Preserve elog message continuity during updates.Zac Medico2010-10-071-1/+2
|
* Add a _preload_elog_modules() function.Zac Medico2010-10-071-2/+2
|
* entries from preserved registry already include EPREFIX, so don't use EROOT ↵Fabian Groffen2010-09-301-1/+1
| | | | on them
* use ROOT iso EROOT with PreservedLibsRegistry, since all entries already ↵Fabian Groffen2010-09-301-1/+1
| | | | have EPREFIX
* use ROOT, not EROOT so we don't get a double prefixFabian Groffen2010-09-301-2/+2
|
* use ROOT, not EROOT so we don't get a double prefixFabian Groffen2010-09-301-3/+3
|
* always use eroot with CONFIG_MEMORY_FILEFabian Groffen2010-09-231-2/+2
|
* catch another case where using EROOT is absolutely not correct:Fabian Groffen2010-09-181-1/+2
| | | | | when reading files from CONTENTS, don't prepend EROOT, since the package already HAS prefix recorded in CONTENTS
* Drop PREFIX LOCAL markersFabian Groffen2010-09-181-10/+2
|
* don't use EROOT or an upgrade of a package will result in the package being ↵Fabian Groffen2010-09-171-2/+8
| | | | unmerged!
* Do NOT use EROOT when merging files to the live filesystem! It inevitably ↵Fabian Groffen2010-09-171-3/+10
| | | | makes double offsets occur
* Make EbuildBuildDir use the PORTAGE_BUILDDIR variable instead of theZac Medico2010-09-141-1/+0
| | | | dir_path attribute.
* Bug #336142 - Use EbuildBuildDir for threaded locking of PORTAGE_BUILDDIRZac Medico2010-09-131-31/+8
| | | | | inside dblink.unmerge(), so that the scheduler can concurrently service ipc calls in the main thread.
* Make dblink.lockdb() use AsynchronousLock.Zac Medico2010-09-131-29/+7
|
* Bug #336142 - When looking of packages that own files for file collisionsZac Medico2010-09-131-9/+24
| | | | | inside dblink.treewalk(), periodically yield to the scheduler so that it can service ipc calls.
* Bug #336142 - Add support for using a thread to wait for locks insideZac Medico2010-09-131-2/+32
| | | | | dblink.lockdb() so that the scheduler can concurrently service ipc calls in the main thread.
* Mark some messages for localization.Arfrever Frehtes Taifersar Arahesis2010-09-081-4/+4
|
* Make dblink._merge() use a PollScheduler instance directly sinceZac Medico2010-09-051-5/+4
| | | | TaskScheduler isn't really needed.
* Make atomic directory creation code in dblink.mergeme() use equivalentZac Medico2010-09-011-4/+16
| | | | error handling to portage.util.ensure_dirs().
* In dblink.mergeme(), handle EISDIR which can be raised from mkdir callsZac Medico2010-08-311-2/+4
| | | | on FreeBSD (see bug #187518).
* Fix portage to create directories atomically in fast build.David James2010-08-311-9/+20
| | | | | | | | | | | | | | If multiple ebuild processes create the same directory, portage should not exit with an error message. Instead we should just be okay with the fact that another process created the directory. This is only necessary for fast build because we eliminate the giant lock that surrounds package merges. TEST=Create fresh chroot and do full build from source start to finish BUG=none Review URL: http://codereview.chromium.org/2998002
* Update portage to create directories atomically.David James2010-08-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Portage should use the ensure_dirs function instead of os.makedirs to create directories, because this function ensures atomicity. It prevents failures when more than one process tries to create the same directory. This fixes a crash bug reported by msb: [...] File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3258, in _merge self.vartree.dbapi._bump_mtime(self.mycpv) File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 152, in _bump_mtime os.makedirs(catdir) File "/usr/lib64/portage/pym/portage/__init__.py", line 210, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) File "/usr/lib64/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/home/msb/trunk/src/build/images/x86-generic/0.8.63.2010_08_03_1844-a1/rootfs//var/db/pkg/x11-proto' BUG=chromium-os:5366 TEST=build_packages && build_image Review URL: http://codereview.chromium.org/3113014
* Use self.dbapi.getpath() to simplify code in vartree.get_provide().Zac Medico2010-08-311-1/+1
|
* Bug #335439 - Fix "AttributeError: 'vartree' object has no attributeZac Medico2010-08-311-1/+1
| | | | '_eroot'" in vartree.get_provide().
* When portage updates itself and the new version either inheritsZac Medico2010-08-311-1/+3
| | | | | | | | | git.eclass or has 9999 in its version, trigger the 'use copy of current sources for install, then restart portage' routine. This is required since with the live git portage-9999 ebuild we can't use the version to detect incompatible changes to ebuild.sh. This issue was noticed due to recent versions of ebuild.sh expecting PORTAGE_BZIP2_COMMAND to be set, causing incompatibility with installed portage-9999 instances.