list-rdeps: more details
Ximin Luo
4 years ago
19 | 19 | aptitude versions --disable-columns -F '%p %t' --group-by=none "~rnative $1" | grep "$ARCHIVE" |
20 | 20 | } |
21 | 21 | |
22 | echo "Version in $ARCHIVE:" | |
23 | apt_versions "~e^rust-${pkg}$" || echo "(not in unstable)" | |
22 | installability() { | |
23 | if apt -t "$ARCHIVE" -s install "$1=$2" 2>/dev/null >/dev/null; then | |
24 | echo " " | |
25 | else | |
26 | echo "X" | |
27 | fi | |
28 | } | |
29 | ||
30 | echo "Versions of rust-${pkg} in $ARCHIVE:" | |
31 | apt_versions "~e^rust-${pkg}$" | sort | while read binpkg ver archive; do | |
32 | stat="$(installability "$binpkg" "$ver")" | |
33 | printf "%s %-48s %-16s\n" "$stat" "$binpkg" "$ver" | |
34 | done | |
24 | 35 | echo |
25 | 36 | |
26 | 37 | echo "Versions of rdeps in $ARCHIVE:" |
31 | 42 | | sed -z -e 's/\n\n/\t/g' -e 's/\n/ /g' -e 's/\t/\n/g' |
32 | 43 | done | sort | while read rdep ver deps; do |
33 | 44 | rustdeps="$(printf "%s" "$deps" | tr ',' '\n' | egrep -wo "librust-${pkg}(\+|-[0-9])\S*-dev" | tr '\n' ' ')" |
34 | printf "%-48s %-16s depends on %s\n" "$rdep" "$ver" "$rustdeps" | |
45 | stat="$(installability "$rdep" "$ver")" | |
46 | printf "%s %-48s %-16s depends on %s\n" "$stat" "$rdep" "$ver" "$rustdeps" | |
35 | 47 | done |
36 | 48 | echo |
37 | 49 | |
38 | 50 | cat <<eof |
39 | You must upgrade any rdep that depends on an old version of ${pkg}, by patching | |
40 | Cargo.toml to accept the new version of ${pkg} as a dependency. Of course, | |
41 | check that the build works - if it doesn't, then you'll need to further patch | |
42 | the source code of the rdep to use the API of the new version of ${pkg}. | |
51 | If any package is marked "X" (to the left of the package) it means it is not | |
52 | installable even in $ARCHIVE - you should check why this is so by attempting to | |
53 | install it yourself, e.g. via aptitude, and see why it can't be installed. This | |
54 | must be fixed before migration is attempted. For example, it may depend on a | |
55 | package which is not yet in Debian. | |
56 | ||
57 | One common reason, for an rdep, is that its dependency (on rust-${pkg}) is out | |
58 | of date - check the "depends" column above to see if this is the case. If so, | |
59 | you must upgrade it to the current version, by patching Cargo.toml to accept | |
60 | the new version of ${pkg} as a dependency. Of course, check that the build | |
61 | works - if it doesn't, then you'll need to further patch the source code of the | |
62 | rdep to use the API of the new version of ${pkg}. | |
43 | 63 | |
44 | 64 | Alternatively, if any rdep is obsolete (i.e. nothing else depends on it) then |
45 | 65 | you should file a RM request to remove it from the Debian archive: |