~stub/charms/trusty/nrpe/chsync

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/fetch/__init__.py

  • Committer: Stuart Bishop
  • Date: 2016-07-15 06:02:57 UTC
  • Revision ID: stuart.bishop@canonical.com-20160715060257-rp95phvt376qwreh
Resync charm-helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
    return _pkgs
179
179
 
180
180
 
181
 
def apt_cache(in_memory=True):
 
181
def apt_cache(in_memory=True, progress=None):
182
182
    """Build and return an apt cache"""
183
183
    from apt import apt_pkg
184
184
    apt_pkg.init()
185
185
    if in_memory:
186
186
        apt_pkg.config.set("Dir::Cache::pkgcache", "")
187
187
        apt_pkg.config.set("Dir::Cache::srcpkgcache", "")
188
 
    return apt_pkg.Cache()
 
188
    return apt_pkg.Cache(progress)
189
189
 
190
190
 
191
191
def apt_install(packages, options=None, fatal=False):