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

feature: add support for opkg (OpenWrt's package manager) #1053

Open
wants to merge 6 commits into
base: 2.x
Choose a base branch
from

Conversation

morrison12
Copy link
Contributor

Initial support for opkg ( Openwrt's package manager).
Addresses issue #1046.

@morrison12
Copy link
Contributor Author

morrison12 commented Jan 4, 2024

Although this is only opkg, should I rename it to openwrt and thus if any other OpenWrt-specifics (e.g. ProcD, UCI) happen along the could be grouped together. Either way works for me.

Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @morrison12! Apologies for the long delay reviewing this. Looks great overall, esp the test coverage! Couple of minor tweaks needed, I’m happy to make these changes when I have the time too if you don’t get there first!

"""

if force or (UPDATE_ENTRY not in host.get_fact(Packages)):
host.get_fact(Packages).update({UPDATE_ENTRY: [UPDATE_ENTRY]})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this won’t work in v3 since facts are no longer cached (fixes so many other issues). You could use host data to achieve the same though (compatible in both 2/3).

return arch_list


class Packages(FactBase):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency would you mind prefixing all the fact classes Opkg?

@Fizzadar
Copy link
Member

Fizzadar commented Mar 2, 2024

@morrison12 would you mind giving me write permissions on this branch? I'll fixup those issues to land this

@morrison12
Copy link
Contributor Author

@morrison12 would you mind giving me write permissions on this branch? I'll fixup those issues to land this

Done. Apologies for delay: real life exceeding its quota right now..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants