Gentoo Archives: gentoo-dev

From: Michael Orlitzky <mjo@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [pre-GLEP] Split distfile mirror directory structure
Date: Sat, 27 Jan 2018 01:48:58
Message-Id: fa5aeedd-7a53-c2e7-d163-c16482028b11@gentoo.org
In Reply to: [gentoo-dev] [pre-GLEP] Split distfile mirror directory structure by "Michał Górny"
1 On 01/26/2018 06:24 PM, Michał Górny wrote:
2 >
3 > The alternate option of using file hash has the advantage of having
4 > a more balanced split. Furthermore, since hashes are stored
5 > in Manifests using them is zero-cost. However, this solution has two
6 > significant disadvantages:
7 >
8 > 1. The hash values are unknown for newly-downloaded distfiles, so
9 > ``repoman`` (or an equivalent tool) would have to use a temporary
10 > directory before locating the file in appropriate subdirectory.
11 >
12 > 2. User-provided distfiles (e.g. for fetch-restricted packages) with
13 > hash mismatches would be placed in the wrong subdirectory,
14 > potentially causing confusing errors.
15 >
16
17 The filename proposal sounds fine, so this is only academic, but: are
18 these two points really disadvantages?
19
20 What are we worried about in using a temporary directory? Copying across
21 filesystem boundaries? Except in rare cases, $DISTDIR itself will be
22 usable a temporary location (on the same filesystem), won't it?
23
24 For the second point, portage is going to tell me where to put the file,
25 isn't it? Then no matter what garbage I download, won't portage look for
26 it in the right place, because where-to-put-it is determined using the
27 same manifest hash that determines where-to-find-it?

Replies