[aur-dev] FS#15043: patch for part 3 - package licenses link to Arch Wiki pages

Gergely Imreh imrehg at gmail.com
Sun Aug 16 03:34:15 EDT 2009


  There is a feature request (FS#15043) for multiple package parsing
enhancements on AUR. One of them (part 3) asks for "arch and license
arrays can be converted to links [to Arch Wiki]".

  I checked out the "license" part, as I see the arch is not displayed
on AUR at the moment. Linking to common licenses might be an useful
idea, so here's a patch that does just that.
  Good code should speak for itself, but maybe I do elaborate a little:
  - I took the common licenses distributed in
/usr/share/licenses/common and uploaded them to the Wiki as
  - The code checks for these names in the licenses array, and if
there's any match, turns it into a link. If no match, just display it
as text.
  - Can handle multiple licenses in case needed.

  I can see some problems arise, though. I took the names of these
licenses exactly as it is in the directory, and that includes
capitalisation. E.g. "APACHE" and "PerlArtistic". Could match the
names case-insensitive, but that's a bad idea since the Wiki link is
case-sensitive... Thus, if some people use wrong capitalisation in
their PKGBUILD (like [1]) and complain that the link "does not work
0rz", then it is the reason... Namcap's check for licenses is
case-insensitive, so that's no help to prevent such problems.

  Anyway, here it is, let me know if there's any issue with the way
things are handled, or any other functionality that should be

[1] http://aur.archlinux.org/packages.php?ID=27609

More information about the aur-dev mailing list