~corey.bryant/charms/trusty/keystone/fix-amulet-roles

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/core/host.py

  • Committer: Liam Young
  • Date: 2014-07-29 08:05:41 UTC
  • mfrom: (68.2.24 keystone)
  • Revision ID: liam.young@canonical.com-20140729080541-8twej4w7c1sv1vka
[jamespage,r=gnuoy] Add support for multiple network configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
322
322
    import apt_pkg
323
323
    if not pkgcache:
324
324
        apt_pkg.init()
 
325
        # Force Apt to build its cache in memory. That way we avoid race
 
326
        # conditions with other applications building the cache in the same
 
327
        # place.
 
328
        apt_pkg.config.set("Dir::Cache::pkgcache", "")
325
329
        pkgcache = apt_pkg.Cache()
326
330
    pkg = pkgcache[package]
327
331
    return apt_pkg.version_compare(pkg.current_ver.ver_str, revno)