[gnome-software/fix-flatpak-related-progress: 3/11] flatpak: Fix app extension in tests



commit 5d967901ad1143d8d80ab7b799a93cb46bdf9d28
Author: Matthew Leeds <matthew leeds endlessm com>
Date:   Thu Jul 9 13:37:10 2020 -0700

    flatpak: Fix app extension in tests
    
    Unlike other runtimes, extensions use a "files" subdirectory when
    building instead of "usr". So fix the test app extension and build.py to
    account for that. Also modify chiron.flatpak and flatpakrepos.tar.gz as
    a result of running build.py

 .../org.test.Chiron.Extension/.gitignore            |   1 +
 .../{usr => files}/share/libtest/README             |   0
 .../metainfo/org.test.Chiron.Extension.metainfo.xml |   0
 .../org.test.Chiron.Extension/usr/.gitignore        |   1 -
 .../org.test.Chiron.Extension/.gitignore            |   1 +
 .../{usr => files}/share/libtest/README             |   0
 .../metainfo/org.test.Chiron.Extension.metainfo.xml |   0
 .../org.test.Chiron.Extension/usr/.gitignore        |   1 -
 plugins/flatpak/tests/build.py                      |   3 ++-
 plugins/flatpak/tests/chiron.flatpak                | Bin 5316 -> 5452 bytes
 plugins/flatpak/tests/flatpakrepos.tar.gz           | Bin 59930 -> 72252 bytes
 11 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/.gitignore 
b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/.gitignore
new file mode 100644
index 00000000..db00ec8c
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/.gitignore
@@ -0,0 +1 @@
+files/share/app-info
diff --git a/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/libtest/README 
b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/files/share/libtest/README
similarity index 100%
rename from plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/libtest/README
rename to plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/files/share/libtest/README
diff --git 
a/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
 
b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/files/share/metainfo/org.test.Chiron.Extension.metainfo.xml
similarity index 100%
rename from 
plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
rename to 
plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/files/share/metainfo/org.test.Chiron.Extension.metainfo.xml
diff --git a/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/.gitignore 
b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/.gitignore
new file mode 100644
index 00000000..db00ec8c
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/.gitignore
@@ -0,0 +1 @@
+files/share/app-info
diff --git a/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/share/libtest/README 
b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/files/share/libtest/README
similarity index 100%
rename from plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/share/libtest/README
rename to plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/files/share/libtest/README
diff --git 
a/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
 
b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/files/share/metainfo/org.test.Chiron.Extension.metainfo.xml
similarity index 100%
rename from 
plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
rename to 
plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/files/share/metainfo/org.test.Chiron.Extension.metainfo.xml
diff --git a/plugins/flatpak/tests/build.py b/plugins/flatpak/tests/build.py
index c1d61a93..acc7e665 100755
--- a/plugins/flatpak/tests/build.py
+++ b/plugins/flatpak/tests/build.py
@@ -23,9 +23,10 @@ def build_flatpak(appid, srcdir, repodir, branch='master', cleanrepodir=True):
     metadata = configparser.ConfigParser()
     metadata.read(metadata_path)
     is_runtime = True if 'Runtime' in metadata.sections() else False
+    is_extension = True if 'ExtensionOf' in metadata.sections() else False
 
     # runtimes have different defaults
-    if is_runtime:
+    if is_runtime and not is_extension:
         prefix = 'usr'
     else:
         prefix = 'files'
diff --git a/plugins/flatpak/tests/chiron.flatpak b/plugins/flatpak/tests/chiron.flatpak
index b0fc314b..ce038e9c 100644
Binary files a/plugins/flatpak/tests/chiron.flatpak and b/plugins/flatpak/tests/chiron.flatpak differ
diff --git a/plugins/flatpak/tests/flatpakrepos.tar.gz b/plugins/flatpak/tests/flatpakrepos.tar.gz
index e85bb28d..f8bcfde6 100644
Binary files a/plugins/flatpak/tests/flatpakrepos.tar.gz and b/plugins/flatpak/tests/flatpakrepos.tar.gz 
differ


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