annotate modules/zypprepo/manifests/versionlock.pp @ 465:f6304a8e2adc

Try to fix last day of month HTTP LogWatch LogWatch runs for yesterday's data. And we rotate and zip web logs on the 1st of the month. So on the 1st, when generating the summary for the last day of the month, we need to look at a gzipped file, not the current or old-unzipped file.
author IBBoard <dev@ibboard.co.uk>
date Sun, 25 Feb 2024 09:56:16 +0000
parents 3fce34f642f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 # @summary Locks package from updates.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 #
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 # @example Sample usage
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 # zypprepo::versionlock { 'bash-4.1.2-9.sles12.*': }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 #
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 # @param ensure
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 # Specifies if versionlock should be `present` or `absent`.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 #
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 # @note The resource title must use the format
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 # "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}". This can be retrieved via
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 # the command `rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}'.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 # Wildcards may be used within token slots, but must not cover seperators,
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 # e.g., 'b*sh-4.1.2-9.*' covers Bash version 4.1.2, revision 9 on all
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 # architectures.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 #
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 define zypprepo::versionlock {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 require zypprepo::plugin::versionlock
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 assert_type(Zypprepo::VersionlockString, $name) |$_expected, $actual | {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 fail("Package name must be formatted as %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}, not \'${actual}\'. See Zypprepo::Versionlock documentation for details.")
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 concat::fragment { "zypprepo-versionlock-${name}":
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 content => "\ntype: package\n\
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 match_type: glob\n\
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 case_sensitive: on\n\
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 solvable_name: ${name}\n",
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 target => $zypprepo::plugin::versionlock::path,
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 }