[elbe-devel] [PATCH v2 1/1] fix version used for dev packages in sdk

Bastian Germann bage at linutronix.de
Sat Jan 25 09:02:02 CET 2020


Am 02.12.19 um 13:04 schrieb Soest Laurent:
> 
> -dev packages should use the same version as installed packages in the
> rootfs

Hi Laurent,

If you want Linutronix to consider the patch, please add a Signed-off-by
line. With that line you state that you are legally allowed to submit
your changes under the GPLv3. We do not state this requirement in the
development documentation and should probably add a file that says
something like https://developercertificate.org.

You would just append an empty line following a line
"Signed-off-by: Soest Laurent <Laurent.Soest at bernina.com>" to the end of
your commit message. Git commit has built-in support for this with the
-s flag.

I am sorry that I missed that answering your first draft.

Regards,
Bastian

> ---
>  elbepack/rpcaptcache.py | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/elbepack/rpcaptcache.py b/elbepack/rpcaptcache.py
> index afb29ed6f..988f53070 100644
> --- a/elbepack/rpcaptcache.py
> +++ b/elbepack/rpcaptcache.py
> @@ -145,6 +145,9 @@ class RPCAPTCache(InChRootObject):
>          src_list = [
>              p.candidate.source_name for p in self.cache if (
>                  p.is_installed and p.name not in ignore_pkgs)]
> +        version_dict = {
> +            p.name: p.candidate.version for p in self.cache if (
> +                p.is_installed and p.name not in ignore_pkgs)}
>          # go through all packages, remember package if its source package
>          # matches one of the installed packages and the binary package is a
>          # '-dev' package
> @@ -154,6 +157,12 @@ class RPCAPTCache(InChRootObject):
>                      s.name.endswith('-dev')))]
>          for p in dev_list:
>              if p.name not in ignore_dev_pkgs:
> +                name_no_suffix = p.name[:-len('-dev')]
> +                if name_no_suffix in version_dict:
> +                    version = version_dict[name_no_suffix]
> +                    candidate = p.versions.get(version)
> +                    if candidate:
> +                        p.candidate = candidate
>                  p.mark_install()
>          # ensure that the symlinks package will be installed (it's needed for
>          # fixing links inside the sysroot
> @@ -168,7 +177,14 @@ class RPCAPTCache(InChRootObject):
>  
>          for p in dbgsym_list:
>              if p in self.cache:
> -                self.cache[p].mark_install()
> +                pkg = self.cache[p]
> +                name_no_suffix = pkg.name[:-len('-dbgsym')]
> +                if name_no_suffix in version_dict:
> +                    version = version_dict[name_no_suffix]
> +                    candidate = pkg.versions.get(version)
> +                    if candidate:
> +                        pkg.candidate = candidate
> +                pkg.mark_install()
>  
>      def cleanup(self, exclude_pkgs):
>          for p in self.cache:
> 



More information about the elbe-devel mailing list