summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/AbstractEbuildProcess.py1
-rw-r--r--pym/_emerge/Binpkg.py4
-rw-r--r--pym/_emerge/EbuildBuild.py1
-rw-r--r--pym/_emerge/EbuildBuildDir.py6
-rw-r--r--pym/portage/dbapi/vartree.py1
-rw-r--r--pym/portage/package/ebuild/doebuild.py1
-rw-r--r--pym/portage/tests/ebuild/test_ipc_daemon.py2
7 files changed, 7 insertions, 9 deletions
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py
index 7169dab58..37d6d7426 100644
--- a/pym/_emerge/AbstractEbuildProcess.py
+++ b/pym/_emerge/AbstractEbuildProcess.py
@@ -70,7 +70,6 @@ class AbstractEbuildProcess(SpawnProcess):
if self.phase not in self._phases_without_builddir:
if 'PORTAGE_BUILDIR_LOCKED' not in self.settings:
self._build_dir = EbuildBuildDir(
- dir_path=self.settings['PORTAGE_BUILDDIR'],
scheduler=self.scheduler, settings=self.settings)
self._build_dir.lock()
self.settings['PORTAGE_IPC_DAEMON'] = "1"
diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py
index 16826df2d..06f0fd28c 100644
--- a/pym/_emerge/Binpkg.py
+++ b/pym/_emerge/Binpkg.py
@@ -50,7 +50,7 @@ class Binpkg(CompositeTask):
if dir_path != self.settings['PORTAGE_BUILDDIR']:
raise AssertionError("'%s' != '%s'" % \
(dir_path, self.settings['PORTAGE_BUILDDIR']))
- self._build_dir = EbuildBuildDir(dir_path=dir_path,
+ self._build_dir = EbuildBuildDir(
scheduler=self.scheduler, settings=settings)
settings.configdict["pkg"]["EMERGE_FROM"] = pkg.type_name
@@ -193,7 +193,7 @@ class Binpkg(CompositeTask):
self.wait()
return
- dir_path = self._build_dir.dir_path
+ dir_path = self.settings['PORTAGE_BUILDDIR']
infloc = self._infloc
pkg = self.pkg
diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py
index c4f172c19..974a1586a 100644
--- a/pym/_emerge/EbuildBuild.py
+++ b/pym/_emerge/EbuildBuild.py
@@ -117,7 +117,6 @@ class EbuildBuild(CompositeTask):
return
self._build_dir = EbuildBuildDir(
- dir_path=self.settings['PORTAGE_BUILDDIR'],
scheduler=self.scheduler, settings=settings)
self._build_dir.lock()
diff --git a/pym/_emerge/EbuildBuildDir.py b/pym/_emerge/EbuildBuildDir.py
index af3ce0792..921cf807f 100644
--- a/pym/_emerge/EbuildBuildDir.py
+++ b/pym/_emerge/EbuildBuildDir.py
@@ -9,7 +9,7 @@ import errno
class EbuildBuildDir(SlotObject):
- __slots__ = ("dir_path", "scheduler", "settings",
+ __slots__ = ("scheduler", "settings",
"locked", "_catdir", "_lock_obj")
def __init__(self, **kwargs):
@@ -26,7 +26,9 @@ class EbuildBuildDir(SlotObject):
if self._lock_obj is not None:
raise self.AlreadyLocked((self._lock_obj,))
- dir_path = self.dir_path
+ dir_path = self.settings.get('PORTAGE_BUILDDIR')
+ if not dir_path:
+ raise AssertionError('PORTAGE_BUILDDIR is unset')
catdir = os.path.dirname(dir_path)
self._catdir = catdir
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index c90dbbd21..80d67fb87 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1520,7 +1520,6 @@ class dblink(object):
try:
if myebuildpath:
builddir_lock = EbuildBuildDir(
- dir_path=self.settings['PORTAGE_BUILDDIR'],
scheduler=(scheduler or PollScheduler().sched_iface),
settings=self.settings)
builddir_lock.lock()
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index dff9b881f..4c266222c 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -618,7 +618,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
if not parallel_fetchonly and \
mydo not in ('digest', 'fetch', 'help', 'manifest'):
builddir_lock = EbuildBuildDir(
- dir_path=mysettings['PORTAGE_BUILDDIR'],
scheduler=PollScheduler().sched_iface, settings=mysettings)
builddir_lock.lock()
mystatus = prepare_build_dirs(myroot, mysettings, cleanup)
diff --git a/pym/portage/tests/ebuild/test_ipc_daemon.py b/pym/portage/tests/ebuild/test_ipc_daemon.py
index c4eb55b0d..4c9a614f8 100644
--- a/pym/portage/tests/ebuild/test_ipc_daemon.py
+++ b/pym/portage/tests/ebuild/test_ipc_daemon.py
@@ -39,7 +39,7 @@ class IpcDaemonTestCase(TestCase):
env['PORTAGE_BUILDDIR'] = os.path.join(tmpdir, 'cat', 'pkg-1')
task_scheduler = TaskScheduler(max_jobs=2)
- build_dir = EbuildBuildDir(dir_path=env['PORTAGE_BUILDDIR'],
+ build_dir = EbuildBuildDir(
scheduler=task_scheduler.sched_iface,
settings=env)
build_dir.lock()