[PackageInfo] Info plugin doesn't provide a way to get further info

Bug #448619 reported by Tony Yarusso on 2009-10-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu IRC Bots
Low
Terence Simpson

Bug Description

When '!info package' is used, it gives a brief description and version number, but not much else. While this may have answered the question, often people will want to find out more about the package, and it would be useful for the bot to provide a way of doing this. Given that we already have a web interface to the package database, I suggest using that.

Thus for instance, '!info xpra karmic', rather than returning this:
xpra (source: parti-all): X Persistent Remote Applications. In component universe, is optional. Version 0.0.6-0ubuntu8 (karmic), package size 42 kB, installed size 272 kB

Would return this:

 xpra (source: parti-all): X Persistent Remote Applications. In component universe, is optional. Version 0.0.6-0ubuntu8 (karmic), package size 42 kB, installed size 272 kB - see http://packages.ubuntu.com/karmic/xpra

Simply append a link to http://packages.ubuntu.com/ with the distribution and package name requested. From there people can access the large description, changelog, and especially usefully, the project homepage link.

Terence Simpson (tsimpson) wrote :

This is a good idea, the only issue I see is that some of the distributions ubottu uses are actually PPAs, which have no such link.
There may be a couple of ways around this, but it won't be a simple one-liner.

Changed in ubuntu-bots:
assignee: nobody → Terence Simpson (tsimpson)
importance: Undecided → Low
status: New → Confirmed
Lorenzo J. Lucchini (ljl) wrote :

I concur that this would be quite useful, especially when you don't have apt-cache at your disposal (or you don't have it for the relevant repository).

I might suggest (though not really knowing the code) that each "distribution" (in ubottu terms, or repository) have an URL entry in the configuration database, such that for instance we'd have (excuse the invented syntax):
plugins.PackageInfo.URLs = { 'default' => 'http://packages.ubuntu.com/$DIST/$PKG', 'http://packages.medibuntu.org/$DIST/$PKG.html' }

('medibuntu' and 'partner' are the only non-standard repositories I see listed for ubottu; I don't know what a relevant url for Partner might be)

The bot code then need only natively substitute variables such as $DIST and $PKG (and maybe others such as $VER, $FILENAME, and such) into the given URLs.

Terence Simpson (tsimpson) wrote :

Currently when apt-file is not installed (or some strange error happens with apt-file), and !find is used, the bot will post a link to packages.ubuntu.com with the term filled in. So that part works now. The only issue is that the repositories are dynamically detected at load time, so there's no way to tell what repositories will be enabled until the plugin is run. Also the naming of the repositories is arbitrary, the plugin just looks for *.list files in a specified directory. While for ubottu we can control this naming convention and tell if a repository has a URL for package info, for other users we can't.
I don't really want to add ubottu specific code to the plugins (there's enough of that already), but there should be a way of doing this portably. Right now I'm thinking that maybe there should be a .<repository>url (?) file accompanying the .list, if it exists then that can be read and an URL assigned to a repository. But if anyone has a better/different idea, I'd like to hear it.

Terence Simpson (tsimpson) wrote :

I looked into this some more, it turns out it's more complicated that it seems. With packages.ubuntu.com you need to know if the package is in <dist> or <dist-updates> as well as what section it's in, eg: http://packages.ubuntu.com/hardy/base/bash http://packages.ubuntu.com/hardy-updates/base/bash
Right now we put <dist> and <dist-updates> in the same .list file, so that will cause issues.
Extracting the section is not difficult as we parse the output of apt-cache, determining if it's in -updates or not is more difficult.
I could split out the normal and -updates repos to different files, but then "!info bash intrepid" would show only the non -updates version, but we expect all users to have -updates enabled.

The only solution forming in my head at the moment is writing some code to detect an ubuntu repo and treat it specially, but that won't work for non *.archicve.ubuntu.com URLs.

summary: - Info plugin doesn't provide a way to get further info
+ [PackageInfo] Info plugin doesn't provide a way to get further info
tags: added: packageinfo
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers