On Fri, 6 Sep 2019 17:11:36 +0200 Andreas Steinel <[email protected]> wrote: > Package: devscripts > Version: 2.19.5 > Severity: important > > Dear Maintainer, > > I ran mk-build-deps in a directory in which the user running it has no > write permissions. An error message is displayed, but the program exits > with a zero exit code but was not able to perform its duty: > > $ mk-build-deps > Error in tempdir() using /tmp/localdir/equivs.XXXXXX: Could not create > directory /tmp/localdir/equivs.DB5LRY: Permission denied at > /usr/bin/equivs-build line 19. > > $ echo $? > 0 > > I expect the program to return anything else but 0 so that programs > relying on exit code will work. > > As a workaround in my build scripts, I now check if mk-build-deps > created any *deb files
I ran mk-build-deps in a packaging directory with a B-D list roughly converted from language specific manifest, which resulted in some errors. dpkg-checkbuilddeps correctly identified the error and properly failed: ---- root@devoid /w/t/trippy (debian/sid)# dpkg-checkbuilddeps dpkg-checkbuilddeps: warning: can't parse dependency librust-insta = (1.39.0) dpkg-checkbuilddeps: error: cannot parse Build-Depends/Build-Depends-Arch/Build-Depends-Indep field root@devoid /w/t/trippy (debian/sid) [255]# ---- (Don't mind the root user, it's in a container.) But mk-build-deps happily continues, producing an empty .deb, only showing a warning at the very top: ---- root@devoid /w/t/trippy (debian/sid)# mk-build-deps mk-build-deps: warning: can't parse dependency librust-insta = (1.39.0) Use of uninitialized value $positive in concatenation (.) or string at /usr/bin/mk-build-deps line 581. dpkg-buildpackage: info: source package rust-trippy-build-deps dpkg-buildpackage: info: source version 0.11.0-1 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Equivs Dummy Package Generator <root@devoid> dpkg-buildpackage: info: host architecture amd64 dpkg-source --before-build . debian/rules clean dh clean dh_clean debian/rules binary dh binary dh_update_autotools_config dh_autoreconf create-stamp debian/debhelper-build-stamp dh_prep dh_auto_install --destdir=debian/rust-trippy-build-deps/ dh_install dh_installdocs dh_installchangelogs dh_perl dh_link dh_strip_nondeterminism dh_compress dh_fixperms dh_missing dh_installdeb dh_gencontrol dh_md5sums dh_builddeb dpkg-deb: building package 'rust-trippy-build-deps' in '../rust-trippy-build-deps_0.11.0-1_all.deb'. dpkg-genbuildinfo --build=binary -O../rust-trippy-build-deps_0.11.0-1_amd64.buildinfo dpkg-genchanges --build=binary -O../rust-trippy-build-deps_0.11.0-1_amd64.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) The package has been created. Attention, the package has been created in the current directory, not in ".." as indicated by the message above! root@devoid /w/t/trippy (debian/sid)# apt install ./rust-trippy-build-deps_0.11.0-1_all.deb Note, selecting 'rust-trippy-build-deps' instead of './rust-trippy-build-deps_0.11.0-1_all.deb' rust-trippy-build-deps is already the newest version (0.11.0-1). Summary: Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 10 ---- This can't be checked like Andreas did, because the .deb is there, unless I cross check dpkg -I with d/control - but what's the point? And the warning is really hard to spot. Please just stop when there's an error. -- Sdrager, Blair Noctis -- Sdrager, Blair Noctis
OpenPGP_signature.asc
Description: OpenPGP digital signature

