[gnome-software] flatpak: Don't use local checkout for flatpak cmd



commit b682a7fb94cb178035d4dbb06f846fb3f7e93d6c
Author: Matthew Leeds <matthew leeds endlessm com>
Date:   Tue Jan 21 10:56:02 2020 -0800

    flatpak: Don't use local checkout for flatpak cmd
    
    Using a local checkout of flatpak at a hard-coded path for the 'flatpak'
    command is of course bad for portability, but also bad because the
    flatpak plugin might link against a different libflatpak (e.g. the
    installed one).

 plugins/flatpak/tests/build.py | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/plugins/flatpak/tests/build.py b/plugins/flatpak/tests/build.py
index aadf6e04..35ea0792 100755
--- a/plugins/flatpak/tests/build.py
+++ b/plugins/flatpak/tests/build.py
@@ -19,13 +19,6 @@ def build_flatpak(appid, srcdir, repodir, branch='master', cleanrepodir=True):
         print("Deleting %s" % exportdir)
         shutil.rmtree(exportdir)
 
-    # use git master where available
-    local_checkout = '/home/hughsie/Code/flatpak'
-    if os.path.exists(local_checkout):
-        flatpak_cmd = os.path.join(local_checkout, 'flatpak')
-    else:
-        flatpak_cmd = 'flatpak'
-
     metadata_path = os.path.join(srcdir, appid, 'metadata')
     metadata = configparser.ConfigParser()
     metadata.read(metadata_path)
@@ -38,7 +31,7 @@ def build_flatpak(appid, srcdir, repodir, branch='master', cleanrepodir=True):
         prefix = 'files'
 
     # finish the build
-    argv = [flatpak_cmd, 'build-finish']
+    argv = ['flatpak', 'build-finish']
     argv.append(os.path.join(srcdir, appid))
     subprocess.call(argv)
 
@@ -52,7 +45,7 @@ def build_flatpak(appid, srcdir, repodir, branch='master', cleanrepodir=True):
     subprocess.call(argv)
 
     # export into repo
-    argv = [flatpak_cmd, 'build-export']
+    argv = ['flatpak', 'build-export']
     argv.append(repodir)
     argv.append(os.path.join(srcdir, appid))
     argv.append(branch)


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