check if we are in a directory to refresh Release files

authorJulien Jehannet <julien.jehannet@logilab.fr>
changeset84e77615b61d
branchdefault
phasepublic
hiddenno
parent revision#6ae08ac00ee8 release 2.1.2
child revision#ccf5ee950121 prepare 2.1.3 instead of buggy 2.1.2
files modified by this revision
ldi.py
# HG changeset patch
# User Julien Jehannet <julien.jehannet@logilab.fr>
# Date 1227891534 -3600
# Fri Nov 28 17:58:54 2008 +0100
# Node ID 84e77615b61dec5f3e4f34595497eaa7ca31b4e3
# Parent 6ae08ac00ee8c0d6bce98d0a6ebbbec71ea6cb78
check if we are in a directory to refresh Release files

diff --git a/ldi.py b/ldi.py
@@ -317,17 +317,18 @@
1                              self.get_config_value('keyid'),
2                              self.group)
3 
4      def _apt_refresh(self, distsdir, aptconf, distrib="*"):
5          for destdir in glob.glob(osp.join(distsdir, distrib)):
6 -            apt_ftparchive.clean(destdir)
7 -            self.logger.info('Running apt-ftparchive generate')
8 -            apt_ftparchive.generate(destdir, aptconf, self.group)
9 -            self.logger.info('Running apt-ftparchive release')
10 -            apt_ftparchive.release(destdir, aptconf, self.group,
11 -                                   os.path.basename(destdir))
12 -            self._sign_repo(destdir)
13 +            if osp.isdir(destdir):
14 +                apt_ftparchive.clean(destdir)
15 +                self.logger.info('Running apt-ftparchive generate')
16 +                apt_ftparchive.generate(destdir, aptconf, self.group)
17 +                self.logger.info('Running apt-ftparchive release')
18 +                apt_ftparchive.release(destdir, aptconf, self.group,
19 +                                       os.path.basename(destdir))
20 +                self._sign_repo(destdir)
21 
22  class Configure(LdiCommand):
23      """install the program by creating the correct directories with
24      the associated permissions"""
25      name = "configure"