DPKG-DEPCHECK(1)

πŸ’– DPKG-DEPCHECK πŸ’–

okay bestie, so this is dpkg-depcheck, a Debian manual page, and it's literally about figuring out which packages you actually touched when you ran a thing. no cap, it's giving detective energy πŸ”βœ¨


✨ NAME ✨

dpkg-depcheck β€” determine packages used to execute a command


🌸 SYNOPSIS 🌸

dpkg-depcheck [options] command

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, this program runs the command you give it under strace, and then it figures out and outputs the packages that got used in the process. like, it's watching every move your command makes and going "hmm, that file belongs to this package, noted πŸ“".

and the list it spits out? you can trim it in all sorts of ways, which are described down in the options. a really good example would be:

dpkg-depcheck -b debian/rules build

which gives you a genuinely solid first approximation of the Build-Depends line your Debian package needs. iconic behaviour honestly πŸ’…

but lowkey, heads up: this does not give you any direct information about the versions required, or about architecture-specific packages. it's a vibe check, not a full dependency resolution. 😭

πŸŽ€ OPTIONS πŸŽ€

  • -a, --all β€” report all the packages used to run command. this is the default behaviour, so it's the main character of the options. but if you use it together with -b, -d or -m, it gives you extra info about those packages that those options skipped. 🫢
  • -b, --build-depends β€” do not report any build-essential or essential packages used, nor any of their dependencies (direct or indirect, we're not playing favourites).
  • -d, --ignore-dev-deps β€” do not show packages used that are direct dependencies of the -dev packages that got used. btw this implies -b.
  • -m, --min-deps β€” output a minimal set of packages needed, taking direct dependencies into account. using -m implies -d, and it also implies -b. it's the full combo meal πŸ“
  • -C, --C-locale β€” run command with the C locale.
  • --no-C-locale β€” don't change the locale when running command. cancels out the vibe.
  • -l, --list-files β€” also report the list of files used in each package.
  • --no-list-files β€” do not report the files used in each package. this cancels a -l option, so it's the anti--l.
  • -o, --output=FILE β€” output the package diagnostics to FILE instead of stdout.
  • -O, --strace-output=FILE β€” write the strace output to FILE when tracing command, instead of using a temporary file.
  • -I, --strace-input=FILE β€” get the strace output from FILE instead of tracing command. ⚠️ important: strace must have been run with the -f -q options for this to work. no -f -q, no deal.
  • -f, --features=LIST β€” enable or disable features given in the comma-separated LIST, like this: a feature is enabled with +feature or just feature, and disabled with -feature. the currently recognised features are:
    • warn-local β€” warn if files in /usr/local or /var/local are used. enabled by default.
    • discard-check-version β€” discards execve when only a --version argument is given to the program. this works around some configure scripts that check for binaries they don't actually use. enabled by default.
    • trace-local β€” also try to identify files which are accessed in /usr/local and /var/local. not usually very useful, since Debian does not place files in these directories. disabled by default.
    • catch-alternatives β€” warn about access to files controlled by the Debian alternatives mechanism. enabled by default.
    • discard-sgml-catalogs β€” discards access to SGML catalogs; some SGML tools read all the registered catalogs at startup. files matching the regexp /usr/share/sgml/.*\.cat are recognised as catalogs. enabled by default.
  • --no-conf, --noconf β€” do not read any configuration files. 🚨 this can only be used as the first option given on the command-line, so don't be sneaky and put it second.
  • -h, --help β€” display usage information and exit.
  • -v, --version β€” display version and copyright information and exit.

🌈 CONFIGURATION VARIABLES 🌈

the two configuration files /etc/devscripts.conf and ~/.devscripts are sourced in that order to set configuration variables. command-line options can be used to override configuration file settings. environment variable settings are ignored for this purpose. the currently recognised variable is:

  • DPKG_DEPCHECK_OPTIONS β€” these are options which are parsed before the command-line options. for example:
DPKG_DEPCHECK_OPTIONS="-b -f-catch-alternatives"

which passes these options to dpkg-depcheck before any command-line options get processed.

bestie, you are advised not to try tricky quoting, because of the vagaries of shell quoting! 😭 the shell is not your friend here, fr fr.

πŸ‘‘ SEE ALSO πŸ‘‘

dpkg(1), strace(1), devscripts.conf(5), update-alternatives(8)


πŸ’œ COPYING πŸ’œ

Copyright 2001 Bill Allombert <ballombe@debian.org>. Modifications copyright 2002,2003 Julian Gilbey <jdg@debian.org>.

dpkg-depcheck is free software, covered by the GNU General Public License, version 2 or (at your option) any later version, and you are welcome to change it and/or distribute copies of it under certain conditions.

and there is absolutely no warranty for dpkg-depcheck. like, zero. none. don't come for her. πŸ’€

and that's the whole page, bestie!! 🧚 this was dpkg-depcheck from the DEBIAN manual, dated March 2002. go forth and trace your little heart out. slay, periodt. πŸ’–βœ¨πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from