From 1e5c28f36b0fd2d5ac1683c88d48e3d7c243e993 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 22:18:22 +0200 Subject: Adding upstream version 0.1.28. Signed-off-by: Daniel Baumann --- .../d_9ae9c81fc31f2694_perl_openssl_py.html | 142 +++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 coverage-report/d_9ae9c81fc31f2694_perl_openssl_py.html (limited to 'coverage-report/d_9ae9c81fc31f2694_perl_openssl_py.html') diff --git a/coverage-report/d_9ae9c81fc31f2694_perl_openssl_py.html b/coverage-report/d_9ae9c81fc31f2694_perl_openssl_py.html new file mode 100644 index 0000000..715454b --- /dev/null +++ b/coverage-report/d_9ae9c81fc31f2694_perl_openssl_py.html @@ -0,0 +1,142 @@ + + + + + Coverage for debputy/plugins/perl_openssl.py: 75% + + + + + +
+
+

+ Coverage for debputy/plugins/perl_openssl.py: + 75% +

+ +

+ 20 statements   + + + + +

+

+ « prev     + ^ index     + » next +       + coverage.py v7.2.7, + created at 2024-04-07 12:14 +0200 +

+ +
+
+
+

1import functools 

+

2import os 

+

3import subprocess 

+

4from typing import Any 

+

5 

+

6from debputy.plugin.api import ( 

+

7 DebputyPluginInitializer, 

+

8 BinaryCtrlAccessor, 

+

9 PackageProcessingContext, 

+

10) 

+

11from debputy.util import _error 

+

12 

+

13 

+

14def initialize(api: DebputyPluginInitializer) -> None: 

+

15 api.metadata_or_maintscript_detector( 

+

16 "perl-openssl-abi", 

+

17 detect_perl_openssl_abi, 

+

18 ) 

+

19 

+

20 

+

21@functools.lru_cache 

+

22def _resolve_libssl_abi(cmd: str) -> str: 

+

23 try: 

+

24 return subprocess.check_output([cmd]).strip().decode("utf-8") 

+

25 except FileNotFoundError: 

+

26 _error( 

+

27 f"The perl-openssl plugin requires that perl-openssl-defaults + libssl-dev is installed" 

+

28 ) 

+

29 except subprocess.CalledProcessError as e: 

+

30 _error(f"") 

+

31 

+

32 

+

33def detect_perl_openssl_abi( 

+

34 _unused: Any, 

+

35 ctrl: BinaryCtrlAccessor, 

+

36 _context: PackageProcessingContext, 

+

37) -> None: 

+

38 cmd = os.environ.get( 

+

39 "_PERL_SSL_DEFAULTS_TEST_PATH", 

+

40 "/usr/share/perl-openssl-defaults/get-libssl-abi", 

+

41 ) 

+

42 abi = _resolve_libssl_abi(cmd) 

+

43 ctrl.substvars.add_dependency("perl:Depends", f"perl-openssl-abi-{abi}") 

+
+ + + -- cgit v1.2.3