Checkout deps when building manuals for DoM (which requires libdcp to build its manual).
[cdist.git] / cdist
diff --git a/cdist b/cdist
index 626f408f2daa890c43044606cfd974ee7002223e..88c9bd40d238c0e043d4ed7bd70266c5f5611519 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -795,6 +795,13 @@ class OSXTarget(Target):
     def unlock_keychain(self):
         self.command('security unlock-keychain -p %s %s' % (self.osx_keychain_password, self.osx_keychain_file))
 
+    def _copy_packages(self, tree, packages, output_dir):
+        for p in packages:
+            dest = os.path.join(output_dir, os.path.basename(devel_to_git(tree.git_commit, p)))
+            copyfile(p, dest)
+            if os.path.exists(p + ".id"):
+                copyfile(p + ".id", dest + ".id")
+
     def _cscript_package_and_notarize(self, tree, options, notarize):
         """
         Call package() in the cscript and notarize the .dmgs that are returned, if notarize == True
@@ -874,8 +881,8 @@ class OSXUniversalTarget(OSXTarget):
         self.unlock_keychain()
         tree = globals.trees.get(project, checkout, self)
         with TreeDirectory(tree):
-            for p in self._cscript_package_and_notarize(tree, options, notarize):
-                copyfile(p, os.path.join(output_dir, os.path.basename(devel_to_git(tree.git_commit, p))))
+            p = self._cscript_package_and_notarize(tree, options, notarize)
+            self._copy_packages(tree, p, output_dir)
 
 class SourceTarget(Target):
     """Build a source .tar.bz2"""
@@ -1299,6 +1306,7 @@ def main():
     elif args.command == 'manual':
         target = SourceTarget()
         tree = globals.trees.get(args.project, args.checkout, target)
+        tree.checkout_dependencies()
 
         outs = tree.call('make_manual')
         for o in outs: