~simpoir/landscape-client-charm/charm_push_target

« back to all changes in this revision

Viewing changes to hooks/stubs.py

  • Committer: 🤖 Landscape Builder
  • Author(s): Adam Collard
  • Date: 2019-04-05 14:05:56 UTC
  • mfrom: (67.1.4 install_sources_keys)
  • Revision ID: _landscape_builder-20190405140556-02pk7xjksbmwjtrm
Add install_sources and install_keys support to landscape-client charm

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        self.installs = []
66
66
        self.package_status = {}
67
67
        self.sources = []
 
68
        self.configured_sources = []
68
69
 
69
70
    def apt_update(self, fatal=False):
70
71
        self.needs_update = False
79
80
 
80
81
    def add_source(self, url, key=None):
81
82
        self.sources.append((url, key))
 
83
 
 
84
    def configure_sources(self, update=False):
 
85
        self.configured_sources.append(True)
 
86
        if update:
 
87
            self.apt_update()