Codebase list rust-stfu8 / 7177ce1
list-rdeps: include test rdeps by listing source packages whose autopkgtest suite gets (re-)triggered. closes: #18 Signed-off-by: Fabian Gr├╝nbichler <f.gruenbichler@proxmox.com> Fabian Gr├╝nbichler 3 years ago
1 changed file(s) with 19 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8383 list_rdeps() {
8484 pkg="${1//_/-}"
8585 pkg="${pkg#rust-}"
86 declare -a binpkgs
8687
8788 echo "Versions of rust-${pkg} in $ARCHIVE:"
8889 quick_apt_versions "^rust-${pkg}$" "" "" "\y$ARCHIVE\y" | sort | while read srcpkg binpkg ver archive; do
8990 if [ "$ver" != "$(src_version "$pkg")" ]; then continue; fi
9091 local stat="$(installability "$binpkg" "$ver")"
9192 printf "%s %-48s %-16s\n" "$stat" "$binpkg" "$ver"
93 binpkgs+=("$binpkg=$ver")
9294 done
9395 echo
9496
120122 local rustdeps="$(printf "%s" "$deps" | tr ',' '\n' | egrep -wo "librust-${pkg}(\+|-[0-9])\S*-dev[^,]*" | tr '\n' '\t' | sed -e 's/\t/, /g')"
121123 local stat="$(installability "$rdep" "$ver")"
122124 printf "%s %-48s %-16s depends on %s\n" "$stat" "$rdep" "$ver" "$rustdeps"
125 done
126 echo
127
128 echo "Source packages in unstable whose autopkgtests are triggered by rust-$pkg:"
129 while [ -n "${binpkgs[0]}" ]; do
130 local binver="${binpkgs[0]}"
131 binpkgs=("${binpkgs[@]:1}")
132
133 local binpkg="${binver/=*/}"
134 binpkg="$(apt-cache show "$binver" | grep-dctrl -F Package -ns Package -s Provides -e "${binpkg//\+/\\+}" | tr '\n' '|' | sed -e 's/ \+\(([^)]*)\)\?,\? */|/g' -e 's/+/\\+/g' -e 's/|\+$//g' -e 's/|{2,}/|/g')"
135 # check for bin package + all its provided virtual feature packages in one go
136 grep-dctrl -F Testsuite-Triggers -s Package,Version -w "$binpkg" /var/lib/apt/lists/*_dists_"$ARCHIVE"_*_source_Sources* \
137 | cut -d: -f2 | cut '-d ' -f2- \
138 | sed -z -e 's/\n\n/\t/g' -e 's/\n/ /g' -e 's/\t/\n/g' \
139 | while read triggered ver; do
140 printf " %-48s %-16s triggered by %s\n" "$triggered" "$ver" "$binver"
141 done
123142 done
124143 echo
125144 }