From fafa3d9ea55f38ae0a350a463d64b7ef1d70c7bb Mon Sep 17 00:00:00 2001 From: Matthias Stecher Date: Sat, 12 Dec 2020 10:00:23 +0100 Subject: [PATCH] __apt_backports: update index if required This type now automatically calls the type __apt_update_index to update the package index if something changed. --- cdist/conf/type/__apt_backports/man.rst | 13 +++++++------ cdist/conf/type/__apt_backports/manifest | 5 ++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cdist/conf/type/__apt_backports/man.rst b/cdist/conf/type/__apt_backports/man.rst index fd311361..c578ce6b 100644 --- a/cdist/conf/type/__apt_backports/man.rst +++ b/cdist/conf/type/__apt_backports/man.rst @@ -9,8 +9,11 @@ cdist-type__apt_backports - Install backports DESCRIPTION ----------- This singleton type installs backports for the current OS release. -It aborts if backports are not supported for the specified OS or no -version codename could be fetched (like Debian unstable). +It aborts if backports are not supported for the specified OS or +no version codename could be fetched (like Debian unstable). + +The package index will be automatically updated by the type +:strong:`cdist-type__apt_update_index`\ (7) if required. It supports backports from following OSes: @@ -59,12 +62,9 @@ EXAMPLES __apt_backports --state absent __apt_backports --state present --mirror "http://ftp.de.debian.org/debian/" - # update - require="__apt_backports" __apt_update_index - # install a backports package # currently for the buster release backports - require="__apt_update_index" __package_apt wireguard \ + require="__apt_backports" __package_apt wireguard \ --target-release buster-backports @@ -90,6 +90,7 @@ SEE ALSO `Official Debian Backports site `_ :strong:`cdist-type__apt_source`\ (7) +:strong:`cdist-type__apt_update_index`\ (7) AUTHORS diff --git a/cdist/conf/type/__apt_backports/manifest b/cdist/conf/type/__apt_backports/manifest index e5358dea..c490a103 100755 --- a/cdist/conf/type/__apt_backports/manifest +++ b/cdist/conf/type/__apt_backports/manifest @@ -19,7 +19,7 @@ # along with cdist. If not, see . # # -# Enables/disables backports repository. Utilies __apt_source for it. +# Enables/disables backports repository. Utilises __apt_source for it. # @@ -79,3 +79,6 @@ __apt_source "${dist}-backports" \ --distribution "${dist}-backports" \ --component "$components" \ --uri "$mirror" + +# update the index if the source changed +require="__apt_source/${dist}-backports" __apt_update_index