From d8db4c363bdec84a2f0b2a53ec176ac8f2419342 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 29 Jul 2012 23:07:41 +0200 Subject: [PATCH 1/1] Make auto-debuild configuration idempotent --- build_system.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_system.py b/build_system.py index 6e72e71..979a47a 100644 --- a/build_system.py +++ b/build_system.py @@ -68,6 +68,7 @@ try: self.autoDebuildConfig[dstName] = src[name] def configure(self, force=False): # force is ignored + if self.configured: return # do not configure twice self.autoDebuildConfig['version'] = self.vcs.version() # by now, data has been fetched, so this is possible if self.autoDebuildConfig['version'] is None: raise Exception("VCS did not provide us with a proper version, please fix this") @@ -77,12 +78,12 @@ try: self.configured = True def build(self): - if not self.configured: self.configure() + self.configure() # make sure we are configured (this call is idempotent) os.chdir(self.sourceFolder) auto_debuild.buildDebianPackage(self.autoDebuildConfig) def install(self): - if not self.configured: self.configure() + self.configure() # make sure we are configured (this call is idempotent) os.chdir(self.sourceFolder) subprocess.check_call(['sudo', 'dpkg', '--install'] + self.files) except ImportError: -- 2.30.2