[OE-core] [PATCH] gpg_sign: depress the owership warnings on homedir

Jia Zhang lans.zhang2008 at gmail.com
Thu Aug 24 03:23:14 UTC 2017


Sorry plz ignore this patch. I will send a new one.

Jia


On 08/24/2017 11:19 AM, Jia Zhang wrote:
> A gpg command, e.g, called by get_gpg_version(), may trigger such a warning:
> gpg: WARNING: unsafe ownership on homedir '/home/user/.gnupg'
>
> This sort of warning is harmless so it can be depressed through specifying
> --no-permission-warning.
>
> Signed-off-by: Jia Zhang <lans.zhang2008 at gmail.com>
> ---
>   meta/lib/oe/gpg_sign.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
> index 008478dfeb..7d58f93888 100644
> --- a/meta/lib/oe/gpg_sign.py
> +++ b/meta/lib/oe/gpg_sign.py
> @@ -98,7 +98,7 @@ class LocalSigner(object):
>           """Return the gpg version as a tuple of ints"""
>           import subprocess
>           try:
> -            ver_str = subprocess.check_output((self.gpg_bin, "--version")).split()[2].decode("utf-8")
> +            ver_str = subprocess.check_output((self.gpg_bin, "--version", "--homedir", self.gpg_path)).split()[2].decode("utf-8")
>               return tuple([int(i) for i in ver_str.split('.')])
>           except subprocess.CalledProcessError as e:
>               raise bb.build.FuncFailed("Could not get gpg version: %s" % e)




More information about the Openembedded-core mailing list