[elbe-devel] [PATCH 05/13] implement version check for pinned packages

Manuel Traut manuel.traut at linutronix.de
Fri Dec 8 17:57:28 CET 2017


On Wed, Dec 06, 2017 at 01:26:10PM +0100, Torben Hohn wrote:
> On Wed, Dec 06, 2017 at 11:26:49AM +0100, Manuel Traut wrote:
> > 
> > On Tue, Dec 05, 2017 at 04:46:54PM +0100, Torben Hohn wrote:
> > > On Thu, Nov 30, 2017 at 03:15:07PM +0100, Manuel Traut wrote:
> > > > Currently it is not verified that a version pinned package was installed with
> > > > the specified version. This adds a check to verify the version and inserts an
> > > > entry in validation.txt if a version missmatch was detected.
> > > > 
> > > > Signed-off-by: Manuel Traut <manut at linutronix.de>
> > > > ---
> > > >  elbepack/dump.py | 11 +++++++++--
> > > >  1 file changed, 9 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/elbepack/dump.py b/elbepack/dump.py
> > > > index 98ab2a5d..45669ec1 100644
> > > > --- a/elbepack/dump.py
> > > > +++ b/elbepack/dump.py
> > > > @@ -93,8 +93,8 @@ def check_full_pkgs(pkgs, fullpkgs, errorname, cache):
> > > >  
> > > >      errors = 0
> > > >  
> > > > -    for name in [p.et.text for p in pkgs]:
> > > > -
> > > > +    for p in pkgs:
> > > > +        name = p.et.text
> > > >          nomulti_name = name.split(":")[0]
> > > >          if not cache.has_pkg(nomulti_name):
> > > >              elog.printo( "- package %s does not exist" % nomulti_name )
> > > > @@ -106,6 +106,13 @@ def check_full_pkgs(pkgs, fullpkgs, errorname, cache):
> > > >              errors += 1
> > > >              continue
> > > >  
> > > > +        ver  = p.et.get('version')
> > > > +        pkg = cache.get_pkg(name)
> > > 
> > > the code above uses nomulti_name.
> > > i would like to see some successful tests with multiarch packages.
> > > 
> > > i am pretty sure, that the apt_cache does not contain bla:amd64
> > 
> > besides the hacks in finetuning we have no multiarch support in elbe so far.
> 
> I can not remember, why this nomulti_name code exists.
> There must be a reason though.

..it was written by Torben Hohn, you might ask him :-P

> since that it half baked, it should probably just go away now. And then
> be added correctly, when we add multiarch support.

i changed the patch to use multiname in v2

i don't see a reason to remove it, it is not wrong and helps in the future.

> 
> > But there is a feature request for that on github:
> > https://github.com/Linutronix/elbe/issues/81
> > 
> > I added a link to this mail thread, that we need to care on validation if we add
> > multiarch support to elbe. Because at the moment even if nomulti_name is used
> > we don't verify if it is installed for the correct architecture.
> > 
> > > > +        if ver and (pkg.installed_version != ver):
> > > > +            elog.printo( "- package %s version %s does not match installed version %s" % (name, ver,  pkg.installed_version) )
> > > > +            errors += 1
> > > > +            continue
> > > > +
> > > >      if errors == 0:
> > > >          elog.printo( "No Errors found" )
> > > >  
> > > > -- 
> > > > 2.15.1
> > > > 
> > > > 
> > > > _______________________________________________
> > > > elbe-devel mailing list
> > > > elbe-devel at linutronix.de
> > > > https://lists.linutronix.de/mailman/listinfo/elbe-devel
> > > 
> > > -- 
> > > Mit freundlichen Grüßen
> > > Torben Hohn
> > > 
> > > Linutronix GmbH
> > > 
> > > Standort: Bremen
> > > 
> > > Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
> > > 
> > > Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
> > > Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
> > > Nr. / Trade register no.: 700 806
> > > 
> > > Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner
> > > 
> > > Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
> > > benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
> > > möglich ist, durch Antwort-Mail. Vielen Dank!
> > 
> > 
> 
> -- 
> Mit freundlichen Grüßen
> Torben Hohn
> 
> Linutronix GmbH
> 
> Standort: Bremen
> 
> Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
> 
> Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
> Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
> Nr. / Trade register no.: 700 806
> 
> Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner
> 
> Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
> benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
> möglich ist, durch Antwort-Mail. Vielen Dank!



> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel




More information about the elbe-devel mailing list