openSUSE / opi

OBS Package Installer (CLI)
GNU General Public License v3.0
242 stars 22 forks source link

Add support for dnf #58

Closed KaratekHD closed 3 years ago

KaratekHD commented 3 years ago

These changes should allow for dnf to be used as a backend instead of zypper. I made it so that opi creates the file ~/.config/opi/config.json with the following content on first start:

{
  "backend": "zypp"
}

You can then change the value to dnf if you like to. Please provide feedback for this so that I can improve this! ~Jens

asdil12 commented 3 years ago

Thanks for the contribution - the fact that you switched the indentation of all files you touched makes it hard to see what you actually did. Could you switch it back to tab indentation?

KaratekHD commented 3 years ago

I did? I probably have to check my IDE configuration.. Sure, will change that

KaratekHD commented 3 years ago

It's changed, but the diffs are still not really readable... If you want to, I can open a new pull request from a new fork without the messed up indents

asdil12 commented 3 years ago

The PR that deduplicates the repo creation code is merged now, so it should be easier to build on top of that - you will need to rebase, though.

KaratekHD commented 3 years ago

I hope this didn't mess anything up, this was the first rebase I ever did :sweat_smile:

KaratekHD commented 3 years ago

Alright, I am happy with this now, should I also bump the version number up?

asdil12 commented 3 years ago

Alright, I am happy with this now, should I also bump the version number up?

Not needed - this will be done on the next release.

KaratekHD commented 3 years ago

The code formatting was changed again making the diff pretty unreadable. Please also squash your commits together where it makes sense.

Changed it. I squashed some commits, but I can't figure out how to squash more of them, I hope this is enough

asdil12 commented 3 years ago

There are still many unrelated code style changes (spaces and linebreaks) and it seems that this is not properly rebased. Eg. you readded old code to the add_packman_repo function. I think it would be best to start freshly. You could backup your work somewhere and git rebase --hard origin master to get a fresh working space. To fix existing commits you can use git commit --amend to fix the last commit and git commit --fixup=[hash_of_commit_to_be_fixed] ; git rebase -i --autosquash [hash_of_commit_to_be_fixed]~1 if there are commits in between. With git rebase -i master you can reorganize your commits, squash them, reorder them, etc.

KaratekHD commented 3 years ago

I will reopen this soon.

KaratekHD commented 3 years ago

Alright, I reworked it, please have a look at it.