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

feat: allow installation of multiple packages in one run #157

Merged
merged 15 commits into from
Oct 11, 2023
Merged

feat: allow installation of multiple packages in one run #157

merged 15 commits into from
Oct 11, 2023

Conversation

nobkd
Copy link
Contributor

@nobkd nobkd commented Oct 6, 2023

resolve #154

Introduce -m option (multi package / multi install)

Some changes:

  • move to separate functions
    • argument parser setup
    • repo query and installation
  • only exit program from start file
  • show current query
  • update opi help page
  • wrap start script with if __name__ == '__main__' : (will revert if not liked)

If you agree with the general changes, I'll try to write tests.

@nobkd nobkd changed the title feat: allow installation of multiple packages feat: allow installation of multiple packages in one run Oct 6, 2023
bin/opi Outdated Show resolved Hide resolved
bin/opi Outdated Show resolved Hide resolved
opi/__init__.py Outdated Show resolved Hide resolved
opi/__init__.py Outdated Show resolved Hide resolved
@nobkd
Copy link
Contributor Author

nobkd commented Oct 10, 2023

I added a test, but I don't know of a suitable package to be installed.
android-tools seems to only be in the main repo for Tumbleweed not Leap.
If you have one in mind, please suggest it? Thank you!

Alternatively I could expand the expect to also allow the hardware repo.

@asdil12
Copy link
Member

asdil12 commented Oct 10, 2023

I guess it would suffice if you would just do the same as 06_install_non_interactive.py but in one opi call (opi -n -m zfs html2text).
That should make the test simpler and cover enough of the opi codebase.

@nobkd
Copy link
Contributor Author

nobkd commented Oct 10, 2023

That wouldn't test for plugins in that case. (And it also would just check if it already was installed.) Is that alright?

@asdil12
Copy link
Member

asdil12 commented Oct 10, 2023

Then use something like opi -n -m zfs resilio-sync html2text yandex-disk.

@asdil12
Copy link
Member

asdil12 commented Oct 10, 2023

Each test module runs in a fresh container.

@nobkd
Copy link
Contributor Author

nobkd commented Oct 10, 2023

Thank you for the guidance.

bin/opi Outdated Show resolved Hide resolved
opi/plugins/chrome.py Outdated Show resolved Hide resolved
nobkd and others added 2 commits October 10, 2023 23:57
Co-authored-by: Dominik Heidler <[email protected]>
Co-authored-by: Dominik Heidler <[email protected]>
README.md Outdated Show resolved Hide resolved
@asdil12
Copy link
Member

asdil12 commented Oct 10, 2023

I guess now I remember why I replaced yandex-disk with resilio-sync in the past: The yandex repo doesn't seem to be that stable.
I guess we should drop yandex-disk from the test.

test/07_install_multiple.py Outdated Show resolved Hide resolved
@asdil12 asdil12 merged commit 7e89d9a into openSUSE:master Oct 11, 2023
2 checks passed
@nobkd nobkd deleted the multi-install branch October 11, 2023 10:11
@RafaelLinux
Copy link

Could I suggest to avoid "refresh" for each package to install? That's is, if I do:

opi -nm codecs chrome msedge brave vivaldi vscode anydesk teamviewer friture usbimager copyq puddletag ocenaudio autofirma

it will do a "refresh" (for nothing, cause were refreshed with "codecs" application installation).

And a last suggestion in "help" information about "-m" parameter ..... "space separated application names" ;)

Thank you anyway for considering.

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.

3 participants