W dniu wto, 07.11.2017 o godzinie 11∶21 -0800, użytkownik Zac Medico
napisał:
> On 11/06/2017 10:23 AM, Michał Górny wrote:
> > W dniu pon, 06.11.2017 o godzinie 08∶52 -0800, użytkownik Zac Medico
> > napisał:
> > > On 11/06/2017 08:47 AM, Michał Górny wrote:
> > > > W dniu pon, 06.11.2017 o godzinie 08∶44 -0800, użytkownik Zac Medico
> > > > napisał:
> > > > > On 11/06/2017 07:27 AM, Michał Górny wrote:
> > > > > > @@ -148,15 +147,21 @@ class Manifest(object):
> > > > > >             self.pkgdir = _unicode_decode(pkgdir).rstrip(os.sep) + 
> > > > > > os.sep
> > > > > >             self.fhashdict = {}
> > > > > >             self.hashes = set()
> > > > > > +           self.required_hashes = set()
> > > > > >  
> > > > > >             if hashes is None:
> > > > > >                     hashes = MANIFEST2_HASH_DEFAULTS
> > > > > > +           if required_hashes is None:
> > > > > > +                   required_hashes = hashes
> > > > > >  
> > > > > >             self.hashes.update(hashes)
> > > > > >             self.hashes.difference_update(hashname for hashname in \
> > > > > >                     list(self.hashes) if hashname not in 
> > > > > > get_valid_checksum_keys())
> > > > > >             self.hashes.add("size")
> > > > > > -           self.hashes.add(MANIFEST2_REQUIRED_HASH)
> > > > > > +
> > > > > > +           self.required_hashes.update(required_hashes)
> > > > > > +           self.required_hashes.intersection_update(self.hashes)
> > > > > > +
> > > > > 
> > > > > Requiring that presence of digests for all manifest-hashes can be
> > > > > problematic, because when we extend manifest-hashes it means that 
> > > > > nobody
> > > > > can regenerate a particular manifest without fetching *all* distfiles
> > > > > referenced in the Manifest. It's much more friendly if we generate the
> > > > > missing digests when the distfiles happen to be available in DISTDIR,
> > > > > which is how the portage currently behaves.
> > > > 
> > > > This doesn't change. The intersection only strips away hashes that are
> > > > not in 'self.hashes'.
> > > 
> > > Then the bug must have been introduced by changes to behavior of
> > > digestgen in the same patch. Try adding MD5 to manifest-hashes, and then
> > > try generating a manifest with no internet connection and DISTDIR set to
> > > an empty directory. You'll see that it fails with the patch, but
> > > succeeds with the current master branch.
> > 
> > You're suppose to add 'manifest-required-hashes' to layout.conf if you
> > want to introduce the partial fetching behavior.
> 
> Ah, ok, that works for me. Please add a description of
> manifest-required-hashes after manifest\-hashes in man/portage.5.

Ah, my grep didn't catch that because of the backslash!

-- 
Best regards,
Michał Górny


Reply via email to