# HG changeset patch # User Bernhard Herzog # Date 1211564655 0 # Node ID bea9f1cc0bef197c2bc6e90f23c189e15a731fa7 # Parent 84a1716827f851f501f53111393428f9f5f08a83 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. diff -r 84a1716827f8 -r bea9f1cc0bef treepkg/packager.py --- 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