[elbe-devel] [PATCH 4/5] elbeproject: Generate source list for building source cdrom

Torben Hohn torben.hohn at linutronix.de
Mon May 25 14:49:56 CEST 2020


On Tue, May 19, 2020 at 10:27:02PM -0400, Olivier Dion wrote:
> mk_source_cdrom() is now expecting a list of tuples of the
> form (src_name, src_version) instead of (bin_name, bin_version).
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

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

> ---
>  elbepack/elbeproject.py | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index 8d45469d..de0179bd 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -487,18 +487,17 @@ class ElbeProject (object):
>  
>                  # Target component
>                  cache = self.get_rpcaptcache(env=self.buildenv)
> -                tgt_lst = []
> -                for pkg_name in tgt_pkg_lst:
> -                    pkg = cache.get_pkg(pkg_name)
> -                    tgt_lst.append((pkg.name, pkg.installed_version))
> +                tgt_lst = cache.get_corresponding_source_packages(pkg_lst=tgt_pkg_lst)
>                  components = {"target":(self.targetfs, cache, tgt_lst)}
>  
>                  # Main component
>                  main_lst = []
>                  if self.xml is not None:
> +                    tmp_lst = []
>                      for pkg_node in self.xml.node("debootstrappkgs"):
>                          pkg = XMLPackage(pkg_node, self.arch)
> -                        main_lst.append((pkg.name, pkg.installed_version))
> +                        tmp_lst.append(pkg.name)
> +                    main_lst = cache.get_corresponding_source_packages(pkg_lst=tmp_lst)
>                  components["main"] = (env.rfs, cache, main_lst)
>  
>                  # Added component
> @@ -519,10 +518,8 @@ class ElbeProject (object):
>                  # components using the full installed packages
>                  for build_env, name in other_components:
>                      cache = self.get_rpcaptcache(env=build_env)
> -                    tmp_lst = []
> -                    for pkg in cache.get_installed_pkgs():
> -                        tmp_lst.append((pkg.name, pkg.installed_version))
> -                    components[name] = (build_env.rfs, cache, tmp_lst)
> +                    src_lst = cache.get_corresponding_source_packages()
> +                    components[name] = (build_env.rfs, cache, src_lst)
>  
>                  try:
>                      # Using kwargs here allows us to avoid making
> -- 
> 2.26.2
> 
> 
> _______________________________________________
> 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



More information about the elbe-devel mailing list