Remove never-used dependencies call (making a graph).
authorCarl Hetherington <cth@carlh.net>
Wed, 17 Apr 2024 15:22:11 +0000 (17:22 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 17 Apr 2024 15:22:11 +0000 (17:22 +0200)
cdist

diff --git a/cdist b/cdist
index c17c1dc86a28680f40cb49ceb63f085a8bd42bc1..2ba8d448ff54ea7c738f1d298296fbaa67118fd4 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -1127,7 +1127,7 @@ class Tree:
             dep_options = d[2] if len(d) > 2 else {}
             for i in dep.dependencies(dep_options):
                 yield i
-            yield (dep, dep_options, self)
+            yield (dep, dep_options)
 
     def checkout_dependencies(self, options={}):
         for i in self.dependencies(options):
@@ -1407,19 +1407,6 @@ def main():
             shutil.copytree('.', args.output)
         target.cleanup()
 
-    elif args.command == 'dependencies':
-        if args.target is None:
-            raise Error('you must specify -t or --target')
-        if args.checkout is None:
-            raise Error('you must specify -c or --checkout')
-
-        target = target_factory(args)
-        tree = globals.trees.get(args.project, args.checkout, target)
-        print("strict digraph {")
-        for d in list(tree.dependencies({})):
-            print("%s -> %s;" % (d[2].name.replace("-", "-"), d[0].name.replace("-", "_")))
-        print("}")
-
     elif args.command == 'notarize':
         if args.dmgs is None:
             raise Error('you must specify ---dmgs')