Compare commits

...

4 Commits

Author SHA1 Message Date
lubo 3e82b0085b Make development version strings PEP 440 compliant (#366)
With current pip (23.1.2) and setuptools (67.7.2) versions, installation
from Git was failing with "Invalid version: '7.0.0-17-ge57cf1e7'"
message. The issue can be reproduced by running the following command
with the latest pip and setuptools installed:

  $ pip install git+https://code.ungleich.ch/ungleich-public/cdist.git@e57cf1e70a3818180b3f54e1e0364ff3b6bbd9cc#egg=cdist

Reviewed-on: ungleich-public/cdist#366
Co-authored-by: Ľubomír Kučera <lubomir.kucera.jr@gmail.com>
Co-committed-by: Ľubomír Kučera <lubomir.kucera.jr@gmail.com>
2024-05-01 12:11:07 +00:00
Mark Verboom b7394ff4c2 Locally sort remote group information, to prevent differences in sort output. 2024-05-01 11:58:13 +00:00
fancsali 61fc5e5de8
Fix typo in __apt_pin docs 2024-05-01 13:50:17 +02:00
marcoduif 2b102f303a changed package state from installed to present 2024-03-01 11:43:23 +00:00
5 changed files with 10 additions and 7 deletions

View File

@ -534,7 +534,8 @@ eof
;;
version)
printf "VERSION = \"%s\"\n" "$(git describe)" > cdist/version.py
target_version="$(git describe | sed 's/-/.dev/; s/-/+/g')"
printf "VERSION = \"%s\"\n" "${target_version}" > cdist/version.py
;;
target-version)

View File

@ -23,7 +23,7 @@ package
Package name, glob or regular expression to match (multiple) packages. If not specified `__object_id` is used.
priority
The priority value to assign to matching packages. Deafults to 500. (To match the default target distro's priority)
The priority value to assign to matching packages. Defaults to 500. (To match the default target distro's priority)
state
Will be passed to underlying `__file` type; see there for valid values and defaults.

View File

@ -19,5 +19,5 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
__package luarocks --state installed
__package make --state installed
__package luarocks --state present
__package make --state present

View File

@ -20,4 +20,4 @@
user="$(cat "$__object/parameter/user" 2>/dev/null || echo "$__object_id")"
(id -G -n "$user" | tr ' ' '\n' | sort) 2>/dev/null || true
(id -G -n "$user" | tr ' ' '\n') 2>/dev/null || true

View File

@ -26,13 +26,15 @@ os=$(cat "$__global/explorer/os")
mkdir "$__object/files"
# file has to be sorted for comparison with `comm`
sort "$__object/parameter/group" > "$__object/files/group.sorted"
# Use local sort for remote groups
sort "$__object/explorer/group" > "$__object/files/group-remote.sorted"
case "$state_should" in
present)
changed_groups="$(comm -13 "$__object/explorer/group" "$__object/files/group.sorted")"
changed_groups="$(comm -13 "$__object/files/group-remote.sorted" "$__object/files/group.sorted")"
;;
absent)
changed_groups="$(comm -12 "$__object/explorer/group" "$__object/files/group.sorted")"
changed_groups="$(comm -12 "$__object/files/group-remote.sorted" "$__object/files/group.sorted")"
;;
esac