[elbe-devel] [PATCH 4/8] pkgutils: refactor function name

Torben Hohn torben.hohn at linutronix.de
Mon Jan 8 15:12:48 CET 2018


On Fri, Jan 05, 2018 at 10:35:31PM +0100, Manuel Traut wrote:
> 'initrd' in the function name makes no sense, cause the package name is
> specified by the caller of the function. The function is able to lookup
> any pkg name.
> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/pkgutils.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
> index ce5d7493..b985b7a6 100644
> --- a/elbepack/pkgutils.py
> +++ b/elbepack/pkgutils.py
> @@ -120,7 +120,7 @@ def get_url(arch, suite, target_pkg, mirror, comp='main'):
>      return url
>  
>  
> -def get_initrd_uri_nonvirtapt(apt_sources, target_pkg, arch):
> +def get_uri_nonvirtapt(apt_sources, target_pkg, arch):
>      for apts in apt_sources.splitlines():
>          apts_split = apts.strip().split(' ')
>          if apts_split[0] != 'deb':
> @@ -146,7 +146,7 @@ def get_initrd_uri(prj, defs, arch):
>          try:
>              v = virtapt.VirtApt(arch, suite, apt_sources, "", apt_keys)
>          except Exception as e:
> -            return get_initrd_uri_nonvirtapt(apt_sources, target_pkg, arch)
> +            return get_uri_nonvirtapt(apt_sources, target_pkg, arch)
>  
>          d = virtapt.apt_pkg.DepCache(v.cache)
>          pkg = v.cache[target_pkg]
> @@ -168,7 +168,7 @@ def get_initrd_uri(prj, defs, arch):
>              hashval = r.hashes.find('SHA256')
>              return hashval, uri
>      else:
> -        return get_initrd_uri_nonvirtapt(apt_sources, target_pkg, arch)
> +        return get_uri_nonvirtapt(apt_sources, target_pkg, arch)
>  
>      return "", ""
>  
> -- 
> 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!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180108/63ff686c/attachment.sig>


More information about the elbe-devel mailing list