1 |
W dniu pon, 06.11.2017 o godzinie 08∶44 -0800, użytkownik Zac Medico |
2 |
napisał: |
3 |
> On 11/06/2017 07:27 AM, Michał Górny wrote: |
4 |
> > @@ -148,15 +147,21 @@ class Manifest(object): |
5 |
> > self.pkgdir = _unicode_decode(pkgdir).rstrip(os.sep) + os.sep |
6 |
> > self.fhashdict = {} |
7 |
> > self.hashes = set() |
8 |
> > + self.required_hashes = set() |
9 |
> > |
10 |
> > if hashes is None: |
11 |
> > hashes = MANIFEST2_HASH_DEFAULTS |
12 |
> > + if required_hashes is None: |
13 |
> > + required_hashes = hashes |
14 |
> > |
15 |
> > self.hashes.update(hashes) |
16 |
> > self.hashes.difference_update(hashname for hashname in \ |
17 |
> > list(self.hashes) if hashname not in get_valid_checksum_keys()) |
18 |
> > self.hashes.add("size") |
19 |
> > - self.hashes.add(MANIFEST2_REQUIRED_HASH) |
20 |
> > + |
21 |
> > + self.required_hashes.update(required_hashes) |
22 |
> > + self.required_hashes.intersection_update(self.hashes) |
23 |
> > + |
24 |
> |
25 |
> Requiring that presence of digests for all manifest-hashes can be |
26 |
> problematic, because when we extend manifest-hashes it means that nobody |
27 |
> can regenerate a particular manifest without fetching *all* distfiles |
28 |
> referenced in the Manifest. It's much more friendly if we generate the |
29 |
> missing digests when the distfiles happen to be available in DISTDIR, |
30 |
> which is how the portage currently behaves. |
31 |
|
32 |
This doesn't change. The intersection only strips away hashes that are |
33 |
not in 'self.hashes'. |
34 |
|
35 |
-- |
36 |
Best regards, |
37 |
Michał Górny |