[elbe-devel] [PATCH 02/10] rpcaptcache: check, whether to be ignored dev pkgs actually exist

Manuel Traut manut at linutronix.de
Thu Apr 25 13:06:24 CEST 2019


On 12:56 Thu 25 Apr     , Torben Hohn wrote:
> On Thu, Apr 11, 2019 at 08:35:23AM +0200, Manuel Traut wrote:
> > On 17:39 Wed 10 Apr     , Torben Hohn wrote:
> > > On Wed, Apr 10, 2019 at 10:36:58AM +0200, Manuel Traut wrote:
> > > > On 15:42 Mon 08 Apr     , Torben Hohn wrote:
> > > > > when a pkg that shall be ignored does not exist, a KeyError is thrown.
> > > > > check existence, before trying to mark pkg for deletion.
> > > > 
> > > > why is this needed?
> > > 
> > > it throws a key error, and just stops building the sysroot,
> > > when a non existing packages is blacklisted.
> > > 
> > > This happened very often, when i had php5-dev blacklisted,
> > > and upgraded to stretch, where php7-dev should have been
> > > blacklisted.
> > > 
> > > i dont think its an error to blacklist a package that does not exist.
> > > but it should not make the sysroot generation fail.
> > 
> > but it should be definitely be logged. E.g. in validation.txt.
> 
> this is code in rpcaptcache. we can not access validation.txt from
> there. 
> 
> i can open an issue, so that we can add proper logging when the
> logging stuff is implemented, but until then, we should just
> avoid to crash.
> 
> i still dont understand, why its bad, when a blacklisted package does
> not exist.

Because if you have a typo in the packagename it will be silently ignored.
We learned from the past that the silently continue behaviour of elbe is
real pain for debugging.

> > > > > Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
> > > > > ---
> > > > >  elbepack/rpcaptcache.py | 3 ++-
> > > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/elbepack/rpcaptcache.py b/elbepack/rpcaptcache.py
> > > > > index d621a5e9..618085c0 100644
> > > > > --- a/elbepack/rpcaptcache.py
> > > > > +++ b/elbepack/rpcaptcache.py
> > > > > @@ -130,7 +130,8 @@ class RPCAPTCache(InChRootObject):
> > > > >          self.cache['symlinks'].mark_install()
> > > > >  
> > > > >          for p in ignore_dev_pkgs:
> > > > > -            self.cache[p].mark_delete()
> > > > > +            if p in self.cache:
> > > > > +                self.cache[p].mark_delete()
> > > > >  
> > > > >      def cleanup(self, exclude_pkgs):
> > > > >          for p in self.cache:
> > > > > -- 
> > > > > 2.11.0
> > > > > 
> > > > > 
> > > > > _______________________________________________
> > > > > elbe-devel mailing list
> > > > > elbe-devel at linutronix.de
> > > > > https://lists.linutronix.de/mailman/listinfo/elbe-devel
> > > 
> > > -- 
> > > Torben Hohn
> > > Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
> > > Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
> > > 
> > > Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
> > > can be found here): https://linutronix.de/kontakt/Datenschutz.php
> > > 
> > > Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
> > > Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
> > > 806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
> > 
> > 
> 
> -- 
> Torben Hohn
> Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
> Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
> 
> Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
> can be found here): https://linutronix.de/kontakt/Datenschutz.php
> 
> Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
> Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
> 806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner





More information about the elbe-devel mailing list