changeset 131:bea9f1cc0bef

Try to determine dependencies only when treepkg is fully configured. That is, don't try to parse debian/control if the debian directory does not exist, a situation that most likely happens when running bin/inittreepkg.py to configure the tree packager instance.
author Bernhard Herzog <bh@intevation.de>
date Fri, 23 May 2008 17:44:15 +0000
parents 84a1716827f8
children d7b3dac63ad0
files treepkg/packager.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/packager.py	Fri May 23 16:42:52 2008 +0000
+++ b/treepkg/packager.py	Fri May 23 17:44:15 2008 +0000
@@ -311,7 +311,12 @@
 
         requires = ()
         provides = ()
-        if self.handle_dependencies:
+        # only try to parse the control file if the debian directory
+        # exists.  If the debian directory doesn't exist yet, the tree
+        # packager is likely still being configured and this code may be
+        # run indirectly from e. g. bin/inittreepkg.py in which case the
+        # init_treepkg method will report the missing debian
+        if self.handle_dependencies and os.path.exists(self.debian_dir):
             control = debian.DebianControlFile(os.path.join(self.debian_dir,
                                                             "control"))
             requires = control.build_depends
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)