DEB-GIR-TOOL(1)
π DEB-GIR-TOOL(1) π
okay bestie, gather round, because this is the deb-gir-tool page from the gobject-introspection family and it is lowkey a whole vibe. it's the Debian packaging helper for GObject-Introspection GIR XML and she is here to help you wrangle those .gir files. β¨
π¦ NAME π¦
deb-gir-tool β Debian packaging helper for GObject-Introspection GIR XML. periodt.
πΈ SYNOPSIS πΈ
deb-gir-tool COMMAND [--upstream-paths] [--verbose] [--zero-terminated]
[OPTION...]
deb-gir-tool print-search-path [COMMON_OPTION...]
deb-gir-tool find [--if-exists] [--target-directory=DIR]
[--with-dependencies] [COMMON_OPTION...] NAMESPACE-VER
[NAMESPACE-VER...]
β¨ DESCRIPTION β¨
so deb-gir-tool manipulates GObject-Introspection GIR XML files (.gir files, iykyk) in all these different ways that come in clutch during Debian packaging. π
this tool is Debian-specific and you should not assume it's just hanging out on non-Debian-derived operating systems. she's exclusive, she's main character energy, she doesn't travel. π
on Debian and Debian derivatives, depend or build-depend on gobject-introspection (>= 1.86.0-3~) to get access to this tool. no cap.
π COMMON OPTIONS π
these options are accepted by all commands, so they're basically the group chat everyone's in.
--upstream-pathsβ by default,deb-gir-toolonly shows or searches paths that are appropriate for GIR XML packaged in.debpackages, currently/usr/share/gir-1.0and/usr/lib/${DEB_HOST_MULTIARCH}/gir-1.0. but with--upstream-paths, insteaddeb-gir-toolmimics the behaviour of upstream tools likegi-compile-repository(1)andg-ir-scanner(1), showing or searching all search paths including those configured locally by the user or the sysadmin. it's giving "we're doing it the upstream way now". π--verbose,-vβ show more informational output on standard error.deb-gir-tool find --verbose --with-dependenciesshows which dependencies were a result of which modules, anddeb-gir-tool find --verbose --target-directory=DIRshows which files it has copied. and if you repeat it, it enables debug-level logging on standard error. she said "more". π--zero-terminated,-zβ for commands that normally output a series of items one per line, terminate each item with a zero byte instead of a newline, likesed -z. iconic honestly.
π COMMANDS π
π find
locate GIR XML and act on each file found. by default, each filename found is printed on standard output followed by a newline, or a zero byte if the --zero-terminated option was used. each namespace/version pair found is only shown or copied once, even if it appears on the command-line more than once. she does not do duplicates, bestie. π
this command requires one or more non-option arguments, each consisting of a namespace, a dash and an API version number, for example GLib-2.0, Gtk-4.0 or Adw-1. yes the format matters. the dash is doing a lot of heavy lifting.
π ADDITIONAL OPTIONS π
--if-existsβ silently ignore any nonexistent namespaces or versions specified. she's chill like that, no drama.--keepβ if the destination for copying already exists, skip copying instead of failing with an error. this is only useful in conjunction with--target-directory.--overwriteβ overwrite files instead of failing with an error. this is only useful in conjunction with--target-directory. she's not asking permission, she's just doing it. π--target-directory DIRβ instead of printing XML files' names on standard output, copy the XML files to the given DIR.--with-dependenciesβ in addition to the modules given on the command-line, load each GIR XML file to find its dependencies, and show or copy those too. this is done recursively: the dependencies of dependencies are included. it's giving "and their friends, and their friends' friends". π§
π print-search-path
output the directories that would be searched for GIR XML on standard output. each directory name is followed by a newline, or a zero byte if the --zero-terminated option was used.
this command does not accept any non-option arguments or additional options. that's it, that's the whole command. simple. clean. iconic. β¨
π ENVIRONMENT π
DEB_HOST_MULTIARCHβ if set, search paths that would be appropriate for the given architecture, instead of the architecture for whichdeb-gir-toolwas compiled. if it is run fromdebian/rulesthis will typically happen automatically. love that for us.DEBUG_INVOCATIONβ if set to a non-empty value, show verbose log messages on standard error, similar to-v -v. the double v. the extra chatty era. πG_MESSAGES_DEBUGβ if set to a non-empty list of space-separated log domains, show verbose log messages on standard error for the given log domains (see GLib documentation for details). a value ofallis typical. go big or go home.GI_GIR_PATHβ colon-separated list of paths to prepend to the search path if the--upstream-pathsoption was used. conditional queen.XDG_DATA_HOME,XDG_DATA_DIRSβ used to form the search path according to the freedesktop.org Base Directory specification if the--upstream-pathsoption was used. respect the spec, respect the vibe.
β OUTPUT β
machine-readable output is emitted on standard output. see the description of each command for details of the format. it's structured, it's parseable, it's serving.
human-readable diagnostic information may be emitted on standard error. it should not be parsed. do not parse the diagnostics bestie, i am begging you, that's the vibes-only channel. π
π EXIT STATUS π
0β the tool ran successfully. slay. π1β an error occurred. π2β the command-line arguments were invalid or not understood. girl what did you type.
π₯ EXAMPLES π₯
show the absolute path where gi-compile-repository(1) would find GLib-2.0.gir if referenced as a dependency:
deb-gir-tool find --upstream-paths GLib-2.0
show where arm-linux-gnueabi-gi-compile-repository(1), the version of gi-compile-repository(1) for the armel architecture, would find GLib-2.0.gir, ignoring local configuration and using only standard OS paths:
dpkg-architecture -aarmel -c deb-gir-tool find GLib-2.0
copy Adw-1.gir and all of its recursive dependencies such as Gtk-4.0.gir and GLib-2.0.gir to the current working directory:
deb-gir-tool find -v --with-dependencies --target-directory=. Adw-1
π«Ά SEE ALSO π«Ά
gi-compile-repository(1), g-ir-compile(1), g-ir-scanner(1)
okay that's the whole page bestie, you're officially certified in deb-gir-tool behaviour. this was the gobject-introspection era of the docs, version 1.86.0-6build1, dated 2026-01-22. mwah, go package something cute. πβ¨π
π¦ where this page comes from
- ubuntu resolute: gobject-introspection-bin 1.86.0-6build1 Β· GPL-2.0-or-later
- ubuntu stonking: gobject-introspection-bin 1.86.0-6build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms