From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/dbapi/
Date: Thu, 26 May 2011 06:18:46 +0000 (UTC) [thread overview]
Message-ID: <174e63d3894c7d8acce9ac79a617969506210b7f.zmedico@gentoo> (raw)
commit: 174e63d3894c7d8acce9ac79a617969506210b7f
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu May 26 02:32:42 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 06:12:38 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=174e63d3
dblink.unmerge: always initialize myebuildpath
This is required for the doebuild_environment() call. Also, set
builddir_locked = True when appropriate.
---
pym/portage/dbapi/vartree.py | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index b75d69a..5394895 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1612,14 +1612,13 @@ class dblink(object):
contents = self.getcontents()
# Now, don't assume that the name of the ebuild is the same as the
# name of the dir; the package may have been moved.
- myebuildpath = None
+ myebuildpath = os.path.join(self.dbdir, self.pkg + ".ebuild")
failures = 0
ebuild_phase = "prerm"
log_path = None
mystuff = os.listdir(self.dbdir)
for x in mystuff:
if x.endswith(".ebuild"):
- myebuildpath = os.path.join(self.dbdir, self.pkg + ".ebuild")
if x[:-7] != self.pkg:
# Clean up after vardbapi.move_ent() breakage in
# portage versions before 2.1.2
@@ -1655,6 +1654,7 @@ class dblink(object):
scheduler=(scheduler or PollScheduler().sched_iface),
settings=self.settings)
builddir_lock.lock()
+ builddir_locked = True
prepare_build_dirs(settings=self.settings, cleanup=True)
log_path = self.settings.get("PORTAGE_LOG_FILE")
@@ -1668,7 +1668,7 @@ class dblink(object):
level=logging.ERROR, noiselevel=-1)
showMessage(_unicode_decode("%s\n") % (eapi_unsupported,),
level=logging.ERROR, noiselevel=-1)
- elif myebuildpath:
+ elif os.path.isfile(myebuildpath):
if scheduler is None:
retval = _spawn_phase('prerm', self.settings)
else:
@@ -1684,7 +1684,7 @@ class dblink(object):
self._unmerge_pkgfiles(pkgfiles, others_in_slot)
self._clear_contents_cache()
- if myebuildpath and not eapi_unsupported:
+ if not eapi_unsupported and os.path.isfile(myebuildpath):
ebuild_phase = "postrm"
if scheduler is None:
retval = _spawn_phase(ebuild_phase, self.settings)
@@ -1702,7 +1702,7 @@ class dblink(object):
self.vartree.dbapi._bump_mtime(self.mycpv)
if builddir_locked:
try:
- if myebuildpath and not eapi_unsupported:
+ if not eapi_unsupported and os.path.isfile(myebuildpath):
if retval != os.EX_OK:
msg_lines = []
msg = _("The '%(ebuild_phase)s' "
@@ -1746,11 +1746,6 @@ class dblink(object):
phasefilter=('prerm', 'postrm'))
if retval == os.EX_OK and builddir_locked:
- # myebuildpath might be None, so ensure
- # it has a sane value for the clean phase,
- # even though it won't really be sourced.
- myebuildpath = os.path.join(self.dbdir,
- self.pkg + ".ebuild")
try:
doebuild_environment(myebuildpath, "cleanrm",
settings=self.settings, db=self.vartree.dbapi)
next reply other threads:[~2011-05-26 6:26 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 6:18 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-05-27 2:56 [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/dbapi/ Zac Medico
2011-05-27 2:16 Zac Medico
2011-05-27 0:05 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-12 20:13 Zac Medico
2011-05-12 17:58 Zac Medico
2011-05-12 7:13 Zac Medico
2011-05-12 5:47 Zac Medico
2011-05-12 5:47 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-04 20:03 Zac Medico
2011-03-27 21:00 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-01 21:54 Zac Medico
2011-03-01 21:06 Zac Medico
2011-03-01 20:55 Zac Medico
2011-03-01 20:55 Zac Medico
2011-03-01 20:55 Zac Medico
2011-02-14 4:31 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=174e63d3894c7d8acce9ac79a617969506210b7f.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox