익명 06:56

How to open Launchpad project directly without reporting an apport-bug?

How to open Launchpad project directly without reporting an apport-bug?

Given a local package name, I would like to open the corresponding Launchpad project in the browser. apport-bug supports this, but requires first filing a bug. I would like to go on Launchpad to read the changelog or search for duplicate bugs.

My current manual workflow is this: Retrieve the package name from dpkg -S /path or apt list --upgradable. Convert to a project name if dpkg -s packagename has a Source: line. Manually type in https://launchpad.net/ubuntu/+source/projectname in Firefox.

I would like mycommand subcommand [pid | packagename | program path] to automatically open that one Launchpad page. Launchpad sometimes takes a few seconds to load, so I don't want to need to visit multiple Launchpad pages. Is there a built-in command that supports this?

Furthermore, the Launchpad.net search feature suggested by @user1898883 is broken. https://launchpad.net/+search?field.text=aspnetcore-runtime-10.0 and https://launchpad.net/+search?field.text=dotnet10&field.actions.search=Search both return the unrelated https://bugs.launchpad.net/bugs/10 and https://answers.launchpad.net/ubuntu/+question/10 .



Top Answer/Comment:

I wrote a script to automate the previous workflow:

#!/bin/bash
x="$1"
[[ "$x" =~ ^[^0-9] ]] || x="$(readlink -f /proc/"$x"/exe)"
[[ "$x" =~ ^[^/] ]] || x="$(dpkg -S "$x" | head -n1 | cut -d: -f1)"
y="$(dpkg-query -Wf'${Source}' "$x")"
open launchpad.net/ubuntu/+source/"${y:-"$x"}"

When opening Launchpad to check changelogs, only the last 2 lines are really necessary, so it's basically a 1-liner.

Then I discovered apt changelog. It seemingly internally extracts the Source: too. But it’s probably buried much C code, just like how I read /usr/lib/python3/dist-packages/apport and found the extraction and the Launchpad-handling code is buried under much private-API Python code. So rolling a short script is a adequate solution, although without a script, I’d type the shorter dpkg -s ...|grep ^So instead.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다