Remove python3-apport as dependency of xserver-xorg

Bug #1773087 reported by Joern Heissler
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

Distro: Bionic
Binary Package: xserver-xorg
Version: 1:7.7+19ubuntu7

Hello!
The package xserver-xorg depends on python3-apport. I don't want to use apport on my systems.
Can the dependency be removed?

Also, it doesn't work anyway. That's how I noticed that the package is installed:

root@00debac04ddf:~# foo
Traceback (most recent call last):
  File "/usr/bin/foo", line 3, in <module>
    raise Exception
Exception
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 145, in apport_excepthook
    os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_foo.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/foo", line 3, in <module>
    raise Exception
Exception

Thanks
Jörn Heissler

Revision history for this message
penalvch (penalvch) wrote :

Jörn Heissler, thank you for reporting this and helping make Ubuntu better.

1) Regarding not using apport, one may disable it as per:
cat /etc/default/apport
# set this to 0 to disable apport, or to 1 to enable it
# you can temporarily override this with
# sudo service apport start force_start=1
enabled=1

2) Regarding apport not working, feel free to file a report about this against the apport package via the following terminal command and include the details of the Traceback:
ubuntu-bug apport

3) Regarding removing the dependency, it likely won't be removed as a dependency due to how apport is a vital function for Ubuntu developers to gather and process crash logs automatically. Given it may be disabled as per above, a compelling case (wider impact positives and negatives) to have apport removed as a dependency hasn't been provided.

Despite this, while this is being marked Won't Fix, the discussion may still continue. If this change is no longer of interest to you, feel free to mark the Status Invalid.

Changed in xorg (Ubuntu):
importance: Undecided → Wishlist
status: New → Won't Fix
penalvch (penalvch)
summary: - don't depend on python3-apport
+ Remove python3-apport as dependency of xserver-xorg
Revision history for this message
Joern Heissler (joernheissler) wrote :

It's perfectly fine if apport and python3-apport are installed by default.
But I don't see how xserver-xorg actually depends on python3-apport. To quote from the Ubuntu Policy Manual:

"""
The Depends field should be used if the depended-on package is required for the depending package to provide a significant amount of functionality.

The Depends field should also be used if the postinst, prerm or postrm scripts require the package to be present in order to run. Note, however, that the postrm cannot rely on any non-essential packages to be present during the purge phase.
"""
Can you please clarify how this applies?

Revision history for this message
penalvch (penalvch) wrote :
Download full text (22.9 KiB)

Jörn Heissler, as mentioned previously, apport (which python3-apport is a dependent of) is used to capture and process program crashes (e.g. xorg and related packages). For more on apport, please see:
https://wiki.ubuntu.com/Apport

apt-rdepends apport
Reading package lists... Done
Building dependency tree
Reading state information... Done
apport
  Depends: gir1.2-glib-2.0 (>= 1.29.17)
  Depends: lsb-base (>= 3.0-6)
  Depends: python3
  Depends: python3-apport (>= 2.20.9-0ubuntu7)
  Depends: python3-gi
gir1.2-glib-2.0
  Depends: libgirepository-1.0-1 (>= 1.45.4)
  Depends: libglib2.0-0 (>= 2.56.1)
libgirepository-1.0-1
  Depends: libc6 (>= 2.14)
  Depends: libffi6 (>= 3.0.4)
  Depends: libglib2.0-0 (>= 2.56.1)
libc6
  Depends: libgcc1
libgcc1
  Depends: gcc-8-base (= 8-20180414-1ubuntu2)
  Depends: libc6 (>= 2.14)
gcc-8-base
libffi6
  Depends: libc6 (>= 2.14)
libglib2.0-0
  Depends: libc6 (>= 2.17)
  Depends: libffi6 (>= 3.0.4)
  Depends: libmount1 (>= 2.19.1)
  Depends: libpcre3
  Depends: libselinux1 (>= 1.32)
  Depends: zlib1g (>= 1:1.2.2)
libmount1
  Depends: libblkid1 (>= 2.17.2)
  Depends: libc6 (>= 2.25)
  Depends: libselinux1 (>= 2.6-3~)
libblkid1
  Depends: libc6 (>= 2.25)
  Depends: libuuid1 (>= 2.16)
libuuid1
  Depends: libc6 (>= 2.25)
libselinux1
  Depends: libc6 (>= 2.14)
  Depends: libpcre3
libpcre3
  Depends: libc6 (>= 2.14)
zlib1g
  Depends: libc6 (>= 2.14)
