gpg_sign: depress the owership warnings on homedir
PATCH 1/1 gpg_sign: depress the owership warnings on homedir
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 <[email protected]>
--- meta/lib/oe/gpg_sign.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/gpg_sign.py +1 -1
@@ -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)
Signature · 1 line
2.14.1
Sorry plz ignore this patch. I will send a new one.
Jia
Quoted 24 lines · Jia Zhang
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 <[email protected]>--- meta/lib/oe/gpg_sign.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/lib/oe/gpg_sign.py +1
-1@@ -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)