From 39946dbc9895e538d12822a3184a00163f3d73a8 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Wed, 10 Jan 2018 11:51:04 +0100 Subject: [PATCH 1/3] pkglistgen: use xdg.BaseDirectory --- pkglistgen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkglistgen.py b/pkglistgen.py index 6ce6bca6..f1d8a775 100755 --- a/pkglistgen.py +++ b/pkglistgen.py @@ -40,6 +40,7 @@ from osc.core import undelete_package from osc import conf from osclib.conf import Config from osclib.stagingapi import StagingAPI +from xdg.BaseDirectory import save_cache_path import glob import solv from pprint import pprint, pformat @@ -1054,8 +1055,7 @@ class CommandLineInterface(ToolBase.CommandLineInterface): # Cache dir specific to hostname and project. host = urlparse.urlparse(apiurl).hostname - cache_dir = os.environ.get('XDG_CACHE_HOME', os.path.expanduser('~/.cache')) - cache_dir = os.path.join(cache_dir, 'opensuse-packagelists', host, opts.project) + cache_dir = save_cache_path('opensuse-packagelists', host, opts.project) if os.path.exists(cache_dir): shutil.rmtree(cache_dir) From cf09e4199554967eeb70c90e18ec85b4e2e74db2 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Wed, 10 Jan 2018 14:03:47 +0100 Subject: [PATCH 2/3] pkglistgen: add correct staging DVD repo --- pkglistgen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkglistgen.py b/pkglistgen.py index f1d8a775..8162416c 100755 --- a/pkglistgen.py +++ b/pkglistgen.py @@ -1014,8 +1014,9 @@ class CommandLineInterface(ToolBase.CommandLineInterface): if api.rings: opts_dvd = copy.deepcopy(opts) opts_dvd.project += ':DVD' - self.options.repos.insert(0, '/'.join([opts.project, main_repo])) + self.options.repos.insert(0, '/'.join([opts_dvd.project, main_repo])) self.update_and_solve_target(apiurl, target_project, target_config, main_repo, opts_dvd, skip_release=True) + self.options.repos.pop(0) self.update_and_solve_target(apiurl, target_project, target_config, main_repo, opts) return From 67f2773e7676adbdaf029c7456154891b71a3a58 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Wed, 10 Jan 2018 14:10:17 +0100 Subject: [PATCH 3/3] pkglistgen: typo locals vs locales --- osclib/conf.py | 2 +- pkglistgen.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osclib/conf.py b/osclib/conf.py index bb8bd0a5..12325b77 100644 --- a/osclib/conf.py +++ b/osclib/conf.py @@ -72,7 +72,7 @@ DEFAULT = { 'repo-checker': 'repo-checker', 'pkglistgen-archs': 'x86_64', 'pkglistgen-archs-ports': 'aarch64', - 'pkglistgen-locals-from': 'openSUSE.product', + 'pkglistgen-locales-from': 'openSUSE.product', 'pkglistgen-include-suggested': '1', 'pkglistgen-delete-kiwis': 'openSUSE-ftp-ftp-x86_64.kiwi openSUSE-cd-mini-x86_64.kiwi', }, diff --git a/pkglistgen.py b/pkglistgen.py index 8162416c..1f4575aa 100755 --- a/pkglistgen.py +++ b/pkglistgen.py @@ -1088,7 +1088,7 @@ class CommandLineInterface(ToolBase.CommandLineInterface): opts.ignore_recommended = bool(target_config.get('pkglistgen-ignore-recommended')) opts.include_suggested = bool(target_config.get('pkglistgen-include-suggested')) opts.locale = target_config.get('pkglistgen-local') - opts.locales_from = target_config.get('pkglistgen-locals-from') + opts.locales_from = target_config.get('pkglistgen-locales-from') self.do_solve('solve', opts) delete_products = target_config.get('pkglistgen-delete-products', '').split(' ')