lsb-base
python3
  Depends: libpython3-stdlib (= 3.6.5-3)
  Depends: python3.6 (>= 3.6.5-2~)
  PreDepends: python3-minimal (= 3.6.5-3)
libpython3-stdlib
  Depends: libpython3.6-stdlib (>= 3.6.5-2~)
libpython3.6-stdlib
  Depends: libbz2-1.0
  Depends: libc6 (>= 2.15)
  Depends: libdb5.3
  Depends: libffi6 (>= 3.0.4)
  Depends: liblzma5 (>= 5.1.1alpha+20120614)
  Depends: libmpdec2
  Depends: libncursesw5 (>= 6)
  Depends: libpython3.6-minimal (= 3.6.5-3)
  Depends: libreadline7 (>= 7.0~beta)
  Depends: libsqlite3-0 (>= 3.5.9)
  Depends: libtinfo5 (>= 6)
  Depends: mime-support
libbz2-1.0
  Depends: libc6 (>= 2.4)
libdb5.3
  Depends: libc6 (>= 2.17)
liblzma5
  Depends: libc6 (>= 2.17)
libmpdec2
  Depends: libc6 (>= 2.14)
libncursesw5
  Depends: libc6 (>= 2.14)
  Depends: libtinfo5 (= 6.1-1ubuntu1)
libtinfo5
  Depends: libc6 (>= 2.16)
libpython3.6-minimal
  Depends: libc6 (>= 2.14)
  Depends: libssl1.1 (>= 1.1.0)
libssl1.1
  Depends: debconf (>= 0.5)
  Depends: debconf-2.0
  Depends: libc6 (>= 2.14)
debconf
  PreDepends: perl-base (>= 5.20.1-3~)
perl-base
  PreDepends: dpkg (>= 1.17.17)
  PreDepends: libc6 (>= 2.23)
dpkg
  Depends: tar (>= 1.28-1)
  PreDepends: libbz2-1.0
  PreDepends: libc6 (>= 2.14)
  PreDepends: liblzma5 (>= 5.2.2)
  PreDepends: libselinux1 (>= 2.3)
  PreDepends: libzstd1 (>= 1.3.2)
  PreDepends: zlib1g (>= 1:1.1.4)
tar
  PreDepends: libacl1 (>= 2.2.51-8)
  PreDepends: libc6 (>= 2.17)
  PreDepends: libselinux1 (>= 1.32)
libacl1
  Depends: libattr1 (>= 1:2.4.46-8)
  Depends: libc6 (>= 2.14)
libattr1
  Depends: libc6 (>= 2.4)
libzstd1
  Depends: libc6 (>= 2.14)
debconf-2.0
libreadline7
  Depends: libc6 (>= 2.15)
  Depends: libtinfo5 (>=...

Changed in xorg (Ubuntu):
status: Won't Fix → Invalid
Revision history for this message
Joern Heissler (joernheissler) wrote :

Caused by #1730035

Revision history for this message
Nish Aravamudan (nacc) wrote :

xserver-xorg now has an apport hook. So in order of ubuntu-bug to work, it is necessary to have python3-apport installed, per LP: #1730035. Definitely not a bug.

Revision history for this message
sordna (sordna) wrote :

Interactive use of python shouldn't invoke apport! On my 19.04 system typing "foo" on the python3 interpreter ends up in this huge ugly mess for no reason:

$ python3
Python 3.7.3 (default, Oct 7 2019, 12:56:13)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> foo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'foo' is not defined
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
    from urllib.request import urlopen
  File "/usr/lib/python3.7/urllib/request.py", line 88, in <module>
    import http.client
  File "/usr/lib/python3.7/http/client.py", line 72, in <module>
    import email.message
  File "/usr/lib/python3.7/email/message.py", line 10, in <module>
    import uu
  File "/var/home/alx/uu.py", line 4, in <module>
    uinput.KEY_L, uinput.KEY_O]) as device:
  File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 178, in __init__
    self.__uinput_fd = fd or fdopen()
  File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 84, in fdopen
    return _libsuinput.suinput_open()
  File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 70, in _open_error_handler
    raise OSError(code, msg)
PermissionError: [Errno 13] Failed to open the uinput device: Permission denied

Original exception was:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'foo' is not defined
>>>

Revision history for this message
penalvch (penalvch) wrote :

sordna, regarding your specific problem, please file a bug against apport via a terminal:
ubuntu-bug apport

In this new report, please copy/paste the reproduction steps, and result as per terminal command.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.