mirror of
https://github.com/vishapoberon/vipak.git
synced 2026-04-05 20:42:26 +00:00
dependency resolution done!
This commit is contained in:
parent
d36843e1f4
commit
f2fb8651b3
3 changed files with 19 additions and 3 deletions
2
lists
2
lists
|
|
@ -1 +1 @@
|
|||
Subproject commit 08d93de0618077d9ebae98397f191613a4f46120
|
||||
Subproject commit 8bd436755e98807041cd19e9356c7cedb25dd5e9
|
||||
|
|
@ -36,7 +36,6 @@ BEGIN
|
|||
IF command = "install" THEN
|
||||
Texts.Scan(S);
|
||||
unit := S.s;
|
||||
Out.String("argument is "); Out.String(unit);Out.Ln;
|
||||
vpkInstaller.install(unit);
|
||||
END;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,31 @@
|
|||
MODULE vpkInstaller;
|
||||
IMPORT StringList, vpkResolver, vpkdepTree, vpkDot, vpkSettings;
|
||||
IMPORT Out, StringList, vpkResolver, vpkdepTree, vpkDot, vpkSettings;
|
||||
|
||||
PROCEDURE install*(VAR unit: ARRAY OF CHAR);
|
||||
VAR
|
||||
tree: vpkdepTree.TdepTree;
|
||||
lst: StringList.TStringList;
|
||||
dep: vpkdepTree.Tdep;
|
||||
i : LONGINT;
|
||||
BEGIN
|
||||
Out.String("resolving dependencies...");
|
||||
tree := vpkResolver.resolve(unit);
|
||||
Out.String(" done!"); Out.Ln;
|
||||
lst := vpkDot.tree2dot(tree);
|
||||
Out.String("dependency graph:"); Out.Ln;
|
||||
Out.String("-----------------"); Out.Ln;
|
||||
StringList.DumpOut(lst);
|
||||
lst.Dump(lst, vpkSettings.graphName);
|
||||
Out.String("-----------------"); Out.Ln;
|
||||
Out.String("(use 'dot -Tpng deps.dot > deps.png' to get the graph image)"); Out.Ln; Out.Ln;
|
||||
Out.String("dependencies will be installed in the following order:"); Out.Ln;
|
||||
i := 1;
|
||||
REPEAT
|
||||
dep := vpkdepTree.Get(tree, i);
|
||||
Out.String(dep.name^); Out.Ln;
|
||||
INC(i)
|
||||
UNTIL i = tree.Count;
|
||||
|
||||
END install;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue