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

When AppDir contains a space character, apt package installation fails #322

Open
git-developer opened this issue Sep 13, 2023 · 0 comments

Comments

@git-developer
Copy link

appimage-builder fails when an apt package is installed and the AppDir contains a space character:

INFO:AptPackageDeploy:Deploying libselinux1_3.3-1build2_amd64.deb to /github/workspace/Custom AppDir
dpkg-deb: error: --extract takes at most two arguments (.deb and directory)

Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --help for help about installing and deinstalling packages.
ERROR:root:"/usr/bin/dpkg-deb -x /github/workspace/appimage-build/apt/archives/libselinux1_3.3-1build2_amd64.deb /github/workspace/Custom AppDir" execution failed
Traceback (most recent call last):
  File "/usr/local/bin/appimage-builder", line 8, in <module>
    sys.exit(__main__())
  File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/__main__.py", line 50, in __main__
    invoker.execute(commands)
  File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/invoker.py", line 29, in execute
    command()
  File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/commands/apt_deploy.py", line 46, in __call__
    deployed_packages = apt_deploy.deploy(
  File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 43, in deploy
    extracted_packages = self._extract_packages(appdir_root, deploy_list)
  File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 82, in _extract_packages
    self.apt_venv.extract_package(package, final_target)
  File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/modules/deploy/apt/venv.py", line 227, in extract_package
    shell.assert_successful_result(output)
  File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/utils/shell.py", line 35, in assert_successful_result
    raise RuntimeError(
RuntimeError: "/usr/bin/dpkg-deb -x /github/workspace/appimage-build/apt/archives/libselinux1_3.3-1build2_amd64.deb /github/workspace/Custom AppDir" execution failed with code 2

I think the problem is this join call:

command = " ".join([str(self._deps["dpkg-deb"]), "-x", str(path), str(target)])

Removing the join could fix the problem:

command = [str(self._deps["dpkg-deb"]), "-x", str(path), str(target)]
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

1 participant