__apt_mark improvements #159
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ungleich-public/cdist#159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: 4nd3r
__apt_mark needs 1 or 2 improvements.
first there should be check if package is installed (if not, then exit) and secondly apt version check.
apt-mark holdis supproted since wheezy which is also oldest supported debian release. but life is more difficult and there's probably enough squeezes and lennys in production in somewhat closed networks and running that type against squeeze or older will output error.about package check. since explorers are run with
-eflag... is it okay when explorer just fails? or where should the package presence check should be? there's no need to run apt-mark when package isn't installed. maybe cdist needs separate explorer(s) to check existence of package and its version?Created by: telmich
Re package installed: completely agree - you should use an explorer for this. In the same way you can check the apt version and abort in the manifest, if the apt version is too low (which is a good check because someone might backport it to lenny - so we cannot rely on the distribution version)
Basically for this case create the two explorers to keep the type closed - it does not depend on others. Afair the return code of an explorer is not checked, as you only use the output of an explorer anyway. If it fails, the output will be empty and you have to deal with it either in the type that uses an explorer (for global explorers) or in this particular case you would use 2 type explorers, which it is up to you to define "proper" behaviour.
In general, empty output is concerned as an error.
HTH
Created by: 4nd3r
@telmich @darko-poljak can you give me some feedback? thanks.