AppImageCrafters / appimage-builder

GNU/Linux packaging solution using the AppImage format
MIT License
316 stars 58 forks source link

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

Open solsticedhiver opened 1 year ago

solsticedhiver commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

solstice

did you succeed?

solsticedhiver commented 1 year ago

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