Bug 7671 - install-server fails on Ubuntu 20.10 when no python-apt is found.
Summary: install-server fails on Ubuntu 20.10 when no python-apt is found.
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Server Installer (show other bugs)
Version: 4.12.1
Hardware: PC Linux Ubuntu
: P2 Normal
Target Milestone: 4.13.0
Assignee: Samuel Mannehed
Keywords: nikle_tester, ossman_tester, relnotes
Depends on:
Reported: 2021-03-30 08:58 CEST by Martin Östlund
Modified: 2021-06-01 17:07 CEST (History)
3 users (show)

See Also:
Acceptance Criteria:


Description Martin Östlund cendio 2021-03-30 08:58:58 CEST
Fresh installation of Ubuntu 20.10 with Thinlinc 4.12.1

root@cendio-virtual-machine:/home/cendio/tl-4.12.1-server# ./install-server 

Error: python-apt not found.

python-apt is required for ThinLinc's setup program.

To install python-apt, please run this command:

    apt install python-apt

Would you like to run this command now?

(Y/n)? y

$ apt install python-apt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-apt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python-apt-doc python3-apt-dbg:i386 python3-apt:i386 python3-apt-dbg python3-apt python-apt-common

E: Package 'python-apt' has no installation candidate

Installation failed. Please report this issue to ThinLinc support.
Visit https://www.cendio.com/thinlinc/support for information on how to contact us.

Expected Results:
Perhaps fallback on the package manager and install with dpkg
Comment 1 Pierre Ossman cendio 2021-03-30 09:05:18 CEST
We don't require any of the other backends (dnf, yum, zypper) so we shouldn't have a hard requirement on apt either.
Comment 4 Samuel Mannehed cendio 2021-05-05 17:30:00 CEST
This has now been fixed, reproduced the problem and verified the fix on a Ubuntu 20.10 machine.
Comment 6 Niko Lehto cendio 2021-05-07 11:02:46 CEST
Reproduced this issue on Ubuntu 20.10 with 4.12.1. Tested on build 2052 (on Ubuntu 20.10) and we now can continue installation without python-apt. Relnotes now looks good!
Comment 7 William Sjöblom cendio 2021-05-17 13:01:35 CEST
Assuming `python-apt` is not installed but available and that the user chooses to install it automatically, you encounter a problem where the target program is invoked twice in a row.

This stems from that `_do_install` is invoked in a subshell is `syscheck.sh`. If the installation of `python-apt` succeeds, `_do_install` invokes `exec $0 $@` in the new subshell. 

For example:
1. We run `install-server` which invokes `syscheck.sh`
2. `install-server` invokes `_do_install` in a new subshell:
  1. `_do_install` is successful and invokes `exec install-server`
  2. `install-server` invokes `tlinstaller`
  3. We walk through the installer and are dropped out of the subshell
3. Execution continues in `syscheck.sh` after where we spawned the new subshell
4. `syscheck.sh` terminates, we return to `install-server`
5. `install-server` starts `tlinstaller` once again
Comment 9 Samuel Mannehed cendio 2021-05-19 17:22:55 CEST
Once we convert the installer to Python 3 syscheck.sh will look for Python 3 packages. The relevant package in this context is 'python3-apt'.

I checked Debian 9, Debian 10, Ubuntu 16.04 and Ubuntu 20.04 and all four include 'python3-apt' by default.

Since we're moving to Python 3 - we no longer need this code at all.
Comment 10 Pierre Ossman cendio 2021-05-20 10:31:23 CEST
Can't find any traces of the check, installation or references to them in the tree.

Release notes aren't as obviously correct now that we've removed the code rather than change it. But it's probably better than no release notes as this might have been an issue that people have hit.

Checked a minimal install of Ubuntu 18.04 where python3-apt is indeed installed. Removing it is possible, but removes some standard packages such as "unattended-upgrades", "apport" and "command-not-found". As such is is very unlikely there will be a system without this package.

Note You need to log in before you can comment on or make changes to this bug.