Hello Kilian and thanks for this bug report, which I can easily reproduce.

Kilian Krause wrote on 15/07/2022:
> Package: kea-ctrl-agent
> 
> After installation the kea-shell does not work because:
> # kea-shell
> Traceback (most recent call last):
>   File "/usr/sbin/kea-shell", line 27, in <module>
>     from kea_conn import CARequest # CAResponse
> ModuleNotFoundError: No module named 'kea_conn'
> #
> 
> Quite obviously with the current python3-kea-connector in Debian
> the following patch does seem correct:
> ---(snip)---
> --- /usr/sbin/kea-shell.orig  2022-07-15 22:20:46.534324145 +0200
> +++ /usr/sbin/kea-shell       2022-07-15 22:21:12.590348119 +0200
> @@ -24,7 +24,7 @@
> 
>  sys.path.append('/usr/lib/python3.10/site-packages/kea')
> 
> -from kea_conn import CARequest # CAResponse
> +from kea.kea_conn import CARequest # CAResponse
> 
>  if sys.version_info[0] == 2:
>      # This is Python 2.x
> @@ -34,7 +34,7 @@
>          return unicode(string, 'utf-8')
>  elif sys.version_info[0] == 3:
>      # This is Python 3.x
> -    import kea_connector3 as kea_connector
> +    import kea.kea_connector3 as kea_connector
>      auth8 = str
>  else:
>      # This is... have no idea what it is.
> ---(snip)---

I don't think that's the right fix: what we want is this line (in your
patch context):

sys.path.append('/usr/lib/python3.10/site-packages/kea')

to be:

sys.path.append('/usr/lib/python3/site-packages/kea')

which is there the Python files are actually installed. That's templated
upstream:

https://gitlab.isc.org/isc-projects/kea/-/blob/585bd6b4a90287bc659adb414c8ae9cb806b23b1/src/bin/shell/kea-shell.in#L25

but the result is not correct in our case. I'll look into this.

Paride

Reply via email to