Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [pre-GLEP] Split distfile mirror directory structure
Date: Sat, 27 Jan 2018 08:30:40
Message-Id: 1517041828.3816.3.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [pre-GLEP] Split distfile mirror directory structure by Michael Orlitzky
1 W dniu pią, 26.01.2018 o godzinie 20∶48 -0500, użytkownik Michael
2 Orlitzky napisał:
3 > On 01/26/2018 06:24 PM, Michał Górny wrote:
4 > >
5 > > The alternate option of using file hash has the advantage of having
6 > > a more balanced split. Furthermore, since hashes are stored
7 > > in Manifests using them is zero-cost. However, this solution has two
8 > > significant disadvantages:
9 > >
10 > > 1. The hash values are unknown for newly-downloaded distfiles, so
11 > > ``repoman`` (or an equivalent tool) would have to use a temporary
12 > > directory before locating the file in appropriate subdirectory.
13 > >
14 > > 2. User-provided distfiles (e.g. for fetch-restricted packages) with
15 > > hash mismatches would be placed in the wrong subdirectory,
16 > > potentially causing confusing errors.
17 > >
18 >
19 > The filename proposal sounds fine, so this is only academic, but: are
20 > these two points really disadvantages?
21 >
22 > What are we worried about in using a temporary directory? Copying across
23 > filesystem boundaries? Except in rare cases, $DISTDIR itself will be
24 > usable a temporary location (on the same filesystem), won't it?
25
26 Why add the extra complexity when there's no need for one? Note that
27 there's also the problem of resuming transfers, so in the end we're
28 talking about permanent temporary directory where we keep unfinished
29 transfers.
30
31 > For the second point, portage is going to tell me where to put the file,
32 > isn't it? Then no matter what garbage I download, won't portage look for
33 > it in the right place, because where-to-put-it is determined using the
34 > same manifest hash that determines where-to-find-it?
35
36 No, it won't. Why would it? You're going to call something like:
37
38 edistadd foo.tar.gz bar.tar.gz
39
40 ...and it will place the files in the right subdirectories.
41
42 --
43 Best regards,
44 Michał Górny

Replies