beyondmeh / piu

Cross platform package manager wrapper
ISC License
49 stars 11 forks source link

Manual installing doesn't work #25

Closed szezjo closed 2 years ago

szezjo commented 2 years ago

Recently I tested piu on Pop!_OS 21.04 (it's Ubuntu derivative, so it uses apt) and unfortunately manual installing seems to not work. From what I understand, instead of typing a command like this: sudo dpkg -i filename.deb I should do something like this: piu m filename.deb But the only thing displayed was this error:

dpkg: error: --install needs at least one package archive file argument

Type dpkg --help for help about installing and uninstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

It seemed for me like it wasn't catching a file path at all, so I did some digging and manual in fact wasn't getting any variable at all:

        [mM]|[mM][aA][nN][uU][aA][lL])
        eval ${PKGMAN}_manual
        bye
    ;;

So I think the fix should like that:

        [mM]|[mM][aA][nN][uU][aA][lL])
        shift 1
        eval ${PKGMAN}_manual "$@"
        bye
    ;;

The only question I really had if it was a bug or not, maybe I should use piu m the other way, but from what I have seen in the code, it doesn't seem like this is the case. Also sorry if when suggesting a fix it should be a pull request or something - it's my first time entering an issue to open-source project, so I really don't know how the process goes, to be completely honest.

beyondmeh commented 2 years ago

First,

it's my first time entering an issue to open-source project, so I really don't know how the process goes, to be completely honest.

Thank You! Submitting an issue, or even feedback of any sort, helps everyone using piu. I'm even somewhat humbled your first submission was to this project. Please continue to stay involved in open-source community!


Onto your issue, yes, that's definitely a bug. Not only did you identify it, but you also solved it. That's an awesome first bug report!

It's completely up to you, but I'd love if you submitted a PR with the fix. I think you deserve the credit for it and being added on as a piu contributor.

You don't have to, but I'd gladly merge it if you do :-)

edit: I'm sure you noticed, but that's actually a pretty big bug, it affects every platform not ubuntu derivatives