]> git.proxmox.com Git - dh-cargo.git/commitdiff
Make detection of rust_libs in dh-cargo-built-using work again
authorXimin Luo <infinity0@debian.org>
Mon, 21 Jan 2019 08:04:29 +0000 (00:04 -0800)
committerXimin Luo <infinity0@debian.org>
Mon, 21 Jan 2019 08:04:29 +0000 (00:04 -0800)
debian/changelog
dh-cargo-built-using

index 1a3271bab89b2fe4aff1e9f0486831d7f1e8287a..6d8c50018c86c1e9ae5d5edf23f1b7af38cdf423 100644 (file)
@@ -1,3 +1,9 @@
+dh-cargo (16) UNRELEASED; urgency=medium
+
+  * Make detection of rust_libs in dh-cargo-built-using work again.
+
+ -- Ximin Luo <infinity0@debian.org>  Mon, 21 Jan 2019 00:04:08 -0800
+
 dh-cargo (15) unstable; urgency=medium
 
   * Use source package names in *Built-Using.
index c456be2eb3946d24cbd7c2ab96d3b463bf9d5db1..9b856b29b8ea9e0191aa19e8e82d6b4940507330 100755 (executable)
@@ -33,7 +33,7 @@ pkg_has_srcleft_license() {
 
 rust_libs() {
        cat "$CARGO_TARGET_DIR/deps"/*.d \
-       | sed -nre 's   ^(('"$PWD/"')?'"$CARGO_REGISTRY"'/[^/]*)/.*     \1      gp' \
+       | sed -nre 's   ^\S*/('"$CARGO_REGISTRY"'/[^/]*)/.*     '"$(readlink -f "$PWD")/"'\1    gp' \
        | sort -u \
        | xargs -r readlink -f \
        | xargs -r dpkg -S \
@@ -140,7 +140,7 @@ output() {
        else
                local built_using=""
                local built_using_x=""
-               sort -u | while read pkg ver srcleft; do
+               while read pkg ver srcleft; do
                        local src="$(dpkg-query -f '${source:Package}' --show "$pkg")"
                        case "$srcleft" in
                        2)      exit 1;;
@@ -157,4 +157,4 @@ native_libs="$(native_libs)" # capture output outside of pipe so set -e works
 {
 rust_libs
 test -z "$native_libs" || echo "$native_libs"
-} | output "$@"
+} | LC_COLLATE=C.utf-8 sort -u | output "$@"