Package list rust-stfu8 / 924ec33
list-rdeps: make it quicker Ximin Luo 1 year, 10 months ago
1 changed file(s) with 9 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
3434 fi
3535
3636 apt_versions() {
37 aptitude versions --disable-columns -F '%p %t' --group-by=none "~rnative $1" || true
37 aptitude versions --disable-columns -F '%e %p %t' --group-by=none "~rnative $1" || true
38 }
39
40 all_rust_packages="$(apt_versions "~e^rust-")"
41 quick_apt_versions() {
42 printf "%s\n" "$all_rust_packages" | awk "\$1 ~ /$1/ && \$2 ~ /$2/ && \$3 ~ /$3/ && \$4 ~ /$4/ { ${5:-print} }"
3843 }
3944
4045 # versions of source packages in unstable. used to ignore cruft (i.e. binary
4348 src_version() {
4449 local src="$1"
4550 if [ -z "${srcver[$src]}" ]; then
46 srcver["$src"]="$(apt_versions "librust-${src}-dev" | grep "$ARCHIVE" | cut '-d ' -f2)"
51 srcver["$src"]="$(quick_apt_versions "" "^librust-${src}-dev$" "" "\y$ARCHIVE\y" 'print $3')"
4752 fi
4853 echo "${srcver[$src]}"
4954 }
8085 pkg="${pkg#rust-}"
8186
8287 echo "Versions of rust-${pkg} in $ARCHIVE:"
83 apt_versions "~e^rust-${pkg}$" | grep "$ARCHIVE" | sort | while read binpkg ver archive; do
88 quick_apt_versions "^rust-${pkg}$" "" "" "\y$ARCHIVE\y" | sort | while read srcpkg binpkg ver archive; do
8489 if [ "$ver" != "$(src_version "$pkg")" ]; then continue; fi
8590 local stat="$(installability "$binpkg" "$ver")"
8691 printf "%s %-48s %-16s\n" "$stat" "$binpkg" "$ver"
8994
9095 echo "Versions of rdeps of rust-${pkg} in $ARCHIVE, that also exist in $ARCHIVT:"
9196 local rdeps="$(apt_versions "~D^librust-${pkg}~(\+~|-[0-9]~).*-dev$")"
92 printf "%s\n" "$rdeps" | grep "$ARCHIVE" | while read rdep ver archive; do
97 printf "%s\n" "$rdeps" | grep "$ARCHIVE" | while read src rdep ver archive; do
9398 # we're interested in packages in both archives.
9499 if ! printf "%s\n" "$rdeps" | grep "$ARCHIVT" | grep -qF "$rdep"; then
95100 local rdepv="$(echo "$rdep" | sed -E -e 's/-[0-9.]+-dev$/-dev/')"