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

Option parsing failed: Unknown option --appimage-version #1187

Open
lalten opened this issue Apr 2, 2022 · 6 comments
Open

Option parsing failed: Unknown option --appimage-version #1187

lalten opened this issue Apr 2, 2022 · 6 comments

Comments

@lalten
Copy link
Contributor

lalten commented Apr 2, 2022

I cloned the repo and ran ARCH=x86_64 ci/build.sh. It fails with

+ /tmp/appimage-test-0oPFX/appimagetool-x86_64.AppImage --version
appimagetool, continuous build (commit 672b3d0), build <local dev build> built on 2022-04-02 11:42:47 UTC
+ /tmp/appimage-test-0oPFX/appimagetool-x86_64.AppImage --appimage-version
Option parsing failed: Unknown option --appimage-version
+ error
+ echo 'Error: command failed'
Error: command failed

Interestingly this does not happen on the CI builds (e.g. the latest)... Any hint what I'm doing wrong?

Full log: https://pastebin.com/N6LMW5dn

@lcarlotto
Copy link

lcarlotto commented Oct 7, 2022

I also have the same problem, performed the clone of the project, already at the first compilation:

execute:
env ARCH=x86_64 bash ci/build.sh

+ /tmp/appimage-test-Wz66k/appimagetool-x86_64.AppImage --version
appimagetool, continuous build (commit b719a7f), build <local dev build> built on 2022-10-07 06:32:21 UTC
+ /tmp/appimage-test-Wz66k/appimagetool-x86_64.AppImage --appimage-version
Option parsing failed: Unknown option --appimage-version
+ error
+ echo 'Error: command failed'
Error: command failed
+ exit 1
+ cleanup
+ [[ -d /tmp/appimage-test-Wz66k ]]
+ rm -r /tmp/appimage-test-Wz66k

In addition, the "AppImageKit/out" folder is present and contains the generated files, it is not deleted by build.sh.

@lcarlotto
Copy link

The problem occurs on the second test:

# print version and update information
"$appimagetool" --version || error  # should not fail
"$appimagetool" --appimage-version || error  # should not fail
"$appimagetool" --appimage-updateinformation || error  # should not fail

but if I run the same test on the files in the / out folder, everything works.

The problem is quite minor, as it occurs just before it finishes, blocking the deletion of temporary files and the modification of file names:

# remove binaries from output directory
ls -al out/
rm out/appimagetool
rm out/{validate,digest}

# make sure the runtime contains the magic bytes
hexdump -Cv out/runtime | head -n 1 | grep "41 49 02 00"
# fix filename for upload
mv out/runtime out/runtime-"$ARCH"

# fix filename for upload
mv out/AppRun out/AppRun-"$ARCH"

@msojocs
Copy link

msojocs commented May 13, 2024

image

same problem, the program can not identify " --appimage-version"

@msojocs
Copy link

msojocs commented May 13, 2024

image

I think there has a problem with the second environment.

@msojocs
Copy link

msojocs commented May 13, 2024

image

The block of "APPIMAGE_EXTRACT_AND_RUN" is executed too early, we need to move it behind "updateinformation".

So, we can see the successful information.

image

@probonopd
Copy link
Member

I tested this with https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage from https://github.com/AppImage/appimagetool/releases/tag/continuous and it seems to be working with that version, which is using https://github.com/AppImage/type2-runtime internally:

$ Downloads/appimagetool-x86_64.AppImage --appimage-version
AppImage runtime version: https://github.com/AppImage/type2-runtime/commit/0899763

The binaries in this repo will soon be superseded by the ones I mentioned, so it's probably not worth to backport the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants