3 # --- T2-COPYRIGHT-NOTE-BEGIN ---
4 # This copyright note is auto-generated by scripts/Create-CopyPatch.
6 # T2 SDE: scripts/Check-Deps-1
7 # Copyright (C) 2004 - 2020 The T2 SDE Project
8 # Copyright (C) 1998 - 2003 ROCK Linux Project
10 # More information can be found in the files COPYING and README.
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; version 2 of the License. A copy of the
15 # GNU General Public License can be found in the file COPYING.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 function check_package
() {
19 split(pkgline
, a
); dep=a
[2];
20 if ( !
index(a
[2], stagelevel
) ) return;
25 present = present
" " package
" ";
26 if ( stagelevel
< 2 ) return;
28 depfile = depfile_tpl
;
29 gsub("<stagelevel>", stagelevel
, depfile
);
30 gsub("<repository>", repository
, depfile
);
31 gsub("<package>", package
, depfile
);
34 gsub(" \\[.\\]:" repository
"/" package
":[^ ]*", "", errors
);
35 while ( (getline depline
< depfile
) > 0 ) {
37 if (a
[1] != "[DEP]") continue;
39 for (c=
2; a
[c
] != ""; c
++) {
40 if ( a
[c
] == package
) continue;
41 if ( !
index(present
, " " a
[c
] " ") ) {
43 errors = errors
" [" stagelevel
"]:" \
44 repository
"/" package
":";
45 errors = errors
":" a
[c
];
58 system("mkdir -p src; scripts/Create-PkgList > src/pkg_list");
59 depfile_tpl =
"package/<repository>/<package>/<package>.cache";
61 for (stagelevel=
0; stagelevel
<9; stagelevel
++) {
62 while ( (getline pkgline
< "src/pkg_list") > 0 ) {
65 close("src/pkg_list");
67 system("rm -f src/pkg_list");
71 print "\nThe following packages have dependencies which";
72 print "are not solved before stage 9:\n";
74 print "Stage Package Dependencies";
76 gsub(" ", "\n", errors
);
77 gsub("::", "\t", errors
);
78 gsub(":", " ", errors
);
80 print errors
| "expand -t30";