apport package hook works properly only if we are in $HOME dir

Bug #1778557 reported by Victor Porton
6
This bug affects 1 person
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/CheeseDebug.txt'

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: apport 2.20.9-0ubuntu7.2
ProcVersionSignature: Ubuntu 4.15.0-23.25-generic 4.15.18
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)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_IL
 SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Victor Porton (porton) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

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.")
    ## run cheese in debug mode all the bugs need this!
    os.popen("env GST_DEBUG=*cheese*:3 cheese 2>&1 | tee /dev/tty >>~/.cache/CheeseDebug.txt")

    report['CheeseDebug.txt'] = ('.cache/CheeseDebug.txt', False)

affects: apport (Ubuntu) → cheese (Ubuntu)
Changed in cheese (Ubuntu):
importance: Undecided → High
status: New → Triaged
summary: - ubuntu-bug works properly only if we are in $HOME dir
+ apport package hook works properly only if we are in $HOME dir
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.