Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist/tools/dhcpv6-pd_ia: recognize Debian correctly #20487

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

mguetschow
Copy link
Contributor

@mguetschow mguetschow commented Mar 19, 2024

Contribution description

At least on my system, cat /etc/os-release contains NAME="Debian GNU/Linux" and not just NAME="Debian". This fixes the recognition logic to work in this case, too.

Also removing the platform.linux_distribution() part since that is deprecated since python 3.5 and removed since 3.7: https://docs.python.org/3.5/library/platform.html#platform.linux_distribution

Testing procedure

on Debian without keas installed, compile on master for a board with usb-cdc-ecm:

$ make -C examples/gnrc_border_router BOARD=feather-nrf52840-sense UPLINK=cdc-ecm term
...
Traceback (most recent call last):
  File ".../RIOT/dist/tools/dhcpv6-pd_ia/dhcpv6-pd_ia.py", line 72, in <module>
    main()
  File ".../RIOT/dist/tools/dhcpv6-pd_ia/dhcpv6-pd_ia.py", line 68, in main
    server.run()
  File ".../RIOT/dist/tools/dhcpv6-pd_ia/kea.py", line 110, in run
    self.install()
  File ".../RIOT/dist/tools/dhcpv6-pd_ia/base.py", line 92, in install
    self.installer = pkg.PackageManagerFactory.get_installer()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../RIOT/dist/tools/dhcpv6-pd_ia/pkg/__init__.py", line 50, in get_installer
    return AskToInstall()
           ^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class AskToInstall with abstract method _install

with this PR:

make -C examples/gnrc_border_router BOARD=feather-nrf52840-sense UPLINK=cdc-ecm term
...
Install package kea-dhcp6? [Y/n] 

Issues/PRs references

Encountered while working on #20192

@mguetschow mguetschow requested a review from miri64 as a code owner March 19, 2024 15:20
@github-actions github-actions bot added the Area: tools Area: Supplementary tools label Mar 19, 2024
@mguetschow mguetschow added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 19, 2024
@riot-ci
Copy link

riot-ci commented Mar 19, 2024

Murdock results

✔️ PASSED

666d429 dist/tools/dhcpv6-pd_ia: recognize Debian correctly

Success Failures Total Runtime
1 0 1 12s

Artifacts

@maribu maribu added this pull request to the merge queue Mar 19, 2024
Merged via the queue into RIOT-OS:master with commit 0c2601d Mar 20, 2024
27 checks passed
@mguetschow
Copy link
Contributor Author

Thanks!

@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants