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

Loui Chang louipc.ist at gmail.com
Thu Aug 27 08:01:14 EDT 2009

On Mon 24 Aug 2009 22:33 +0800, Gergely Imreh wrote:
> 2009/8/24 Loui Chang <louipc.ist at gmail.com>:
> > On Sun 16 Aug 2009 15:41 +0800, Gergely Imreh wrote:
> >> +    $common_licenses = array('APACHE', 'CCPL:by', 'CCPL:by-nc', \\
> >> +        'CCPL:by-nc-nd', 'CCPL:by-nc-sa', 'CCPL:by-nd', 'CCPL:by-sa', \\
> >> +        'CDDL', 'CPL', 'EPL', 'FDL', 'FDL1.2', 'FDL1.3', 'GPL', 'GPL2', \\
> >> +        'GPL3', 'LGPL', 'LGPL2.1', 'LGPL3', 'LPPL', 'MPL', 'PHP', 'PSF', \\
> >
> > I'm not sure why you have the \\ here, but those cause errors for me.
> What problems do they cause you?

It causes a syntax error:
 php-cgi: PHP Parse error:  syntax error, unexpected T_NS_SEPARATOR,
 expecting T_STRING in /home/louipc/devel/aur/web/template/pkg_details.
 php on line 38

It must be a change in php 5.3.0.

php 5.2.10 gives a warning, but works otherwise:
 php-cgi: PHP Warning:  Unexpected character in input:  '\' (ASCII=92)
 state=1 in /home/louipc/devel/aur/web/template/pkg_details.php on line

> > I was thinking that it might make sense to include those licenses in the
> > AUR repo rather than linking to an external site. Any opinion there?
> Putting right into the source? That's an option... Would make things
> more self contained.

Putting them into separate files in a directory somewhere, say
web/html/licenses, so it remains in the AUR domain and we know for sure
that we are linking to something that exists. I don't really have
control over the Wiki, and even if I did I'd prefer not to fragment
AUR's data onto other sites.

> On the other hand, if we use outside links, than I could only imagine
> linking to the Arch Wiki or to Wikipedia. Other sites link to wikis as
> well when it's about very static things, that could also benefit from
> some context. Licenses certainly fall into that category.

If you want added context, it's mostly sensible to link to Wikipedia.
But packages aren't news articles, so I would argue that it's not even
necessary, and ultimately the license belongs in the package.
Ohloh is maintaining a collection of over 250 different licenses now,
and that's supposedly limited to open source licenses.
I'm not sure I want to do that. The AUR isn't limited to open source.

> +            $license .= '<a href="' . $license_linkbase . $wikilink \\
> +                . '" target=_blank>'. $pkglicense . '</a> ';

Missed a "\\".
I'd also omit the target attribute as that's not available in XHTML
strict. No need to resubmit the patch for those two things alone though.

So, considering everything, I'm not exactly sure what I think of the
idea. It might be kind of convenient, but it would be a pain to
maintain, would only be half complete at most, and the licenses that
people would need to read are the uncommon ones after all, not the
common ones. People already know what the GPL is.

I propose just making it a link to Google. Hah

More information about the aur-dev mailing list