Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEB Package does not properly respond to any value for OS/ARCH #307

Open
hollowaykeanho opened this issue Mar 31, 2024 · 3 comments
Open
Assignees
Labels
Bug Case is about a glitch. Done and Pending Release Completed and staging for next release.

Comments

@hollowaykeanho
Copy link
Member

Description

When the target OS/ARCH is having any value, the DEB packager refused to package (incompatible candidate). It's likely due to mishap in safety checking.

Expected Behavior

DEB packager allows any target OS and target ARCH value.

Current Behavior

DEB packager rejects any value for both target's OS and target's ARCH.

Steps to Reproduce [COMPULSORY]

  1. build a polygot shell script that offers to any OS and any ARCH functionalities.
  2. run the CI. notice that .deb is not packaged due to incompatible type.

Associated Data Files

No response

@hollowaykeanho hollowaykeanho added the Bug Case is about a glitch. label Mar 31, 2024
@hollowaykeanho hollowaykeanho self-assigned this Mar 31, 2024
@hollowaykeanho
Copy link
Member Author

Proposed fix:

diff --git a/automataCI/_package-deb_unix-any.sh b/automataCI/_package-deb_unix-any.sh
index b42acd0..5b3d576 100644
--- a/automataCI/_package-deb_unix-any.sh
+++ b/automataCI/_package-deb_unix-any.sh
@@ -56,11 +56,11 @@ PACKAGE_Run_DEB() {
         I18N_Check_Availability "DEB"
         DEB_Is_Available "$_target_os" "$_target_arch"
         case $? in
-        2|3)
+        2)
                 I18N_Check_Incompatible_Skipped
                 return 0
                 ;;
-        0)
+        0|3)
                 # accepted
                 ;;
         *)
diff --git a/automataCI/_package-deb_windows-any.ps1 b/automataCI/_package-deb_windows-any.ps1
index 2b1be84..4ec2e8e 100644
--- a/automataCI/_package-deb_windows-any.ps1
+++ b/automataCI/_package-deb_windows-any.ps1
@@ -46,10 +46,10 @@ function PACKAGE-Run-DEB {
        $null = I18N-Check-Availability "DEB"
        $___process = DEB-Is-Available "${_target_os}" "${_target_arch}"
        switch ($___process) {
-       { $_ -in 2, 3 } {
+       2 {
                $null = I18N-Check-Incompatible-Skipped
                return 0
-       } 0 {
+       } {$_ -in 0, 3} {
                # accepted
        } Default {
                $null = I18N-Check-Failed

@hollowaykeanho
Copy link
Member Author

If can, hitch-hike the following in src/.ci/_package-deb*:

@@ -168,6 +168,15 @@ function PACKAGE-Assemble-DEB-Content {
        }
 
 
+       # NOTE: REQUIRED file
+       $null = I18N-Create "${_directory}\control\md5sum"
+       $___process = DEB-Create-Checksum "${_directory}"
+       if ($___process -ne 0) {
+               $null = I18N-Create-Failed
+               return 1
+       }
+
+
        # NOTE: OPTIONAL (Comment to turn it off)
        $null = I18N-Create "source.list"
        $___process = DEB-Create-Source-List `
@@ -183,15 +192,6 @@ function PACKAGE-Assemble-DEB-Content {
        }
 
 
-       # NOTE: REQUIRED file
-       $null = I18N-Create "${_directory}\control\md5sum"
-       $___process = DEB-Create-Checksum "${_directory}"
-       if ($___process -ne 0) {
-               $null = I18N-Create-Failed
-               return 1
-       }
-
-
        # WARNING: THIS REQUIRED FILE MUST BE THE LAST ONE
        $null = I18N-Create "${_directory}\control\control"
        $___process = DEB-Create-Control `

@hollowaykeanho hollowaykeanho added the In Progress Someone is working on the case. label Apr 1, 2024
@hollowaykeanho
Copy link
Member Author

implemented.

@hollowaykeanho hollowaykeanho added Done and Pending Release Completed and staging for next release. and removed In Progress Someone is working on the case. labels Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Case is about a glitch. Done and Pending Release Completed and staging for next release.
Projects
Status: v3.0.0
Development

No branches or pull requests

1 participant