On Sat, Dec 05, 2015 at 06:07:02PM -0500, Mingye Wang (Arthur2e5) wrote: > In apt's `apt-key` script (cmdline/apt-key.in), there are multiple calls > to the external program `which`, which is often supplied by the > `debianutils` package on Debianish systems. > > However, apt's control file (debian/control) doesn't claim it to be > dependent on the package. `apt remove debianutils` also doesn't prepare > to remove `apt`, so there aren't any indirect dependencies either.
apt doesn't need to depend on debianutils as this package is marked as Essential: yes, so that is always available on "Debianish systems". I take it that you are trying to run apt on a non-"Debianish system", can I ask which that is? > A fast check on the script itself indicates that all `which` calls are > used to determine the existence of certain commands like gpg, gpg2 and > wget, and the output is discarded. Therefore, replacing all those > `which` with `type` (XSI) or `command -v` (POSIX) is perfectly fine and > dash-compatible. This also gives a trivial performance boost due to > reduced calls to external programs. I changed various places to use "command -v" anyhow as we indeed use it for no good reason, so why not… The remaining problem to "drop" this implicit dependency was then only run-parts, which as we were using it only in two places, I simply replaced with a bit of find magic (+ sort), which we use at a couple of other places as well and is a more common tool (packaged in findutils – also essential, so no explicit dependency either, but that tends to be available on all other systems via their essential equivalent.) Hope that helps. Best regards David Kalnischkies
signature.asc
Description: PGP signature