core: default 'include_in_backups' to negative of 'installed_by_rpm'

As we allow to backup template, even if installed by rpm, it makes sense
to not include such templates in backup by default.
This commit is contained in:
Marek Marczykowski-Górecki 2015-03-31 05:49:13 +02:00
parent b3899ba81a
commit 0b0dbfd1e7

View File

@ -146,7 +146,9 @@ class QubesVm(object):
else defaults["kernelopts_pcidevs"] if len(self.pcidevs)>0 \ else defaults["kernelopts_pcidevs"] if len(self.pcidevs)>0 \
else defaults["kernelopts"] }, else defaults["kernelopts"] },
"mac": { "attr": "_mac", "default": None }, "mac": { "attr": "_mac", "default": None },
"include_in_backups": { "default": True }, "include_in_backups": {
"func": lambda x: x if x is not None
else not self.installed_by_rpm },
"services": { "services": {
"default": {}, "default": {},
"func": lambda value: eval(str(value)) }, "func": lambda value: eval(str(value)) },