diff options
author | Phaedrus Leeds <mwleeds@protonmail.com> | 2021-10-25 16:41:21 -0700 |
---|---|---|
committer | Alexander Larsson <alexander.larsson@gmail.com> | 2021-11-15 11:25:30 +0100 |
commit | ad169f122401a2ba14d061bec82b0309958fd6a4 (patch) | |
tree | eb3c710a40a58c2d51e80a1fbe5ccc7ef0881ec0 /tests/test-repo.sh | |
parent | 49d9052d2248de8b5f3c4c1c6ca7dfceefcbcd2f (diff) | |
download | flatpak-ad169f122401a2ba14d061bec82b0309958fd6a4.tar.gz |
transaction: Utilize runtime repo info for origin remote
Many of the fields allowed in flatpakrepo files are not allowed in
flatpakref files, e.g. Comment, Description, Homepage, etc. So there is
no straightforward way to ensure those are set correctly when the user
installs something with a flatpakref file. However in most cases the
repo specified by the RuntimeRepo key is also the repo providing the
main ref, so in those cases it makes sense to utilize all the metadata
provided in the flatpakrepo file when creating a remote to provide
updates for the app being installed. We were already doing this when the
SuggestRemoteName key was unset; this commit makes it so that we utilize
that metadata also when SuggestRemoteName is present.
Diffstat (limited to 'tests/test-repo.sh')
-rw-r--r-- | tests/test-repo.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test-repo.sh b/tests/test-repo.sh index 58867420..63d49048 100644 --- a/tests/test-repo.sh +++ b/tests/test-repo.sh @@ -24,7 +24,7 @@ set -euo pipefail skip_without_bwrap skip_revokefs_without_fuse -echo "1..41" +echo "1..42" #Regular repo setup_repo @@ -185,7 +185,7 @@ cat << EOF > repos/flatpakref/flatpakref-repo.flatpakrepo [Flatpak Repo] Version=1 Url=http://127.0.0.1:$(cat httpd-port)/flatpakref/ -Title=The Title +Title=The Remote Title GPGKey=${FL_GPG_BASE64} EOF @@ -198,6 +198,7 @@ cat << EOF > org.test.Hello.flatpakref Name=org.test.Hello Branch=master Url=http://127.0.0.1:$(cat httpd-port)/flatpakref +SuggestRemoteName=allthegoodstuff GPGKey=${FL_GPG_BASE64} RuntimeRepo=http://127.0.0.1:$(cat httpd-port)/flatpakref/flatpakref-repo.flatpakrepo EOF @@ -216,6 +217,10 @@ fi ok "install flatpakref normalizes remote URL trailing slash" +assert_remote_has_config allthegoodstuff xa.title "The Remote Title" + +ok "install flatpakref uses RuntimeRepo metadata for remote" + ${FLATPAK} ${U} uninstall -y org.test.Platform org.test.Hello if ${FLATPAK} ${U} install -y test-missing-gpg-repo org.test.Platform 2> install-error-log; then |