* fixed ffmpeg libvpl config option following rename {,intel}-onevpl
[t2sde.git] / scripts / Check-Deps-1
blob8db0845b99e5abdf373ca668c0f8d4a9fb70544f
1 #!/usr/bin/env bash
3 # --- T2-COPYRIGHT-NOTE-BEGIN ---
4 # T2 SDE: scripts/Check-Deps-1
5 # Copyright (C) 2004 - 2023 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # This Copyright note is generated by scripts/Create-CopyPatch,
9 # more information can be found in the files COPYING and README.
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License version 2.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 gawk '
16 function check_package() {
17 split(pkgline, a); dep=a[2];
18 if (! index(a[2], stagelevel)) return;
20 repository = a[4];
21 package = a[5];
23 present = present " " package " ";
24 if (stagelevel < 2) return;
26 depfile = depfile_tpl;
27 gsub("<stagelevel>", stagelevel, depfile);
28 gsub("<repository>", repository, depfile);
29 gsub("<package>", package, depfile);
31 firstent=1;
32 gsub(" \\[.\\]:" repository "/" package ":[^ ]*", "", errors);
33 while ((getline depline < depfile) > 0) {
34 split(depline, a);
35 if (a[1] != "[DEP]") continue;
37 for (c=2; a[c] != ""; c++) {
38 if (a[c] == package) continue;
39 if (! index(present, " " a[c] " ")) {
40 if (firstent)
41 errors = errors " [" stagelevel "]:" \
42 repository "/" package ":";
43 errors = errors ":" a[c];
44 firstent=0;
49 close(depfile);
52 BEGIN {
53 present="";
54 errors="";
56 system("mkdir -p src; scripts/Create-PkgList x86 > src/pkg_list");
57 depfile_tpl = "package/<repository>/<package>/<package>.cache";
59 for (stagelevel=0; stagelevel<9; stagelevel++) {
60 while ((getline pkgline < "src/pkg_list") > 0) {
61 check_package();
63 close("src/pkg_list");
65 system("rm -f src/pkg_list");
67 if (errors != "") {
68 print "\nThe following packages have dependencies which";
69 print "are not solved before stage 9:\n";
71 print "Stage Package Dependencies";
73 gsub(" ", "\n", errors);
74 gsub("::", "\t", errors);
75 gsub(":", " ", errors);
77 print errors | "expand -t30";