Gentoo Archives: gentoo-dev

From: Marius Mauch <genone@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Handling Launchpad SRC_URI
Date: Sun, 25 Jan 2009 11:45:04
Message-Id: 20090125124419.94953c8a.genone@gentoo.org
In Reply to: [gentoo-dev] Handling Launchpad SRC_URI by Josh Saddler
1 On Sat, 24 Jan 2009 23:38:32 -0800
2 Josh Saddler <nightmorph@g.o> wrote:
3
4 > Right now, there's no canonical (heh) way of handling SRC_URI for
5 > projects that have their files at launchpad.net. We need a standard
6 > way of handling Launchpad SRC_URIs, similar to what we do with
7 > mirror://sourceforge/ SRC_URIs.
8 >
9 > 1. Some packages use the launchpadlibrarian.net download redirect,
10 > which results in a non-helpful server-generated number:
11 >
12 > (gnome-catalog)
13 > SRC_URI="http://launchpadlibrarian.net/11326737/${PN}_${PV}.orig.tar.gz
14 >
15 > 2. Some hack up interesting MY_P stuff:
16 >
17 > (gnome-do-plugins)
18 > MY_PN="do-plugins"
19 > PVC=$(get_version_component_range 1-2)
20 > PVC2=$(get_version_component_range 1-3)
21 > SRC_URI="https://launchpad.net/${MY_PN}/${PVC}/${PVC2}/+download/${P}.tar.gz"
22 >
23 > (avant-window-navigator-extras)
24 > MY_P="awn-extras-applets-${PV}"
25 > SRC_URI="https://launchpad.net/awn-extras/${PV%.*}/${PV}/+download/${MY_P}.tar.gz"
26 >
27 > The AWN-extras ebuild is the closest to the "right" way of doing it, I
28 > think.
29 >
30 > So can we agree on a standard way of treating Launchpad SRC_URIs and
31 > get the handler support into Portage?
32
33 The best way would be to convince upstream to offer a simpler URL
34 scheme. Adding a special handler in the PM would be the worst option
35 (also there is no such thing atm, mirror://sourceforge/ doesn't do
36 anything special). The easiest option would probably be a little helper
37 function in eutils to generate the correct URL, if you *really* need to
38 simplify things (in your examples, the only sligthly odd thing are the
39 version parts in the URL, the MY_P stuff would be needed anyway from
40 what I can see).
41
42 Marius