[gnome-software] trivial: Assemble the flatpak update repo in a better way



commit 2c5a0dfd7209ce8e27570c35648de840172e9b08
Author: Richard Hughes <richard hughsie com>
Date:   Thu Feb 23 16:00:44 2017 +0000

    trivial: Assemble the flatpak update repo in a better way

 data/tests/flatpak/build.py |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/data/tests/flatpak/build.py b/data/tests/flatpak/build.py
index 7dced7f..43720bd 100755
--- a/data/tests/flatpak/build.py
+++ b/data/tests/flatpak/build.py
@@ -48,6 +48,14 @@ def build_flatpak(appid, srcdir, repodir, cleanrepodir=True):
         argv.append('--runtime')
     subprocess.call(argv)
 
+def copy_repo(srcdir, destdir):
+    srcdir_repo = os.path.join(srcdir, 'repo')
+    destdir_repo = os.path.join(destdir, 'repo')
+    print "Copying %s to %s" % (srcdir_repo, destdir_repo)
+    if os.path.exists(destdir_repo):
+        shutil.rmtree(destdir_repo)
+    shutil.copytree(srcdir_repo, destdir_repo)
+
 # normal app with runtime in same remote
 build_flatpak('org.test.Chiron',
               'app-with-runtime',
@@ -63,13 +71,7 @@ build_flatpak('org.test.Chiron',
               'app-missing-runtime/repo')
 
 # app with an update
-build_flatpak('org.test.Chiron',
-              'app-with-runtime',
-              'app-update/repo')
-build_flatpak('org.test.Runtime',
-              'app-with-runtime',
-              'app-update/repo',
-              cleanrepodir=False)
+copy_repo('app-with-runtime', 'app-update')
 build_flatpak('org.test.Chiron',
               'app-update',
               'app-update/repo',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]