ubuntu-bug should fall back to using its argument as a command name ("ubuntu-bug ubuntu-bug" should work)

Bug #447751 reported by Marien Zwart on 2009-10-10
76
This bug affects 13 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Low
Marien Zwart

Bug Description

Binary package hint: apport

ubuntu-bug understands package names and the full path to a program. If the argument I give it is neither but is the name of an executable on $PATH it should do what I mean and use that. It could optionally confirm that with me first ("Did you mean to file a bug on /usr/bin/ubuntu-bug, owned by the apport package?"). The current "Package ubuntu-bug does not exist" message is less useful than this would be. I'll probably see if I can cook up a branch with this behavior later.

ProblemType: Bug
ApportLog:

Architecture: i386
Date: Sat Oct 10 05:21:33 2009
DistroRelease: Ubuntu 9.10
Package: apport 1.9.2-0ubuntu2
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-13.42-generic
SourcePackage: apport
Uname: Linux 2.6.31-13-generic i686
XsessionErrors:
 (gnome-settings-daemon:4298): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:4298): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (nautilus:4343): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:4349): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (gnome-panel:4342): Gdk-WARNING **: /build/buildd/gtk+2.0-2.18.2/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

Related branches

Marien Zwart (marienz) wrote :
Rory McCann (rorymcc) wrote :

Instead of looking in the $PATH, a simple solution would be to execute `which $ARGV1` and see what that reports,

Marien Zwart (marienz) wrote :

It's not hard to do this in python directly either, see the attached branch (not heavily tested, but since getting this exactly right isn't critical it may be good enough).

Changed in apport (Ubuntu):
assignee: nobody → Marien Zwart (marienz)
status: New → Confirmed
Philip Muškovac (yofel) wrote :

Are you still working on this Marien?

Marien Zwart (marienz) wrote :

I had completely forgotten about this, but can probably address the review comments next week (possibly sooner). If someone else wants to beat me to it that is fine too, of course.

Philip Muškovac (yofel) on 2010-10-09
Changed in apport (Ubuntu):
importance: Undecided → Low
Matt Zimmerman (mdz) wrote :

@Marien, are you still working on this? It seems like a useful improvement to have.

Martin Pitt (pitti) on 2011-03-29
Changed in apport (Ubuntu):
status: Confirmed → Triaged
anatoly techtonik (techtonik) wrote :

So, what is the process of editing an existing pull request here?

Marien Zwart (marienz) wrote :

Ick, I'd forgotten about this (again!) and I won't have time to work on this in the next couple of weeks.

You can't really re-use my merge request: it was rejected, and you can't upload to my branch (which the merge request was for). You can send a new merge request, though. https://help.launchpad.net/Code/Review explains how they work.

If you want to take this over, it's probably most expedient to start from the current upstream code (branch lp:apport), fix it there, and submit a new merge request.

If you want to continue from where I started, I think you can do something like this (note it's been a while since I used these tools):

$ bzr branch lp:~marienz/apport/search-for-executable
Branched 1623 revisions.
$ bzr merge lp:apport
Text conflict in apport/ui.py
1 conflicts encountered.

Fix the conflict... it looks like the only conflict is a change from sys.argv[1] to self.args[0], but I didn't test the result.

$ bzr commit -m 'Merge lp:apport.'

Fix my fix :)

$ bzr commit -m 'Fixed fix.'
$ bzr push lp:~techtonik/apport/search-for-executable

..and submit a new merge request, see https://help.launchpad.net/Code/Review

Thanks for looking at this! If you don't get to it before I'm back from my vacation, I'll hopefully (finally) remember to finish up my fix and get it merged...

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

Other bug subscribers