Skip to content

Commit

Permalink
root: fixed flatpak's unresponsive to 'any' value in OS/ARCH bug
Browse files Browse the repository at this point in the history
It appears the flatpak packager is not responsive to 'any' value
for OS/ARCH fields. Hence, we need to fix it.

This patch fixes flatpak's unresponsiveness to 'any' value in
OS/ARCH field bug.

Co-authored-by: Shuralyov, Jean <jean.shuralyov@proton.me>
Co-authored-by: Galyna, Cory <cory.galyna@gmail.com>
Co-authored-by: (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com>
Signed-off-by: (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com>
  • Loading branch information
3 people committed May 21, 2024
1 parent 35f510b commit 36df3ec
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions automataCI/_package-flatpak_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ PACKAGE_Run_FLATPAK() {
I18N_Check_Availability "FLATPAK"
FLATPAK_Is_Available "$_target_os" "$_target_arch"
case $? in
2|3)
2)
I18N_Check_Incompatible_Skipped
return 0
;;
0)
0|3)
;;
*)
I18N_Check_Failed
Expand Down
4 changes: 2 additions & 2 deletions automataCI/_package-flatpak_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ function PACKAGE-Run-FLATPAK {
$null = I18N-Check-Availability "FLATPAK"
$___process = FLATPAK-Is-Available "${_target_os}" "${_target_arch}"
switch ($___process) {
{ $_ -in 2, 3 } {
2 {
$null = I18N-Check-Incompatible-Skipped
return 0
} 0 {
} { $_ -in 0, 3 } {
break
} Default {
$null = I18N-Check-Failed
Expand Down
2 changes: 1 addition & 1 deletion automataCI/services/compilers/flatpak.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function FLATPAK-Is-Available {

# check compatible target os
switch ($___os) {
linux {
{ $_ -in linux, any } {
# accepted
} Default {
return 2
Expand Down
2 changes: 1 addition & 1 deletion automataCI/services/compilers/flatpak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ FLATPAK_Is_Available() {

# check compatible target os
case "$___os" in
linux)
linux|any)
# accepted
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion src/.ci/_package-flatpak_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ PACKAGE_Assemble_FLATPAK_Content() {
return 10 # not applicable
elif [ $(FS_Is_Target_A_PDF "$_target") -eq 0 ]; then
return 10 # not applicable
elif [ ! "$_target_os" = "linux" ]; then
elif [ ! "$_target_os" = "linux" ] && [ ! "$_target_os" = "any" ]; then
return 10 # not applicable
fi

Expand Down
2 changes: 1 addition & 1 deletion src/.ci/_package-flatpak_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function PACKAGE-Assemble-FLATPAK-Content {
return 10 # not applicable
} elseif ($(FS-Is-Target-A-PDF "${_target}") -eq 0) {
return 10 # not applicable
} elseif ($_target_os -ne "linux") {
} elseif (($_target_os -ne "linux") -and ($_target_os -ne "any")) {
return 10 # not applicable
}

Expand Down

0 comments on commit 36df3ec

Please sign in to comment.