Gentoo Archives: gentoo-dev

From: Drake Wyrm <wyrm@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] SRC_URI component naming collision
Date: Sat, 25 Feb 2006 21:31:52
Message-Id: 20060225212918.GA7304@phaenix.haell.com
In Reply to: Re: [gentoo-dev] SRC_URI component naming collision by Paul de Vrieze
1 Paul de Vrieze <pauldv@g.o> wrote:
2 > On Friday 24 February 2006 15:19, Ciaran McCreesh wrote:
3 [snip]
4 > > To avoid this, ensure that your packages use versioned SRC_URI
5 > > component names, and that the name part is something that's
6 > > reasonably likely to be unique (e.g. includes the package name).
7
8 Unfortunately, that's not always a possibility. I've bugged at least one
9 upstream about non-versioned sources. How does one work around that if
10 they won't fix it?
11
12 > What about introducing a new variable in the ebuild file: DIST_PREFIX
13 > that has as default value ${PN}. This should not break anything for
14 > unaware portage versions. For aware portage versions, the files would
15 > be retrieved from ${DISTDIR}/${DIST_PREFIX} instead of ${DISTDIR}
16
17 That introduces a problem of redundancy. In some cases, more than one
18 package will use a given set of sources, and it will need to be fetched
19 and stored once for each package. Perhaps defaulting DIST_PREFIX to ""
20 and allowing it to be used for workarounds in the odd cases could work.
21
22 Just for the sake of demonstration, the following should show a list of
23 the source files which are used multiple times on any given system and
24 how many times they are used:
25
26 emerge -p --fetch-all-uri --emptytree world 2>&1 1>/dev/null |
27 sed -e '/^$/d;s/.*\///' |
28 sort | uniq -D | uniq -c | sort -n
29
30 --
31 There are problems in today's world that cannot be
32 solved by the level of thinking that created them.
33 -- Albert Einstein

Replies

Subject Author
Re: [gentoo-dev] SRC_URI component naming collision Paul de Vrieze <pauldv@g.o>