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
74
This bug affects 13 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Invalid
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

Revision history for this message
Marien Zwart (marienz) wrote :
Revision history for this message
Rory McCann (rorymcc) wrote :

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

Revision history for this message
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
Revision history for this message
Philip Muškovac (yofel) wrote :

Are you still working on this Marien?

Revision history for this message
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)
Changed in apport (Ubuntu):
importance: Undecided → Low
Revision history for this message
Matt Zimmerman (mdz) wrote :

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

Martin Pitt (pitti)
Changed in apport (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
anatoly techtonik (techtonik) wrote :

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

Revision history for this message
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...

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in apport (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

Changed in apport (Ubuntu):
status: Incomplete → Invalid
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.