CONSFIGURATOR.PROPERTY.APT

API reference

Properties

Property: APT:KNOWN-INSTALLED-REMOVED-PACKAGES-RESET

(apt:known-installed-removed-packages-reset)

Reset the lists of known-installed and known-removed Debian packages. You should call this in custom properties that manually manipulate what packages are installed in order to ensure that subsequent applications of APT properties do not assume that their work has already been done.

Property: APT:INSTALLED

(apt:installed &rest packages)

Ensure all of the apt packages PACKAGES are installed.

Property: APT:INSTALLED-MINIMALLY

(apt:installed-minimally &rest packages)

Ensure all of the apt packages PACKAGES are installed, without recommends.

Property: APT:BACKPORTS-INSTALLED

(apt:backports-installed &rest packages)

Ensure all of the apt packages PACKAGES are installed from stable-backports.

Note that if installing any of the backports requires installing versions of the backport’s dependencies from stable-backports too, you will need to list each of those dependencies in PACKAGES.

Property: APT:BACKPORTS-INSTALLED-MINIMALLY

(apt:backports-installed-minimally &rest packages)

Like APT:BACKPORTS-INSTALLED but don’t install recommends.

Property: APT:REMOVED

(apt:removed &rest packages)

Ensure all of the apt packages PACKAGES are removed.

Property: APT:RECONFIGURED

(apt:reconfigured package &rest triples)

Where each of TRIPLES is a list of three strings, a debconf template, type and value, debconf reconfigure PACKAGE with those new debconf values. Typically used with the ON-CHANGE combinator.

Property: APT:SERVICE-INSTALLED-RUNNING

(apt:service-installed-running package)

Where PACKAGE installs a service named PACKAGE, ensure it is installed and running.

E.g. (APT:SERVICE-INSTALLED-RUNNING “apache2”).

Property: APT:ALL-CONFIGURED

(apt:all-configured)

Ensure that there are no packages for which installation is unfinished.

Property: APT:UPDATED

(apt:updated)

Ensure the apt indexes are up-to-date.

Property: APT:UPGRADED

(apt:upgraded)

Property: APT:AUTOREMOVED

(apt:autoremoved)

Property: APT:PERIODIC-UPDATES

(apt:periodic-updates)

Enable periodically updating the apt indexes and downloading new versions of packages. Does not do any automatic upgrades.

Property: APT:UNATTENDED-UPGRADES

(apt:unattended-upgrades)

Enable unattended upgrades.

Note that in its default configuration on Debian, unattended-upgrades will only upgrade Debian stable.

Property: APT:MIRRORS

(apt:mirrors &rest uris)

Property: APT:USES-PARENT-MIRRORS

(apt:uses-parent-mirrors)

Property: APT:PROXY

(apt:proxy uri)

Property: APT:USES-PARENT-PROXY

(apt:uses-parent-proxy)

Property: APT:USES-LOCAL-CACHER

(apt:uses-local-cacher)

Function: APT:GET-MIRRORS

(apt:get-mirrors)

Property: APT:STANDARD-SOURCES.LIST

(apt:standard-sources.list)

Property: APT:ADDITIONAL-SOURCES

(apt:additional-sources basename content)

Add additional apt source lines to a file in /etc/apt/sources.list.d named after BASENAME. CONTENT is as the content argument to FILE:HAS-CONTENT.

Property: APT:CACHE-CLEANED

(apt:cache-cleaned)

Empty apt’s cache to recover disk space.

Property: APT:TRUSTS-KEY

(apt:trusts-key fingerprint &optional basename)

Have apt trust the PGP key identified by FINGERPRINT to sign apt archives.

Property: APT:NO-PDIFFS

(apt:no-pdiffs)

Disable the use of PDiffs for machines with high bandwidth connections.

Pinning

Property: APT:SUITES-AVAILABLE-PINNED

(apt:suites-available-pinned &rest pairs)

Where PAIRS is a list of even length of alternating Debian suite specifiers and apt pin priorities, add an apt source for the specified Debian suite and pin that suite to a given pin value (see apt_preferences(5)). Unapply to drop the source and unpin the suite.

A Debian suite specifier is either an instance of a subclass of OS:DEBIANLIKE or a list (TYPE &optional SUITE) where TYPE names a subclass of OS:DEBIANLIKE and SUITE is a string. For example, ‘(os:debian-stable “bullseye”).

If the OS:DEBIAN is the host’s OS, the suite is pinned, but no source is added. That apt source should already be available, or you can use a property like APT:STANDARD-SOURCES.LIST.

Property: APT:PINNED

(apt:pinned preferences &rest pairs)

Pins a list of packages, package wildcards and/or regular expressions, PREFERENCES, to a list of suites and corresponding pin priorities. Unapply to unpin. PAIRS is a list of even length of alternating Debian suite specifiers and apt pin priorities.

A Debian suite specifier is either an instance of a subclass of OS:DEBIANLIKE or a list (TYPE &optional SUITE) where TYPE names a subclass of OS:DEBIANLIKE and SUITE is a string. For example, ‘(os:debian-stable “bullseye”).

Each package, package wildcard or regular expression will be pinned to all of the specified suites. Each of PREFERENCES is the name of a package, a glob to match the names of packages, or a regexp surrounded by slashes to match the names of packages. See apt_preferences(5), “Regular expressions and glob(7) syntax”.

Note that this will have no effect unless there is an apt source for each of the suites. One way to add an apt source is APT:SUITES-AVAILABLE-PINNED.

For example, to obtain Emacs Lisp addon packages not present in your stable release of Debian from testing, falling back to sid if they’re not available in testing, you could use:

(os:debian-stable "bullseye" :amd64)
(apt:suites-available-pinned '(os:debian-testing)  -10
                             '(os:debian-unstable) -10)
(apt:pinned '("elpa-*")
            '(os:debian-testing)  100
            '(os:debian-unstable) 50)

Reports on installation status

Function: APT:ALL-INSTALLED-P

(apt:all-installed-p &rest packages)

Return true if all of PACKAGES, a list of non-virtual packages, are installed.

Function: APT:NONE-INSTALLED-P

(apt:none-installed-p &rest packages)

Returns true if none of PACKAGES, a list of non-virtual packages, are installed.