Bug 7486 - Traceback from tl-setup when aptbackend fails
Summary: Traceback from tl-setup when aptbackend fails
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Server Installer (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.13.0
Assignee: Samuel Mannehed
URL:
Keywords: nikle_tester, prosaic
Depends on:
Blocks:
 
Reported: 2020-04-08 10:55 CEST by Samuel Mannehed
Modified: 2021-05-06 10:04 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Samuel Mannehed cendio 2020-04-08 10:55:14 CEST
A customer got the following traceback in tl-setup.log when the apt-backend failed to parse /etc/apt/sources.list:


2020-04-01 13:52:14,461: *** tl-setup started ***
2020-04-01 13:52:14,461: Architecture: x86_64
2020-04-01 13:52:14,461: Distribution: Ubuntu
2020-04-01 13:52:14,461: Distribution version: 12.04
2020-04-01 13:52:14,461: Distribution family: Ubuntu
2020-04-01 13:52:14,461: Package format: deb
2020-04-01 13:52:14,461: Creating /usr/bin/python-thinlinc
2020-04-01 13:52:14,461: Creating /usr/bin/thinlinc-login
2020-04-01 13:52:14,895: Traceback (most recent call last):
2020-04-01 13:52:14,896:   File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 308, in <module>
2020-04-01 13:52:14,896:     Oo0O0OOOoo ( )
2020-04-01 13:52:14,896:   File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 265, in Oo0O0OOOoo
2020-04-01 13:52:14,896:     OOooOoooOoOo = OOooo0O00o . run ( )
2020-04-01 13:52:14,896:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 102, in run
2020-04-01 13:52:14,896:     return self . _run_gui ( )
2020-04-01 13:52:14,896:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 133, in _run_gui
2020-04-01 13:52:14,896:     oOOO00o ( IIII )
2020-04-01 13:52:14,896:   File "/opt/thinlinc/modules/thinlinc/tlsetup/requirements.py", line 194, in <lambda>
2020-04-01 13:52:14,896:     Ii1 , IIiiIiI1 , O00O0O0O0 )
2020-04-01 13:52:14,896:   File "/opt/thinlinc/modules/thinlinc/tlsetup/pkginsthelp.py", line 96, in generic_gui_installer
2020-04-01 13:52:14,896:     IIIiI11ii = init ( )
2020-04-01 13:52:14,896:   File "/opt/thinlinc/modules/thinlinc/tlsetup/requirements.py", line 135, in III1ii1iII
2020-04-01 13:52:14,896:     oo0oooooO0 = packageinstaller . create_backend ( )
2020-04-01 13:52:14,896:   File "/opt/thinlinc/modules/thinlinc/packageinstaller/__init__.py", line 31, in create_backend
2020-04-01 13:52:14,896:     return globals ( ) [ OOo0oO0oooOoO ] . Backend ( ) ;
2020-04-01 13:52:14,896:   File "/opt/thinlinc/modules/thinlinc/packageinstaller/aptbackend.py", line 89, in __init__
2020-04-01 13:52:14,896:     self . _cache = apt . Cache ( )
2020-04-01 13:52:14,897:   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__
2020-04-01 13:52:14,897:     self.open(progress)
2020-04-01 13:52:14,897:   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 154, in open
2020-04-01 13:52:14,897:     self._list.read_main_list()
2020-04-01 13:52:14,897: SystemError: E:Type '.' is not known on line 1 in source list /etc/apt/sources.list
Comment 4 Samuel Mannehed cendio 2021-05-05 14:16:23 CEST
Fixed now, tested on Ubuntu 20.04 with a dot added as the first character to '/etc/apt/sources.list'.
Comment 6 Samuel Mannehed cendio 2021-05-05 16:45:29 CEST
The code was modified to catch any type of error from the backend's constructors instead of the specific one raised by apt.cache.
Comment 7 Niko Lehto cendio 2021-05-06 10:04:43 CEST
I could reproduce this with 4.12.1 on Ubuntu 20.04. I also modified sources.list as described in comment #4, and I got a slightly different error message from the one described in comment #1. The error message I got was the following:

>2021-05-06 07:00:28,256: Traceback (most recent call last):
>2021-05-06 07:00:28,256:   File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 308, in <module>
>2021-05-06 07:00:28,256:     Oo0O0OOOoo ( )
>2021-05-06 07:00:28,256:   File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 265, in Oo0O0OOOoo
>2021-05-06 07:00:28,256:     OOooOoooOoOo = OOooo0O00o . run ( )
>2021-05-06 07:00:28,256:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 100, in run
>2021-05-06 07:00:28,256:     return self . _run_text ( )
>2021-05-06 07:00:28,256:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 118, in _run_text
>2021-05-06 07:00:28,256:     oOOO00o ( )
>2021-05-06 07:00:28,257:   File "/opt/thinlinc/modules/thinlinc/tlsetup/requirements.py", line 190, in <lambda>
>2021-05-06 07:00:28,257:     i1I1ii1II1iII )
>2021-05-06 07:00:28,257:   File "/opt/thinlinc/modules/thinlinc/tlsetup/pkginsthelp.py", line 71, in generic_text_installer
>2021-05-06 07:00:28,257:     IIIiI11ii = init ( )
>2021-05-06 07:00:28,257:   File "/opt/thinlinc/modules/thinlinc/tlsetup/requirements.py", line 135, in III1ii1iII
>2021-05-06 07:00:28,257:     oo0oooooO0 = packageinstaller . create_backend ( )
>2021-05-06 07:00:28,257:   File "/opt/thinlinc/modules/thinlinc/packageinstaller/__init__.py", line 31, in create_backend
>2021-05-06 07:00:28,257:     return globals ( ) [ OOo0oO0oooOoO ] . Backend ( ) ;
>2021-05-06 07:00:28,257:   File "/opt/thinlinc/modules/thinlinc/packageinstaller/aptbackend.py", line 89, in __init__
>2021-05-06 07:00:28,257:     self . _cache = apt . Cache ( )
>2021-05-06 07:00:28,257:   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 170, in __init__
>2021-05-06 07:00:28,257:     self.open(progress)
>2021-05-06 07:00:28,257:   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 232, in open
>2021-05-06 07:00:28,257:     self._cache = apt_pkg.Cache(progress)
>2021-05-06 07:00:28,257: Error: E:Malformed entry 1 in list file /etc/apt/sources.list (Suite), E:The list of sources could not be read
This error is however catched and written in the tl-setup.log as intended. So this solution looks good!

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