Dpkg::BuildOptions(3perl)
π Dpkg::BuildOptions(3perl)
okay so bestie, welcome to Dpkg::BuildOptions β it's a libdpkg-perl module and it's literally the main character of build-option management β¨
π NAME π
Dpkg::BuildOptions β parse and update build options, no cap π«Ά
πΈ DESCRIPTION πΈ
so like, this class is the one you call when you wanna manipulate options that live in environment variables β think DEB_BUILD_OPTIONS and DEB_BUILD_MAINT_OPTIONS. that's the whole vibe. it holds your options, it massages them, it exports them back out. iconic behavior honestly π
π¦ METHODS π¦
$bo = Dpkg::BuildOptions->new(%opts)β spin up a brand newDpkg::BuildOptionsobject. it initializes itself from the value of the environment variable namedDEB_BUILD_OPTIONS(unless you tell it otherwise, see below π)
Options:
envvarβ set the environment variable name to use instead ofDEB_BUILD_OPTIONSto initialize the build flags. yes bestie you can pick your own variable, go off β¨
$bo->reset()β reset the object so it has zero options. empty. blank slate. a fresh face, a clean girl π§Ό it's empty, periodt.$count = $bo->merge($content, $source)β merge the options set in$contentand record that they came from the source$source. rn$sourceis mainly used in warning messages to indicate where invalid options got detected π
$content is a space separated list of options with optional assigned values, like "nocheck parallel=2".
$bool = $bo->set($option, $value, [$source])β store the given option in the object with the given value. it's totally legitimate for a value to be undefined if the option is a simple boolean (its presence means true, its absence means false β very demure, very mindful).$sourceis optional and indicates where the option comes from.
the known options have their values checked for sanity π§ options without values have their value removed, and options with invalid values are discarded (sorry girl, gone π).
$value = $bo->get($option)β return the value associated to the option. heads up: it might beundefeven if the option exists π so you might wanna check with$bo->has($option)to verify the option is actually stored in the object. trust.$bool = $bo->has($option)β returns a boolean telling you whether the option is stored in the object. simple. clean. slay π$bo->parse_features($option, $use_feature)β parse the$optionvalues as a set of known features to enable or disable, exactly as specified in the$use_featurehash reference.
each feature is prefixed with a '+' or a '-' character as a marker to enable or disable it. and the special feature "all" can be used to act on all known features π (yes, all of them, queen behavior)
unknown or malformed features will emit warnings π you've been warned.
$string = $bo->output($fh)β return a string representation of the build options, suitable to be assigned to an environment variable. can optionally output that string to the given filehandle too π$string = $bo->export([$var])β export the build options to the given environment variable. if$varis omitted, the environment variable defined at creation time is assumed (iykyk π). the value set to the variable is also returned. two-for-one, we love to see it π
π CHANGES π
β Version 1.02 (dpkg 1.18.19)
- New method:
$bo->parse_features(). β¨
β Version 1.01 (dpkg 1.16.1)
- Enable to use another environment variable instead of
DEB_BUILD_OPTIONS. Thus add support for the"envvar"option at creation time. π¦
β Version 1.00 (dpkg 1.15.6)
- Mark the module as public. π
fr fr that's the whole page, every method and every version note accounted for, no details left behind π
and that's a wrap bestie!! π this page is from libdpkg-perl, version 1.23.11-dirty, dated 2026-09-09 β screenshot it, cite it, frame it, whatever, go be iconic with your build options π
ππ
π¦ where this page comes from
- arch rolling: dpkg 1.23.11-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms