diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2010-04-13 16:44:37 -0500 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2010-04-13 16:45:34 -0500 |
commit | f5d5fef2198da70b2d87c1e8ec8315441a475800 (patch) | |
tree | 0bbdc8c1e023aac17a0804b585f2e25f633c1f02 /src/lib/Client/Frame.py | |
parent | d61537b41f5781790554a3634aa51ef5ffe679d2 (diff) | |
download | bcfg2-f5d5fef2198da70b2d87c1e8ec8315441a475800.tar.gz bcfg2-f5d5fef2198da70b2d87c1e8ec8315441a475800.tar.bz2 bcfg2-f5d5fef2198da70b2d87c1e8ec8315441a475800.zip |
APT: Add sources.list* to __important__ list
Frame: Fix bug in handling of __important__ entries
This should allow people the easier option of configuring their APT
sources in the /etc/sources.list.d dirctory instead of just relying on
sources.list to be correct. This commit also fixes a bug where the
client was relying on a 'ConfigFile' entry tag even in the case where a
Path entry was present.
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
Diffstat (limited to 'src/lib/Client/Frame.py')
-rw-r--r-- | src/lib/Client/Frame.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/Client/Frame.py b/src/lib/Client/Frame.py index b9fabc0ab..95544f8b9 100644 --- a/src/lib/Client/Frame.py +++ b/src/lib/Client/Frame.py @@ -108,6 +108,20 @@ class Frame: except: self.logger.error("Unexpected tool failure", exc_info=1) + for cfile in [cfl for cfl in config.findall(".//Path[@type='file']") \ + if cfl.get('name') in self.__important__]: + tl = [t for t in self.tools if t.handlesEntry(cfile) \ + and t.canVerify(cfile)] + if tl: + if not tl[0].VerifyPath(cfile, []): + if self.setup['interactive'] and not \ + promptFilter("Install %s: %s? (y/N):", [cfile]): + continue + try: + self.states[cfile] = tl[0].InstallPath(cfile) + except: + self.logger.error("Unexpected tool failure", + exc_info=1) # find entries not handled by any tools problems = [entry for struct in config for \ entry in struct if entry not in self.handled] |