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

deploying package with apt throws an error in version.py #311

Open
solsticedhiver opened this issue Apr 6, 2023 · 3 comments
Open

deploying package with apt throws an error in version.py #311

solsticedhiver opened this issue Apr 6, 2023 · 3 comments

Comments

@solsticedhiver
Copy link

Using appimage-builder from pypi installed with pip in a virtualenv, and using the following AppImageBiulder.yml:

version: 1
script:
 - rm -rf AppDir || true
 - cp -r build/linux/x64/release/bundle AppDir
   # - chrpath -d AppDir/flarte
   #- chrpath -d AppDir/lib/libmedia_kit_video_plugin.so
   #- chrpath -d AppDir/lib/libmedia_kit_libs_linux_plugin.so
   #- chrpath -d AppDir/lib/libflutter_linux_gtk.so
 - mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
 - mv AppDir/lib/ AppDir/usr/
 - cp flutter-mark-square-64.png AppDir/usr/share/icons/hicolor/64x64/apps/
AppDir:
  path: ./AppDir
  app_info:
    id: org.appimagecrafters.flarte
    name: Flarte
    icon: flutter-mark-square-64
    version: latest
    exec: flarte
    exec_args: $@
  apt:
    arch: amd64
    allow_unauthenticated: true
    sources:
    - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
      key_url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C
    - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
      key_url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C
    - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
      key_url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C
    - sourceline: deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse
      key_url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C
    include:
    - libgtk-3-0
    - mpv
    - libmpv-dev
    exclude:
    - humanity-icon-theme
    - hicolor-icon-theme
    - adwaita-icon-theme
    - ubuntu-mono
  files:
    exclude:
    - usr/share/man
    - usr/share/doc/*/README.*
    - usr/share/doc/*/changelog.*
    - usr/share/doc/*/NEWS.*
    - usr/share/doc/*/TODO.*
  test:
    fedora:
      image: appimagecrafters/tests-env:fedora-30
      command: ./AppRun
      use_host_x: true
    debian:
      image: appimagecrafters/tests-env:debian-stable
      command: ./AppRun
      use_host_x: true
    arch:
      image: appimagecrafters/tests-env:archlinux-latest
      command: ./AppRun
      use_host_x: true
    centos:
      image: appimagecrafters/tests-env:centos-7
      command: ./AppRun
      use_host_x: true
    ubuntu:
      image: appimagecrafters/tests-env:ubuntu-xenial
      command: ./AppRun
      use_host_x: true
AppImage:
  arch: x86_64
  update-information: guess
  sign-key: None

One gets, the following error:

$ appimage-builder
INFO:main:Running main script
rm -rf AppDir || true
cp -r build/linux/x64/release/bundle AppDir
mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
mv AppDir/lib/ AppDir/usr/
cp flutter-mark-square-64.png AppDir/usr/share/icons/hicolor/64x64/apps/
INFO:main:Running apt deploy
INFO:apt:Download key file: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C
INFO:apt:apt-get update
R\u00e9ception de\u00a0:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
R\u00e9ception de\u00a0:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
R\u00e9ception de\u00a0:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
R\u00e9ception de\u00a0:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB]
607 ko r\u00e9ceptionn\u00e9s en 1s (1\u202f035 ko/s)
Lecture des listes de paquets... Fait
Traceback (most recent call last):
  File "/home/solstice/appimage-flarte/appimage-builder/bin/appimage-builder", line 8, in <module>
    sys.exit(__main__())
  File "/home/solstice/appimage-flarte/appimage-builder/lib/python3.10/site-packages/appimagebuilder/__main__.py", line 50, in __main__
    invoker.execute(commands)
  File "/home/solstice/appimage-flarte/appimage-builder/lib/python3.10/site-packages/appimagebuilder/invoker.py", line 29, in execute
    command()
  File "/home/solstice/appimage-flarte/appimage-builder/lib/python3.10/site-packages/appimagebuilder/commands/apt_deploy.py", line 46, in __call__
    deployed_packages = apt_deploy.deploy(
  File "/home/solstice/appimage-flarte/appimage-builder/lib/python3.10/site-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 39, in deploy
    self._prepare_apt_venv()
  File "/home/solstice/appimage-flarte/appimage-builder/lib/python3.10/site-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 55, in _prepare_apt_venv
    apt_core_packages = self._remove_old_packages(apt_core_packages)
  File "/home/solstice/appimage-flarte/appimage-builder/lib/python3.10/site-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 93, in _remove_old_packages
    if package > latest_packages[pkg_tuple]:
  File "/home/solstice/appimage-flarte/appimage-builder/lib/python3.10/site-packages/appimagebuilder/modules/deploy/apt/package.py", line 79, in __gt__
    return version.parse(self.version) > version.parse(other.version)
  File "/home/solstice/appimage-flarte/appimage-builder/lib/python3.10/site-packages/packaging/version.py", line 52, in parse
    return Version(version)
  File "/home/solstice/appimage-flarte/appimage-builder/lib/python3.10/site-packages/packaging/version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '1.21.1ubuntu2'
@solsticedhiver
Copy link
Author

solsticedhiver commented Apr 6, 2023

it works with the 1.1.0 AppImage. wt... yet another bug where it works with one version and not the other. See #309

@afl-dev
Copy link

afl-dev commented Oct 8, 2023

solstice

did you succeed?

@solsticedhiver
Copy link
Author

I have nothing to add than the above.
I have given up on appimage to package my app.

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

2 participants