diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2024-05-17 16:49:39 -0700 |
---|---|---|
committer | Konstantin Pavlov <pavlov.konstantin@gmail.com> | 2024-05-20 12:11:37 -0700 |
commit | f281207f9ea5e457111109729dcc9e6ab65aa573 (patch) | |
tree | e5ec6712922f770004fd47f9d8e597585e24c238 /pkg | |
parent | 8fc16a77d511a4f0c00d0b0d24e575fe7673e4c8 (diff) | |
download | unit-f281207f9ea5e457111109729dcc9e6ab65aa573.tar.gz unit-f281207f9ea5e457111109729dcc9e6ab65aa573.tar.bz2 |
Packaging: fix build-depends detection on debian-based systems
dpkg-query -W will show information about the package if any other
package references it, even when the queried package is not installed.
The fix is to query for an actual status of a needed build dependency.
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/deb/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index beae5120..a0c226e2 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -203,8 +203,8 @@ check-build-depends-%: esac ; \ not_installed= ; \ for pkg in $${pkgs}; do \ - dpkg-query -W $${pkg} >/dev/null 2>&1 ; \ - if [ $$? -ne 0 ]; then \ + i=$$(dpkg-query -f '$${db:Status-Status}' -W $${pkg} 2>/dev/null) ; \ + if [ $$? -ne 0 -o "$${i}" != "installed" ]; then \ not_installed="$${not_installed} $${pkg}" ; \ fi ; \ done ; \ |