~junaidali/charms/trusty/plumgrid-gateway/liberty

« back to all changes in this revision

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

  • Committer: Junaid Ali
  • Date: 2016-04-18 12:43:41 UTC
  • mfrom: (20.1.15 plumgrid-gateway)
  • Revision ID: junaidali@plumgrid.com-20160418124341-evlhx4h0oijbd79x
Liberty changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
    'kilo/proposed': 'trusty-proposed/kilo',
91
91
    'trusty-kilo/proposed': 'trusty-proposed/kilo',
92
92
    'trusty-proposed/kilo': 'trusty-proposed/kilo',
 
93
    # Liberty
 
94
    'liberty': 'trusty-updates/liberty',
 
95
    'trusty-liberty': 'trusty-updates/liberty',
 
96
    'trusty-liberty/updates': 'trusty-updates/liberty',
 
97
    'trusty-updates/liberty': 'trusty-updates/liberty',
 
98
    'liberty/proposed': 'trusty-proposed/liberty',
 
99
    'trusty-liberty/proposed': 'trusty-proposed/liberty',
 
100
    'trusty-proposed/liberty': 'trusty-proposed/liberty',
 
101
    # Mitaka
 
102
    'mitaka': 'trusty-updates/mitaka',
 
103
    'trusty-mitaka': 'trusty-updates/mitaka',
 
104
    'trusty-mitaka/updates': 'trusty-updates/mitaka',
 
105
    'trusty-updates/mitaka': 'trusty-updates/mitaka',
 
106
    'mitaka/proposed': 'trusty-proposed/mitaka',
 
107
    'trusty-mitaka/proposed': 'trusty-proposed/mitaka',
 
108
    'trusty-proposed/mitaka': 'trusty-proposed/mitaka',
93
109
}
94
110
 
95
111
# The order of this list is very important. Handlers should be listed in from
217
233
 
218
234
def apt_mark(packages, mark, fatal=False):
219
235
    """Flag one or more packages using apt-mark"""
 
236
    log("Marking {} as {}".format(packages, mark))
220
237
    cmd = ['apt-mark', mark]
221
238
    if isinstance(packages, six.string_types):
222
239
        cmd.append(packages)
223
240
    else:
224
241
        cmd.extend(packages)
225
 
    log("Holding {}".format(packages))
226
242
 
227
243
    if fatal:
228
244
        subprocess.check_call(cmd, universal_newlines=True)
403
419
                importlib.import_module(package),
404
420
                classname)
405
421
            plugin_list.append(handler_class())
406
 
        except (ImportError, AttributeError):
 
422
        except NotImplementedError:
407
423
            # Skip missing plugins so that they can be ommitted from
408
424
            # installation if desired
409
425
            log("FetchHandler {} not found, skipping plugin".format(