|
|
|
@ -1938,8 +1938,10 @@ class Builder(Update):
|
|
|
|
|
task_list = list(task.list) + task_list
|
|
|
|
|
|
|
|
|
|
vdb_path = "var/db/.pkg"
|
|
|
|
|
test_vdb_path = 'var/db/pkg-test'
|
|
|
|
|
real_vdb_path = path.join(builder_path, VDB_PATH)
|
|
|
|
|
hide_vdb_path = path.join(builder_path, vdb_path)
|
|
|
|
|
test_vdb_path = path.join(builder_path, test_vdb_path)
|
|
|
|
|
try:
|
|
|
|
|
shutil.move(real_vdb_path, hide_vdb_path)
|
|
|
|
|
except (IOError, OSError):
|
|
|
|
@ -1954,6 +1956,9 @@ class Builder(Update):
|
|
|
|
|
self.skip_automagic(pkg, hide_vdb_path, real_vdb_path)
|
|
|
|
|
except (IOError, OSError):
|
|
|
|
|
if path.exists(real_vdb_path):
|
|
|
|
|
if path.exists(test_vdb_path):
|
|
|
|
|
shutil.rmtree(test_vdb_path)
|
|
|
|
|
shutil.copytree(real_vdb_path, test_vdb_path)
|
|
|
|
|
shutil.rmtree(real_vdb_path)
|
|
|
|
|
|
|
|
|
|
shutil.move(hide_vdb_path, real_vdb_path)
|
|
|
|
@ -2028,6 +2033,9 @@ class Builder(Update):
|
|
|
|
|
finally:
|
|
|
|
|
try:
|
|
|
|
|
if path.exists(real_vdb_path):
|
|
|
|
|
if path.exists(test_vdb_path):
|
|
|
|
|
shutil.rmtree(test_vdb_path)
|
|
|
|
|
shutil.copytree(real_vdb_path, test_vdb_path)
|
|
|
|
|
shutil.rmtree(real_vdb_path)
|
|
|
|
|
shutil.move(hide_vdb_path, real_vdb_path)
|
|
|
|
|
except (IOError, OSError):
|
|
|
|
|