diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-24 03:07:06 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-06-29 16:28:45 +0200 |
commit | 967e84a1e924f72324f2133adf84391f1dee6f74 (patch) | |
tree | ed698987370d90e2ddc91352dfaa1e96ef1f9a3d /src/lib/Bcfg2/Client/Frame.py | |
parent | c5bcd76878db440ae72bce08edbb5d3715d76883 (diff) | |
download | bcfg2-967e84a1e924f72324f2133adf84391f1dee6f74.tar.gz bcfg2-967e84a1e924f72324f2133adf84391f1dee6f74.tar.bz2 bcfg2-967e84a1e924f72324f2133adf84391f1dee6f74.zip |
Client: allow pre-Actions and important-Paths to enable installs
This is used to first update the apt repositories and than install
all current versions in one bcfg2-run. Also the installation of
software from custom repositories (that are configured on the client
via bcfg2) should be possible on the first run.
Diffstat (limited to 'src/lib/Bcfg2/Client/Frame.py')
-rw-r--r-- | src/lib/Bcfg2/Client/Frame.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/lib/Bcfg2/Client/Frame.py b/src/lib/Bcfg2/Client/Frame.py index 3254da9e9..55578f490 100644 --- a/src/lib/Bcfg2/Client/Frame.py +++ b/src/lib/Bcfg2/Client/Frame.py @@ -170,15 +170,8 @@ class Frame(object): return self.__dict__[name] raise AttributeError(name) - def InstallImportant(self): - """Install important entries - - We also process the decision mode stuff here because we want to prevent - non-whitelisted/blacklisted 'important' entries from being installed - prior to determining the decision mode on the client. - """ - # Need to process decision stuff early so that dryrun mode - # works with it + def GenerateActions(self): + """Generate list of all entries that have to be handled""" self.whitelist = [entry for entry in self.states if not self.states[entry]] if not self.setup['file']: @@ -205,6 +198,17 @@ class Frame(object): self.whitelist = [x for x in self.whitelist if x not in b_to_rem] + def InstallImportant(self): + """Install important entries + + We also process the decision mode stuff here because we want to prevent + non-whitelisted/blacklisted 'important' entries from being installed + prior to determining the decision mode on the client. + """ + # Need to process decision stuff early so that dryrun mode + # works with it + self.GenerateActions() + # take care of important entries first if not self.dryrun: parent_map = dict((c, p) @@ -486,6 +490,9 @@ class Frame(object): self.CondDisplayState('initial') self.InstallImportant() self.Decide() + if self.modified: + self.Inventory() + self.GenerateActions() self.Install() self.times['install'] = time.time() self.Remove() |