Codebase list rust-libslirp / a4ecd9a
Merge branch 'dev/test-rdeps' into 'master' list-rdeps: include test rdeps Closes #18 See merge request rust-team/debcargo-conf!104 Sylvestre Ledru 3 years ago
1 changed file(s) with 19 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8989 list_rdeps() {
9090 pkg="${1//_/-}"
9191 pkg="${pkg#rust-}"
92 declare -a binpkgs
9293
9394 echo "Versions of rust-${pkg} in $ARCHIVE:"
9495 quick_apt_versions "^rust-${pkg}$" "" "" "\y$ARCHIVE\y" | sort | while read srcpkg binpkg ver archive; do
9596 if [ "$ver" != "$(src_version "$pkg")" ]; then continue; fi
9697 local stat="$(installability "$binpkg" "$ver")"
9798 printf "%s %-48s %-16s\n" "$stat" "$binpkg" "$ver"
99 binpkgs+=("$binpkg=$ver")
98100 done
99101 echo
100102
126128 local rustdeps="$(printf "%s" "$deps" | tr ',' '\n' | egrep -wo "librust-${pkg}(\+|-[0-9])\S*-dev[^,]*" | tr '\n' '\t' | sed -e 's/\t/, /g')"
127129 local stat="$(installability "$rdep" "$ver")"
128130 printf "%s %-48s %-16s depends on %s\n" "$stat" "$rdep" "$ver" "$rustdeps"
131 done
132 echo
133
134 echo "Source packages in unstable whose autopkgtests are triggered by rust-$pkg:"
135 while [ -n "${binpkgs[0]}" ]; do
136 local binver="${binpkgs[0]}"
137 binpkgs=("${binpkgs[@]:1}")
138
139 local binpkg="${binver/=*/}"
140 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')"
141 # check for bin package + all its provided virtual feature packages in one go
142 grep-dctrl -F Testsuite-Triggers -s Package,Version -w "$binpkg" /var/lib/apt/lists/*_dists_"$ARCHIVE"_*_source_Sources* \
143 | cut -d: -f2 | cut '-d ' -f2- \
144 | sed -z -e 's/\n\n/\t/g' -e 's/\n/ /g' -e 's/\t/\n/g' \
145 | while read triggered ver; do
146 printf " %-48s %-16s triggered by %s\n" "$triggered" "$ver" "$binver"
147 done
129148 done
130149 echo
131150 }