add-apt-respository: no man page, and no --help

Bug #407779 reported by Rami Al-Rfou' on 2009-08-01
70
This bug affects 13 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Medium
Unassigned
Nominated for Lucid by Abhishek Dasgupta

Bug Description

new user don't know how to use this command. No manual entry for the command available
after asking in #ubuntu+1 to use the command
add-apt-repository ppa:teamName/ppaName

ProblemType: Bug
Architecture: i386
Date: Sat Aug 1 22:15:59 2009
DistroRelease: Ubuntu 9.10
Package: software-properties-gtk 0.75.1
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-4.23-generic
SourcePackage: software-properties
Uname: Linux 2.6.31-4-generic i686

Rami Al-Rfou' (rmyeid) wrote :
Josh Holland (jshholland) wrote :

Confirming this and adding:
$ add-apt-repository --help
Usage: add-apt-repository [options]

Options:
  -h, --help show this help message and exit

That could do with fixing. I'll have a look at the source and see what I can do.

Changed in software-properties (Ubuntu):
status: New → Confirmed
C de-Avillez (hggdh2) wrote :

Adjusted package and bug title, set to Triaged/Medium. At a bare minimum, 'apt-add-repository' should provide a better --help.

summary: - no manual entry for add-apt-respository
+ add-apt-respository: no man page, and no --help
Changed in software-properties (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Mark Schouten (mark-prevented) wrote :

This is extremely annoying and seems to be becoming the new default behaviour for Canonical/Ubuntu main-packages. Please upgrade to 'Importance High', or else this will be yet another long ongoing bug.

fedesog (fedesog) wrote :

looking at the source, even if I don't know anything about python, I reckon the command gets one and only one argument, the repository, and (quoted from the source)

"Add a source with the given apt line and auto-add signing key if we have it in the whitelist"

The repository is added to a file in the sources.list.d directory.

I didn't dig much further into the sources but I think this is all

Gabe Gorelick (gabegorelick) wrote :

This patch adds the -h and --help options and provides a short summary of what add-apt-repository does. Note that all the PO files need to be updated to include translations for the usage string.

Gabe Gorelick (gabegorelick) wrote :

Oops, I forgot to document the actual PPA argument. Of course I would only notice right after I upload a patch! Stand by for a corrected version.

Gabe Gorelick (gabegorelick) wrote :

A fixed patch to include -h and --help options, as well as a usage summary. Feel free to rewrite the usage summary as you see fit.

Mark Schouten (mark-prevented) wrote :

Please read section "12.1 Manual pages" in the Debian Policy Manual. The absense of manualpages should be considered a bug. If this was some package in Universe, one could say 'ah well'. But this is code in the Ubuntu main-repository. I would expect Canonical not to release software untill Lintian says it's fine. And I'm pretty sure Lintian warns about missing manpages.

The advantage of man-pages is that you do not have to be on short terms, because --help will scroll to fast. Also, it's a single point where you can find documentation.

You can say 'you just need to enter the apt line' but that doesn't work.
sudo add-apt-repository http://nl.archive.ubuntu.com/ubuntu lucid main
Error: need a repository as argument

So all isn't as obvious as one should expect. Canonical should just write man-pages (I haven't seen any comments from MvO himself) and stop making a mess of their own packages.

Gabe Gorelick (gabegorelick) wrote :

It's actually not that hard to add a simple man page if anyone wants to do it. It looks like it's just a matter of adding the man page at debian/manpages/add-apt-repository.1. I've already done this for another command in the software-properties package which also doesn't have a man page (software-properties-gtk, see bug #290308) so I should be able to attempt this once I get some free time. But if anyone else wants to they can try to write their own man page in the mean time and post the patch here.

Michael Vogt (mvo) wrote :

Thanks for the patch. The description is a bit too much focused on PPAs. I changed it a little bit to emphasize more that it can also be used for normal repositiories:

add-apt-repository is a script for adding apt sources.list entries.
It can be used to add any repository and also provides a shorthand
synatax for Launchpad PPA (Personal Package Archive) repositories via
ppa:user/repository

Michael Vogt (mvo) wrote :

Additions/corrections to my version welcome.

Michael Vogt (mvo) wrote :

A man page is also very welcome too.

Michael Vogt (mvo) wrote :

A man page contributed by Chow Loong Jin is added now.

Changed in software-properties (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.75.8

---------------
software-properties (0.75.8) lucid; urgency=low

  [ Michael Vogt ]
  * softwareproperties/gtk/SoftwarePropertiesGtk.py:
    - do not crash if tranient parent can not be set (LP: #83914)
  * debian/manpages/software-properties-gtk.1:
    - add man-page (thanks to Gabe Gorelick) LP: #290308
  * add-apt-repository:
    - better help output (LP: #407779)
    - do not crash if setlocale fails (LP: #467369)
  * software-properties-gtk:
    - ensure newly created ppa files are readalbe (LP: #497778)
  * data/software-properties-gtk.desktop.in:
    - fix desktop file location (thanks to Ricardo Pérez López)
      LP: #543637
  * provide apt-add-repository link (LP: #547194)
  * debian/manpages/add-apt-repository.1:
    - add man-page, thanks to Chow Loong Jin (LP: #407779)
  * fix lintian warnings
  * softwareproperties/SoftwareProperties.py:
    - show summary in addition to comment for disabled entries
      (LP: #543207)

  [ Harald Sitter ]
  * [KDE] Fix bug in I18nHelper, where it would trigger a crash if unicode()
    to UTF-8 fails. Fallback to latin1 in this case. This for example happens
    when the APT keyring contains a key with non-latin characters, which can
    happen with PPA keys, since those contain the owner's name.
 -- Michael Vogt <email address hidden> Fri, 26 Mar 2010 13:51:20 +0100

Changed in software-properties (Ubuntu):
status: Fix Committed → Fix Released
Gabe Gorelick (gabegorelick) wrote :

Thanks for the better description Michael. I actually didn't know it could be used for anything but PPAs (since there was no documentation on this :) )

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

Duplicates of this bug

Other bug subscribers