allow disabled pkgcache to actually work
authorDaniel Robbins <drobbins@gentoo.org>
Sun, 16 Nov 2003 05:39:45 +0000 (05:39 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Sun, 16 Nov 2003 05:39:45 +0000 (05:39 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@85 d1e1f19c-881f-0410-ab34-b69fee027534

modules/targets.py

index 780ac06afd6578920fff1ce01ba64e27ea1ca6e0..7c134691970c28885b379823686b9067b0571368 100644 (file)
@@ -115,8 +115,9 @@ class generic_stage_target(generic_target):
                self.mount_safety_check()
                cmd("rm -rf "+self.settings["chroot_path"],"Could not remove existing directory: "+self.settings["chroot_path"])
                os.makedirs(self.settings["chroot_path"])
-               if not os.path.exists(self.settings["pkgcache_path"]):
-                       os.makedirs(self.settings["pkgcache_path"])
+               if self.settings.has_key["PKGCACHE"]:   
+                       if not os.path.exists(self.settings["pkgcache_path"]):
+                               os.makedirs(self.settings["pkgcache_path"])
                
        def unpack_and_bind(self):
                print "Unpacking stage tarball..."