apport package hook works properly only if we are in $HOME dir
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cheese (Ubuntu) |
Triaged
|
High
|
Unassigned |
Bug Description
Chdir to any dir except $HOME.
Run
ubuntu-bug cheese
(You probably should install cheese before doing this.)
Answer the questions and press Send button.
A dialog says:
[Errno 2] No such file or directory: '.cache/
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: apport 2.20.9-0ubuntu7.2
ProcVersionSign
Uname: Linux 4.15.0-23-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Jun 25 19:19:36 2018
InstallationDate: Installed on 2018-06-23 (1 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_IL
SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)
This is actually an issue with the apport package hook for cheese, found in /usr/share/ apport/ package- hooks/source_ cheese. py. Here's the offending code:
HOME = os.path. expanduser( "~")
def add_info(report, ui):
add_tags = []
response = ui.information( "Before continuing, please close Cheese if it is already running!\n\nCheese will now be started in debugging mode.\n\nTry to reproduce the problem you are facing\nand 'Close' Cheese.") *cheese* :3 cheese 2>&1 | tee /dev/tty >>~/.cache/ CheeseDebug. txt")
## run cheese in debug mode all the bugs need this!
os.popen("env GST_DEBUG=
report[ 'CheeseDebug. txt'] = ('.cache/ CheeseDebug. txt', False)