derlemeye başlamadan önce derleme dizinini temizlemek lazım. bunun için sourcearchive'de cleandir=True gönderiyoruz.
This commit is contained in:
+4
-5
@@ -22,11 +22,10 @@ class ArchiveBase(object):
|
|||||||
def unpack(self, targetDir, cleanDir = False):
|
def unpack(self, targetDir, cleanDir = False):
|
||||||
self.targetDir = targetDir
|
self.targetDir = targetDir
|
||||||
# first we check if we need to clean-up our working env.
|
# first we check if we need to clean-up our working env.
|
||||||
if os.path.exists(self.targetDir):
|
if os.path.exists(self.targetDir) and cleanDir:
|
||||||
if cleanDir:
|
util.clean_dir(self.targetDir)
|
||||||
util.clean_dir(self.targetDir)
|
|
||||||
else:
|
os.makedirs(self.targetDir)
|
||||||
os.makedirs(self.targetDir)
|
|
||||||
|
|
||||||
class ArchiveTar(ArchiveBase):
|
class ArchiveTar(ArchiveBase):
|
||||||
"""ArchiveTar handles tar archives depending on the compression
|
"""ArchiveTar handles tar archives depending on the compression
|
||||||
|
|||||||
@@ -46,6 +46,6 @@ class SourceArchive:
|
|||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def unpack(self, cleanDir=False):
|
def unpack(self, cleanDir=True):
|
||||||
archive = Archive(self.dest, self.ctx.spec.source.archiveType)
|
archive = Archive(self.dest, self.ctx.spec.source.archiveType)
|
||||||
archive.unpack(self.ctx.pkg_work_dir(), cleanDir)
|
archive.unpack(self.ctx.pkg_work_dir(), cleanDir)
|
||||||
|
|||||||
Reference in New Issue
Block a user