amprolla

devuan's apt repo merger
git clone git://parazyd.org/amprolla.git
Log | Files | Refs | README | LICENSE

commit bb2b6a1679b33ff2c4b6e874b7c931655208966e
parent 922535c9e9d39afcf2cb0c384220a0625e04c170
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Fri, 26 May 2017 01:06:41 +0200

Various pylint fixes

Diffstat:
Mamprolla | 17++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/amprolla b/amprolla @@ -1,11 +1,13 @@ #!/usr/bin/env python3 +""" +Amprolla main module +""" from os.path import join from time import time from lib.package import (write_packages, load_packages_file, - merge_packages, merge_packages_many) -from lib.parse import parse_release + merge_packages_many) from lib.config import banpkgs roots = { @@ -31,13 +33,18 @@ debian = load_packages_file(join(roots['debian'], packages_file)) debian_sec = load_packages_file(join(roots['debian-sec'], packages_file)) all_repos = [{'name': 'devuan', 'packages': devuan}, - {'name': 'debian-sec', 'packages': debian_sec}, - {'name': 'debian', 'packages': debian}] + {'name': 'debian-sec', 'packages': debian_sec}, + {'name': 'debian', 'packages': debian}] def devuan_rewrite(pkg, repo_name): + """ + Function to be called when including a certain package. Allows for changing + any attributes. Currently only changes the filename if we include a package + when repo_name == 'devuan'. + """ if repo_name == 'devuan': pkg['Filename'] = pkg['Filename'].replace('pool/', 'pool/%s/' % - repo_name.upper()) + repo_name.upper()) return pkg