Hello community,

here is the log from the commit of package openSUSE-release-tools for 
openSUSE:Factory checked in at 2018-09-07 15:40:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
 and      /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openSUSE-release-tools"

Fri Sep  7 15:40:20 2018 rev:126 rq:633513 version:20180905.c5ceab9

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes
    2018-09-04 22:58:00.741378180 +0200
+++ 
/work/SRC/openSUSE:Factory/.openSUSE-release-tools.new/openSUSE-release-tools.changes
       2018-09-07 15:40:29.310466357 +0200
@@ -1,0 +2,9 @@
+Wed Sep 05 19:28:45 UTC 2018 - opensuse-releaset...@opensuse.org
+
+- Update to version 20180905.c5ceab9:
+  * osclib/cache: provide mechanism to init multiple times.
+  * Utilize CacheManager for all existing caches.
+  * osclib/cache_manager: provide general cache manager for all tools.
+  * osclib/common: provide project name and version constants.
+
+-------------------------------------------------------------------

Old:
----
  openSUSE-release-tools-20180901.9e8018f.obscpio

New:
----
  openSUSE-release-tools-20180905.c5ceab9.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.tTbNA1/_old  2018-09-07 15:40:29.966465654 +0200
+++ /var/tmp/diff_new_pack.tTbNA1/_new  2018-09-07 15:40:29.966465654 +0200
@@ -20,7 +20,7 @@
 %define source_dir openSUSE-release-tools
 %define announcer_filename factory-package-news
 Name:           openSUSE-release-tools
-Version:        20180901.9e8018f
+Version:        20180905.c5ceab9
 Release:        0
 Summary:        Tools to aid in staging and release work for openSUSE/SUSE
 License:        GPL-2.0-or-later AND MIT

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.tTbNA1/_old  2018-09-07 15:40:30.014465603 +0200
+++ /var/tmp/diff_new_pack.tTbNA1/_new  2018-09-07 15:40:30.014465603 +0200
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param 
name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param>
-    <param 
name="changesrevision">e1ec1aa412450a2179e050d170945aeeb37c072f</param>
+    <param 
name="changesrevision">3b8ae3174c16650f23ef8d939dd74a5b5c0b6fca</param>
   </service>
 </servicedata>

++++++ openSUSE-release-tools-20180901.9e8018f.obscpio -> 
openSUSE-release-tools-20180905.c5ceab9.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openSUSE-release-tools-20180901.9e8018f/.travis.yml 
new/openSUSE-release-tools-20180905.c5ceab9/.travis.yml
--- old/openSUSE-release-tools-20180901.9e8018f/.travis.yml     2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/.travis.yml     2018-09-05 
21:23:21.000000000 +0200
@@ -85,7 +85,7 @@
 cache:
   directories:
     # obs_clone.py
-    - ~/.cache/openSUSE-release-tools-clone
+    - ~/.cache/openSUSE-release-tools/request/clone
     # distribution jobs `osc build`
     - .docker-tmp
   pip: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openSUSE-release-tools-20180901.9e8018f/Makefile 
new/openSUSE-release-tools-20180905.c5ceab9/Makefile
--- old/openSUSE-release-tools-20180901.9e8018f/Makefile        2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/Makefile        2018-09-05 
21:23:21.000000000 +0200
@@ -18,8 +18,8 @@
        for i in osc-*.py osclib; do ln -s $(pkgdatadir)/$$i 
