--- debderiver +++ debderiver_patch3_1_4.py @@ -71,9 +71,9 @@ class Supplementary_Suite(Suite): """Supplementary suite. - This is a suite that can be added to a distribution, i.e. packages from - it complement the principal "distribution" suite. A supplementary suite - usually provides newer package versions or extra functionality (e.g. a + This is a suite that can be added to a distribution, i.e. packages from + it complement the principal "distribution" suite. A supplementary suite + usually provides newer package versions or extra functionality (e.g. a multimedia suite).""" def __init__(self, pocket, distribution): @@ -140,7 +140,7 @@ dist['Components'] = self._DEFAULT_COMPONENT if suite.fake_component_prefix: - dist['Components'] = '/'.join((suite.fake_component_prefix, + dist['Components'] = '/'.join((suite.fake_component_prefix, dist['Components'])) dist['DebIndices'] = ' '.join(('Packages', self._DEFAULT_INDICES)) dist['DscIndices'] = ' '.join(('Sources', self._DEFAULT_INDICES)) @@ -149,7 +149,7 @@ dist['UDebIndices'] = dist['DebIndices'] self._distributions.append(dist) - def _add_filter_list(self, codename, filter_list=None, + def _add_filter_list(self, codename, filter_list=None, dist_codename=None): if not filter_list and not dist_codename: print >> sys.stderr, ('Either filter_list or dist_codename ' @@ -162,13 +162,13 @@ def _add_update(self, suite): upd = {} - upd['FilterSrcList'] = ' '.join(('install', os.path.join('filters', + upd['FilterSrcList'] = ' '.join(('install', os.path.join('filters', suite.codename))) upd['Method'] = suite.upstream.method upd['Name'] = suite.upstream.name upd['Suite'] = suite.upstream.suite if suite.fake_component_prefix: - upd['Suite'] = '/'.join((upd['Suite'], + upd['Suite'] = '/'.join((upd['Suite'], suite.fake_component_prefix)) upd['VerifyRelease'] = suite.upstream.key @@ -255,12 +255,12 @@ print >> sys.stderr, 'Unable to create directory %s.' % \ path - # Reprepro wants some fields after others (e.g. Codename first). - # Sorting them all is the easiest way to do that. We take scalars + # Reprepro wants some fields after others (e.g. Codename first). + # Sorting them all is the easiest way to do that. We take scalars # first, lists second, each alphabetically in so far as reprepro allows. - FIELD_ORDER_DISTS = ('Codename', 'Description', 'FakeComponentPrefix', - 'Label', 'Origin', 'SignWith', 'Suite', 'Update', 'Version', - 'Architectures', 'Components', 'DebIndices', 'DscIndices', + FIELD_ORDER_DISTS = ('Codename', 'Description', 'FakeComponentPrefix', + 'Label', 'Origin', 'SignWith', 'Suite', 'Update', 'Version', + 'Architectures', 'Components', 'DebIndices', 'DscIndices', 'UDebComponents', 'UDebIndices') dist_path = os.path.join(self._conf_path, 'distributions') f_dist = open(dist_path, 'w') @@ -280,10 +280,10 @@ f_upd.close() # First write real filter files, then create links. - for fl in [f for f in self._filter_lists.items() if + for fl in [f for f in self._filter_lists.items() if not isinstance(f[1], basestring)]: self._write_filter_file(fl[0], fl[1]) - for fl in [f for f in self._filter_lists.items() if + for fl in [f for f in self._filter_lists.items() if isinstance(f[1], basestring)]: self._link_filter_file(fl[0], fl[1]) @@ -305,8 +305,8 @@ temp_dir_path f_inc = open(incoming_path, 'w') f_inc.write('Name: all\n') - f_inc.write('Allow: ' + - ' '.join([' '.join([d['Codename'], d['Suite']]) for d in + f_inc.write('Allow: ' + + ' '.join([' '.join([d['Codename'], d['Suite']]) for d in self._distributions]) + '\n') f_inc.write('IncomingDir: ' + incoming_dir_path + '\n') f_inc.write('TempDir: ' + temp_dir_path + '\n') @@ -390,7 +390,7 @@ print >> sys.stderr, 'No distributions defined.' sys.exit(1) for dist in dists: - if not isinstance(dists[dist], dict): + if not isinstance(dists[dist], dict): print >> sys.stderr, 'Distribution %s, no properties defined.' % \ dist sys.exit(1)