]> git.proxmox.com Git - debcargo-conf.git/commitdiff
Use `apt-cache showsrc` instead of `apt-cache show` in dev/filter-in-debian
authorWolfgang Silbermayr <wolfgang@silbermayr.at>
Sun, 3 Nov 2019 18:25:21 +0000 (19:25 +0100)
committerWolfgang Silbermayr <wolfgang@silbermayr.at>
Sun, 3 Nov 2019 18:25:23 +0000 (19:25 +0100)
The method with using `apt-cache show` only worked for crates which
provide a library. When using `showsrc`, we also capture crates which
only provide a binary package without a library.

dev/filter-in-debian.sh

index 9e3281fe19971f3f66aa167929b7a553a9f2e748..57d5a63ce334d2f7aa9a4dff9fb2271258436cff 100755 (executable)
@@ -5,7 +5,7 @@ set -e
 
 while read crate ver; do
        pkg="${crate//_/-}"
-       fullpkg=librust-"${pkg}${ver:+-$ver}"-dev
-       numpkg="$(apt-cache show "$fullpkg" 2>/dev/null | grep "^Package: $fullpkg" | wc -l)"
+       fullpkg=rust-"${pkg}${ver:+-$ver}"
+       numpkg="$(apt-cache showsrc "$fullpkg" 2>/dev/null | grep "^Package: $fullpkg" | wc -l)"
        echo "$crate $ver $numpkg"
 done