$(DESTDIR)$(oscplugindir)/$$i; done
        for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
        install -m 644 systemd/* $(DESTDIR)$(unitdir)
-       sed -i "s/OSC_STAGING_VERSION = '.*'/OSC_STAGING_VERSION = 
'$(VERSION)'/" \
-         $(DESTDIR)$(pkgdatadir)/osc-staging.py
+       sed -i "s/VERSION = '.*'/VERSION = '$(VERSION)'/" \
+         $(DESTDIR)$(pkgdatadir)/osclib/common.py
        for i in $(pkgdata_BINS); do ln -s $(pkgdatadir)/$$i 
$(DESTDIR)$(bindir)/osrt-$${i%.*}; done
        install -m 755 script/* $(DESTDIR)$(bindir)
        ln -s $(pkgdatadir)/metrics/access/aggregate.php 
$(DESTDIR)$(bindir)/osrt-metrics-access-aggregate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/docs/metrics.md 
new/openSUSE-release-tools-20180905.c5ceab9/docs/metrics.md
--- old/openSUSE-release-tools-20180901.9e8018f/docs/metrics.md 2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/docs/metrics.md 2018-09-05 
21:23:21.000000000 +0200
@@ -46,7 +46,7 @@
 by saving the dashboard with different defaults.
 
 Use the `--debug` option and inspect individual request XML dumps by looking in
-`~/.cache/openSUSE-release-tools-metrics` or:
+`~/.cache/openSUSE-release-tools/request/metrics` or:
 
 ```
 osc api '/request/$reqid?withfullhistory=1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/legal-auto.py 
new/openSUSE-release-tools-20180905.c5ceab9/legal-auto.py
--- old/openSUSE-release-tools-20180901.9e8018f/legal-auto.py   2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/legal-auto.py   2018-09-05 
21:23:21.000000000 +0200
@@ -26,6 +26,7 @@
 
 import osc.conf
 import osc.core
+from osclib.cache_manager import CacheManager
 import ReviewBot
 
 from osclib.comments import CommentAPI
@@ -189,8 +190,7 @@
         self.delete_from_db(req.reqid)
 
     def _pkl_path(self):
-        CACHE_DIR = os.path.expanduser('~/.cache/osc-plugin-factory')
-        return os.path.join(CACHE_DIR, 'legaldb')
+        return CacheManager.directory('legal-auto')
 
     def update_project(self, project):
         try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/metrics/access/README.md 
new/openSUSE-release-tools-20180905.c5ceab9/metrics/access/README.md
--- old/openSUSE-release-tools-20180901.9e8018f/metrics/access/README.md        
2018-09-01 19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/metrics/access/README.md        
2018-09-05 21:23:21.000000000 +0200
@@ -22,7 +22,7 @@
 - `aggregate.php`: invoke to manage entire process including calling 
(`ingest.php`)
 - `ingest.php`: used to parse a single log file / stream and dump summary JSON 
to stdout
 
-See `~/.cache/openSUSE-release-tools-access` for cache data separated by IP 
protocol. A single JSON file corresponds to a single access log file.
+See `~/.cache/openSUSE-release-tools/metrics-access` for cache data separated 
by IP protocol. A single JSON file corresponds to a single access log file.
 
 ## Future product versions
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/metrics/access/aggregate.php 
new/openSUSE-release-tools-20180905.c5ceab9/metrics/access/aggregate.php
--- old/openSUSE-release-tools-20180901.9e8018f/metrics/access/aggregate.php    
2018-09-01 19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/metrics/access/aggregate.php    
2018-09-05 21:23:21.000000000 +0200
@@ -4,7 +4,7 @@
 use InfluxDB\Point;
 use InfluxDB\Database;
 
-$CACHE_DIR = $_SERVER['HOME'] . '/.cache/openSUSE-release-tools-access';
+$CACHE_DIR = $_SERVER['HOME'] . 
'/.cache/openSUSE-release-tools/metrics-access';
 const PROTOCOLS = ['ipv4', 'ipv6'];
 const PONTIFEX = 'http://pontifex.infra.opensuse.org/logs';
 const LANGLEY = 'http://langley.suse.de/pub/pontifex%s-opensuse.suse.de';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openSUSE-release-tools-20180901.9e8018f/metrics.py 
new/openSUSE-release-tools-20180905.c5ceab9/metrics.py
--- old/openSUSE-release-tools-20180901.9e8018f/metrics.py      2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/metrics.py      2018-09-05 
21:23:21.000000000 +0200
@@ -544,14 +544,13 @@
 
     # Use separate cache since it is persistent.
     _, package = project_pseudometa_package(apiurl, args.project)
-    Cache.CACHE_DIR = Cache.CACHE_DIR + '-metrics'
     if args.wipe_cache:
         Cache.delete_all()
     if args.heavy_cache:
         Cache.PATTERNS['/search/request'] = sys.maxint
         Cache.PATTERNS['/source/[^/]+/{}/_history'.format(package)] = 
sys.maxint
     Cache.PATTERNS['/source/[^/]+/{}/[^/]+\?rev=.*'.format(package)] = 
sys.maxint
-    Cache.init()
+    Cache.init('metrics')
 
     Config(apiurl, args.project)
     api = StagingAPI(apiurl, args.project)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openSUSE-release-tools-20180901.9e8018f/obs_clone.py 
new/openSUSE-release-tools-20180905.c5ceab9/obs_clone.py
--- old/openSUSE-release-tools-20180901.9e8018f/obs_clone.py    2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/obs_clone.py    2018-09-05 
21:23:21.000000000 +0200
@@ -212,12 +212,11 @@
 
     if args.cache:
         from osclib.cache import Cache
-        Cache.CACHE_DIR = Cache.CACHE_DIR + '-clone'
         Cache.PATTERNS = {}
         # Prevent caching source information from local clone.
         Cache.PATTERNS['/source/[^/]+/[^/]+/[^/]+?rev'] = 0
         Cache.PATTERNS['.*'] = Cache.TTL_LONG * 2
-        Cache.init()
+        Cache.init('clone')
 
     osc.conf.config['debug'] = args.debug
     project_fence.project = args.project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/osc-staging.py 
new/openSUSE-release-tools-20180905.c5ceab9/osc-staging.py
--- old/openSUSE-release-tools-20180901.9e8018f/osc-staging.py  2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/osc-staging.py  2018-09-05 
21:23:21.000000000 +0200
@@ -39,15 +39,12 @@
 from osclib.supersede_command import SupersedeCommand
 from osclib.prio_command import PrioCommand
 
-OSC_STAGING_VERSION = '0.0.1'
-
 
 def _print_version(self):
-    """ Print version information about this extension. """
-    print(OSC_STAGING_VERSION)
+    from osclib.common import VERSION
+    print(VERSION)
     quit(0)
 
-
 def _full_project_name(self, project):
     """Deduce the full project name."""
     if project.startswith(('openSUSE', 'SUSE')):
@@ -392,6 +389,9 @@
         else:
             opts.project = 'Factory'
 
+    # Cache the remote config fetch.
+    Cache.init()
+
     # Init the OBS access and configuration
     opts.project = self._full_project_name(opts.project)
     opts.apiurl = self.get_api_url()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/osclib/cache.py 
new/openSUSE-release-tools-20180905.c5ceab9/osclib/cache.py
--- old/openSUSE-release-tools-20180901.9e8018f/osclib/cache.py 2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/osclib/cache.py 2018-09-05 
21:23:21.000000000 +0200
@@ -12,6 +12,7 @@
 from StringIO import StringIO
 from osc import conf
 from osc.core import urlopen
+from osclib.cache_manager import CacheManager
 from time import time
 
 try:
@@ -64,7 +65,7 @@
     cache, but obviously not for other contributors.
     """
 
-    CACHE_DIR = os.path.expanduser('~/.cache/openSUSE-release-tools')
+    CACHE_DIR = None
     TTL_LONG = 12 * 60 * 60
     TTL_MEDIUM = 30 * 60
     TTL_SHORT = 5 * 60
@@ -101,7 +102,14 @@
     last_updated = {}
 
     @staticmethod
-    def init():
+    def init(directory='main'):
+        if Cache.CACHE_DIR:
+            # Stick with the first initialization to allow for StagingAPI to
+            # ensure always enabled, but allow parent to change directory.
+            return
+
+        Cache.CACHE_DIR = CacheManager.directory('request', directory)
+
         Cache.patterns = []
         for pattern in Cache.PATTERNS:
             Cache.patterns.append(re.compile(pattern))
@@ -249,6 +257,9 @@
 
     @staticmethod
     def path(url, project, include_file=False, makedirs=False):
+        if not Cache.CACHE_DIR:
+            raise Exception('Cache.init() must be called first')
+
         parts = [Cache.CACHE_DIR]
 
         o = urlparse.urlsplit(url)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/osclib/cache_manager.py 
new/openSUSE-release-tools-20180905.c5ceab9/osclib/cache_manager.py
--- old/openSUSE-release-tools-20180901.9e8018f/osclib/cache_manager.py 
1970-01-01 01:00:00.000000000 +0100
+++ new/openSUSE-release-tools-20180905.c5ceab9/osclib/cache_manager.py 
2018-09-05 21:23:21.000000000 +0200
@@ -0,0 +1,133 @@
+from __future__ import print_function
+import os
+from osclib.common import NAME
+import shutil
+import sys
+from time import time
+from xdg.BaseDirectory import save_cache_path
+
+# Provide general cache management in the form of directory location and pruned
+# contents. Of the variety of caches utilized there will be content that will
+# cease to be useful, but never get cleaned up since it will never be accessed.
+# This manager ensures that the entire cache is pruned periodically to remove
+# files that have not been accessed recently and avoid endless growth.
+class CacheManager(object):
+    DIRECTORY = save_cache_path(NAME)
+    PRUNE_FREQUENCY = 60 * 60 * 24 * 7
+    PRUNE_TTL = 60 * 60 * 24 * 30
+
+    pruned = False
+
+    @staticmethod
+    def directory(*args):
+        CacheManager.prune_all()
+        return os.path.join(CacheManager.DIRECTORY, *args)
+
+    @staticmethod
+    def directory_test():
+        if not CacheManager.DIRECTORY.endswith('.test'):
+            CacheManager.DIRECTORY = os.path.join(CacheManager.DIRECTORY, 
'.test')
+
+    @staticmethod
+    def prune_all():
+        if CacheManager.pruned:
+            return
+        CacheManager.pruned = True
+
+        prune_lock = os.path.join(CacheManager.DIRECTORY, '.prune')
+        if not os.path.exists(prune_lock):
+            CacheManager.migrate()
+        elif time() - os.stat(prune_lock).st_mtime < 
CacheManager.PRUNE_FREQUENCY:
+            return
+
+        with open(prune_lock, 'a'):
+            os.utime(prune_lock, None)
+
+        print('> pruning cache', file=sys.stderr)
+
+        accessed_prune = time() - CacheManager.PRUNE_TTL
+        files_pruned = 0
+        bytes_pruned = 0
+        for directory, subdirectories, files in 
os.walk(CacheManager.DIRECTORY):
+            files_pruned_directory = 0
+            for filename in files:
+                path = os.path.join(directory, filename)
+                stat = os.stat(path)
+                accessed = stat.st_atime
+                if accessed < accessed_prune:
+                    files_pruned_directory += 1
+                    files_pruned += 1
+                    bytes_pruned += stat.st_size
+                    os.remove(path)
+
+            if len(subdirectories) == 0 and len(files) - 
files_pruned_directory == 0:
+                os.rmdir(directory)
+
+        print('> pruned {:,} files comprised of {:,} bytes'.format(
+            files_pruned, bytes_pruned), file=sys.stderr)
+
+    # Migrate the variety of prior cache locations within a single parent.
+    @staticmethod
+    def migrate(first=True):
+        # If a old path exists then perform migration.
+        cache_root = save_cache_path('')
+        for source, destination in CacheManager.migrate_paths():
+            if not os.path.exists(source):
+                continue
+
+            if first:
+                print('> migrating caches', file=sys.stderr)
+
+                # Move existing dir out of the way in order to nest.
+                cache_moved = CacheManager.DIRECTORY + '-main'
+                if not os.path.exists(cache_moved):
+                    os.rename(CacheManager.DIRECTORY, cache_moved)
+
+                # Detected need to migrate, but may have already passed -main.
+                CacheManager.migrate(False)
+                return
+
+            # If either incompatible format, explicit removal, or newer source
+            # was already migrated remove the cache entirely.
+            if destination and os.path.exists(destination):
+                # Set to None to make clear in message.
+                destination = None
+
+            print(
+                '> - {} -> {}'.format(
+                    os.path.relpath(source, cache_root),
+                    os.path.relpath(destination, cache_root) if destination 
else None),
+                file=sys.stderr)
+
+            if not destination:
+                shutil.rmtree(source)
+                continue
+
+            # Ensure parent directory exists and then move within.
+            destination_parent = os.path.dirname(destination)
+            if not os.path.exists(destination_parent):
+                os.makedirs(destination_parent)
+            os.rename(source, destination)
+
+    @staticmethod
+    def migrate_paths():
+        path_map = {
+            '{}-access': 'metrics-access',
+            '{}-clone': 'request/clone',
+            '{}-metrics': 'request/metrics',
+            '{}-main': 'request/main',
+            '{}-test': None,
+            'opensuse-packagelists': 'pkglistgen',
+            'opensuse-repo-checker': 'repository-meta',
+            'opensuse-repo-checker-http': None,
+            'osc-plugin-factory': None,
+        }
+        bases = [NAME, 'osc-plugin-factory']
+        cache_root = save_cache_path('')
+        for base in bases:
+            for source, destination in path_map.items():
+                source = os.path.join(cache_root, source.format(base))
+                if destination:
+                    destination = os.path.join(CacheManager.DIRECTORY, 
destination)
+
+                yield source, destination
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/osclib/common.py 
new/openSUSE-release-tools-20180905.c5ceab9/osclib/common.py
--- old/openSUSE-release-tools-20180901.9e8018f/osclib/common.py        
1970-01-01 01:00:00.000000000 +0100
+++ new/openSUSE-release-tools-20180905.c5ceab9/osclib/common.py        
2018-09-05 21:23:21.000000000 +0200
@@ -0,0 +1,2 @@
+NAME = 'openSUSE-release-tools'
+VERSION = '0.0.0-dev'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/osclib/git.py 
new/openSUSE-release-tools-20180905.c5ceab9/osclib/git.py
--- old/openSUSE-release-tools-20180901.9e8018f/osclib/git.py   2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/osclib/git.py   2018-09-05 
21:23:21.000000000 +0200
@@ -1,9 +1,10 @@
 import os
 from os import path
+from osclib.cache_manager import CacheManager
 import subprocess
-from xdg.BaseDirectory import save_cache_path
 
-CACHE_DIR = save_cache_path('openSUSE-release-tools', 'git')
+# Git will not be happy if pruned, but not used enough to be worth excluding.
+CACHE_DIR = CacheManager.directory('git')
 
 def clone(url, directory):
     return_code = subprocess.call(['git', 'clone', url, directory])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/osclib/memoize.py 
new/openSUSE-release-tools-20180905.c5ceab9/osclib/memoize.py
--- old/openSUSE-release-tools-20180901.9e8018f/osclib/memoize.py       
2018-09-01 19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/osclib/memoize.py       
2018-09-05 21:23:21.000000000 +0200
@@ -2,26 +2,15 @@
 import fcntl
 from functools import wraps
 import os
+from osclib.cache_manager import CacheManager
 import shelve
 try:
     import cPickle as pickle
 except:
     import pickle
 
-
-try:
-    from xdg.BaseDirectory import save_cache_path
-except ImportError:
-    from xdg.BaseDirectory import xdg_cache_home
-
-    def save_cache_path(*name):
-        path = os.path.join(xdg_cache_home, *name)
-        if not os.path.isdir(path):
-            os.makedirs(path)
-        return path
-
 # Where the cache files are stored
-CACHEDIR = save_cache_path('opensuse-repo-checker')
+CACHEDIR = CacheManager.directory('memoize')
 
 
 def memoize(ttl=None, session=False, add_invalidate=False):
@@ -175,10 +164,7 @@
             _close_cache(cache)
             return value
 
-        cache_dir = os.path.expanduser(CACHEDIR)
-        if not os.path.exists(cache_dir):
-            os.makedirs(cache_dir)
-        cache_name = os.path.join(cache_dir, fn.__name__)
+        cache_name = os.path.join(CACHEDIR, fn.__name__)
         return _fn
 
     ttl = ttl if ttl else TIMEOUT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/pkglistgen.py 
new/openSUSE-release-tools-20180905.c5ceab9/pkglistgen.py
--- old/openSUSE-release-tools-20180901.9e8018f/pkglistgen.py   2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/pkglistgen.py   2018-09-05 
21:23:21.000000000 +0200
@@ -19,12 +19,12 @@
 from osc.core import show_results_meta
 from osc.core import undelete_package
 from osc import conf
+from osclib.cache_manager import CacheManager
 from osclib.conf import Config, str2bool
 from osclib.core import repository_path_expand
 from osclib.stagingapi import StagingAPI
 from osclib.util import project_list_family
 from osclib.util import project_list_family_prior
-from xdg.BaseDirectory import save_cache_path
 import glob
 import hashlib
 import io
@@ -47,7 +47,7 @@
 import ToolBase
 
 # share header cache with repochecker
-from osclib.memoize import CACHEDIR
+CACHEDIR = CacheManager.directory('repository-meta')
 
 logger = logging.getLogger()
 
@@ -1235,7 +1235,7 @@
 
         # Cache dir specific to hostname and project.
         host = urlparse.urlparse(api.apiurl).hostname
-        cache_dir = save_cache_path('opensuse-packagelists', host, 
opts.project)
+        cache_dir = CacheManager.directory('pkglistgen', host, opts.project)
 
         if not opts.no_checkout:
             if os.path.exists(cache_dir):
@@ -1298,7 +1298,7 @@
         if drop_list:
             # Ensure solv files from all releases in product family are 
updated.
             print('-> solv_cache_update')
-            cache_dir_solv = save_cache_path('opensuse-packagelists', 'solv')
+            cache_dir_solv = CacheManager.directory('pkglistgen', 'solv')
             family_last = target_config.get('pkglistgen-product-family-last')
             family_include = 
target_config.get('pkglistgen-product-family-include')
             solv_prior = self.solv_cache_update(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/rebuildpacs.pl 
new/openSUSE-release-tools-20180905.c5ceab9/rebuildpacs.pl
--- old/openSUSE-release-tools-20180901.9e8018f/rebuildpacs.pl  2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/rebuildpacs.pl  2018-09-05 
21:23:21.000000000 +0200
@@ -175,7 +175,8 @@
   my $repo = shift;
   my $arch = shift;
 
-  my $repodir = 
($ENV{XDG_CACHE_HOME}||$ENV{HOME}."/.cache")."/opensuse-repo-checker/repo-$project-$repo-$arch";
+  # Old and new in single directory, but never deployed together.
+  my $repodir = 
($ENV{XDG_CACHE_HOME}||$ENV{HOME}."/.cache")."/openSUSE-release-tools/repository-meta/repo-$project-$repo-$arch";
   mkdir($repodir);
 
   system(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180901.9e8018f/repo_checker.py 
new/openSUSE-release-tools-20180905.c5ceab9/repo_checker.py
--- old/openSUSE-release-tools-20180901.9e8018f/repo_checker.py 2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/repo_checker.py 2018-09-05 
21:23:21.000000000 +0200
@@ -14,6 +14,7 @@
 import sys
 import tempfile
 
+from osclib.cache_manager import CacheManager
 from osclib.conf import Config
 from osclib.conf import str2bool
 from osclib.core import BINARY_REGEX
@@ -31,12 +32,12 @@
 from osclib.core import repositories_published
 from osclib.core import target_archs
 from osclib.cycle import CycleDetector
-from osclib.memoize import CACHEDIR
 from osclib.memoize import memoize
 from osclib.util import sha1_short
 
 import ReviewBot
 
+CACHEDIR = CacheManager.directory('repository-meta')
 SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__))
 CheckResult = namedtuple('CheckResult', ('success', 'comment'))
 INSTALL_REGEX = r"^(?:can't install (.*?)|found conflict of (.*?) with 
(.*?)):$"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openSUSE-release-tools-20180901.9e8018f/tests/obs.py 
new/openSUSE-release-tools-20180905.c5ceab9/tests/obs.py
--- old/openSUSE-release-tools-20180901.9e8018f/tests/obs.py    2018-09-01 
19:32:23.000000000 +0200
+++ new/openSUSE-release-tools-20180905.c5ceab9/tests/obs.py    2018-09-05 
21:23:21.000000000 +0200
@@ -13,6 +13,7 @@
 import httpretty
 import osc
 from osclib.cache import Cache
+from osclib.cache_manager import CacheManager
 
 
 APIURL = 'http://localhost'
@@ -114,9 +115,8 @@
         """Instance constructor."""
         self.fixtures = fixtures
 
-        if not hasattr(Cache, '_CACHE_DIR'):
-            Cache._CACHE_DIR = True
-            Cache.CACHE_DIR += '-test'
+        CacheManager.directory_test()
+        Cache.init()
         Cache.delete_all()
         httpretty.enable()
 

++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.tTbNA1/_old  2018-09-07 15:40:30.670464900 +0200
+++ /var/tmp/diff_new_pack.tTbNA1/_new  2018-09-07 15:40:30.670464900 +0200
@@ -1,5 +1,5 @@
 name: openSUSE-release-tools
-version: 20180901.9e8018f
-mtime: 1535823143
-commit: 9e8018fe24a5251c66014f5d786ee5c41ea43028
+version: 20180905.c5ceab9
+mtime: 1536175401
+commit: c5ceab9ee153985c620fb8b409048ac06d60813d
 


Reply via email to