Package: maven-debian-helper Version: 1.5.1 Severity: normal Tags: patch apt-file has not needed root privileges for its operation since 2008 or 2009 (see #540905 for example), so it's unnecessary to use sudo for its invokation.
If mh_make finds that the apt-file or devscripts packages are missing, it ought to give an explanation what to do and exit instead of going ahead and trying to install packages on behalf of the user. By the way: If sudo is not installed or if the user has not been sudo privileges, mh_make would fail in interesting ways... A patch that removes sudo from the picture is attached below. Cheers, -Hilko
commit 438d51ab5e90f2ec8e961785e19f11352542a0a7 (HEAD, refs/heads/master) Author: Hilko Bengen <ben...@debian.org> Date: Tue Mar 19 00:48:48 2013 +0100 mh_make: Don't use sudo to install extra packages -- bail out using error messages instead. Modified bin/mh_make diff --git a/bin/mh_make b/bin/mh_make old mode 100644 new mode 100755 index e8cf157..6b16a9f --- a/bin/mh_make +++ b/bin/mh_make @@ -126,30 +126,27 @@ fi echo echo "Checking that apt-file is installed and has been configured..." -if [ -f /usr/bin/apt-file ]; then +if [ ! -x /usr/bin/apt-file ]; then + echo "Error: apt-file is not available." >&2 + echo "Please the 'apt-file' package it and try again." >&2 + exit 1 +else res="ok" apt-file search /usr/bin/mvnDebug | grep maven > /dev/null || res="failed" if [ $? != 0 ] || [ "$res" == "failed" ]; then echo "Warning: apt-file doesn't seem to be configured" - echo "Running sudo apt-file update... (this operation may require that you" - echo "enter your password)" - sudo apt-file update + apt-file update else echo '[ok]' fi -else - echo "Warning: apt-file doesn't seem to be installed" - echo "Installing apt-file using sudo apt-get install apt-file" - sudo apt-get install apt-file - sudo apt-file update fi echo echo "Checking that licensecheck is installed..." -if [ ! -f /usr/bin/licensecheck ]; then - echo "Warning: licensecheck doesn't seem to be installed" - echo "Installing licensecheck using sudo apt-get install devscripts" - sudo apt-get install devscripts +if [ ! -x /usr/bin/licensecheck ]; then + echo "Error: licensecheck is not available." >&2 + echo "Please install the 'devscripts' package and try again." >&2 + exit 1 else echo '[ok]' fi
__ This is the maintainer address of Debian's Java team <http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. Please use debian-j...@lists.debian.org for discussions and questions.