- `--state` allows to remove a deb-package, if `--purge-if-absent` is
specified the package is purged instead of "only" removed
- messaging was added
- man-page updated accordingly
Configuration files are not purged under Debian when the package
is deinstalled. If this parameter is given, they are deleted upon
package deinstallation.
When directly piping in the source of a systemd unit file, cdist
errored out. This is due to not propagating the stdin file to the
underlying __config_file type (which already contains code for this
case, but this has to be duplicated in __systemd_unit).
The following example thus works:
__systemd_unit test.service --source - <<EOF
[Service]
ExecStart=/bin/sleep 3600
EOF
Some pre/post-install scripts rely on them being open.
(It would be bette to leave them open and show the output, but I didn't
want to change the behaviour)
If `regex` begins with an hyphen, `grep` treats it as an option
and treats `file` as the regular expression. This leads to `grep`
trying to read from the standard input and making it wait infinitely.
This patch adds the missing argument breaker `--` and allows
`regex` to begin with an hyphen (provided it is called correctly).
* __systemd_unit: Move systemctl detection to manifest
* __systemd_unit: Restart the unit if inactive
Until now, the --restart parameter caused the unit to be restarted
only when the unit file has changed. This commit modifies --restart
behavior so that the unit is also restarted when the unit is inactive.
* __systemd_unit: Do not create unit file when source is empty
The pkg_version explorer will fail to properly detect if a package
is installed when a package's name is present in the description of
a package (as returned by pkg_info).
Currently, trying to install libtool fails due to incorrect parsing:
$ pkg_info | grep libtool
libltdl-2.4.2p1 GNU libtool system independent dlopen wrapper
Additionally, trying to install nagios results in the following output:
$ pkg_info | grep nagios
nagios-4.0.8p3-chroot host and service monitor
nagios-web-4.0.8p2-chroot cgis and webpages for nagios
This commit fixes detection by properly parsing pkg_info's output.
Specifically, descriptions are ignored and package names are properly
extracted.