logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

dpkg-buildtree - helper for build tree operations during package builds

Commands

clean
           Removes  all  artifacts  generated  during  a  build by the various dpkg tools, and pathnames used or
           controlled by dpkg tools that are safe to clean.  These files are used to track state between package
           build runs, and are in many  cases  internal  implementation  details  the  packager  should  not  be
           concerned about, or are staging directories containing build artifacts.

       is-rootless
           Checks whether the build tree can be built with no root privileges (since dpkg 1.22.12).

           This  command  can  be  used safely even with versions where the command was not yet available as the
           default will then be the historic one where root was required.

       --help
           Show the usage message and exit.

       --version
           Show the version and exit.

Description

dpkg-buildtree is a tool to perform common operations on the build tree for a source package.

       This program was introduced in dpkg 1.22.3.

Environment

DPKG_COLORS
           Sets the color mode.  The currently accepted values are: auto (default), always and never.

       DPKG_NLS
           If set, it will be used to decide  whether  to  activate  Native  Language  Support,  also  known  as
           internationalization (or i18n) support.  The accepted values are: 0 and 1 (default).

Examples

Usageindebian/rules
       You can call dpkg-buildtreeclean from the  debian/rulesclean  target,  after  having  performed  other
       necessary cleanups.

       For example for an autoconf-like build system:

         clean:
               [ ! -f Makefile ] || $(MAKE) distclean
               dpkg-buildtree clean

1.22.18                                            2025-03-20                                  dpkg-buildtree(1)

Files

Cleanedfilesdebian/filesdebian/files.new
           Files generated by dpkg-distaddfile(1).

       debian/substvarsdebian/substvars.new
           Files generated by dpkg-shlibdeps(1).

       debian/tmp
           Staging   directory   containing   the   contents   to   be  used  when  creating  a  package.   Both
           dpkg-gencontrol(1) and dpkg-gensymbols(1) generate files within.

Name

       dpkg-buildtree - helper for build tree operations during package builds

Synopsis

dpkg-buildtree [option...] [command]

See Also