beyondmeh / piu Goto Github PK
View Code? Open in Web Editor NEWCross platform package manager wrapper
License: ISC License
Cross platform package manager wrapper
License: ISC License
Add support for zypper
which is OpenSUSE's package manager
Hello, would you accept a PR with osx support using brew?
Hi,
first of all: Thanks for this tool, it will save time and prevent headaches!
When using piu u
on my manjaro machine, this script executes the command pacman -Sy
, which does not upgrade packages but only updates the cache of pacman. The correct command would be pacman -Syu
or pacman -Syyu
.
Rocka84
Pepé Le Pew is copyrighted by Warner Bros., while it's probably isn't infringing since we give credit in the README's, certain Linux distros like Debian (see the DFSG) wouldn't allow piu
since the logo is considered non-free.
I would like to keep the cartoon skunk idea as a logo, but I'm not picky beyond that. An artistic masterpiece is also not required, anyone with minor art skills is welcome to contribute.
Attribution obviously would be given, since piu
is open-source.
If you can't program, but can draw, now is your chance to contribute to an open-source project!
Looking at the code I felt the urge to split the wrapper implementations in separate files like so:
- piu
- piu.bats
- wrappers/
- apt.sh
- apt.bats
- brew.sh
- brew.bats
- pacman.sh
- pacman.bats
It doesn't have to be done all at once. They can be individually split over time. Will most likely allow us to work on various features in parallel without conflicts, since now everyone should be editing the same file to do anything really.
Edit: Just realized that would break the installation process since right now one is prompted to download and copy the piu file into the bin directory. So the options are:
So i guess the scope of this is a bit more than I initially thought. I'd be interested in hearing what you think about all that.
Currently piu
only can update the package cache and print the number of package updates. All installs, removals, and package updating is not implemented yet.
What do you think about adding piu files
for listing files provided by a package?
For dnf
based installs it would be dnf repoquery -l
with optional -C
flag to avoid cache update.
# HELPWANTED:
# The below code will fail on similar named packages
# like chromium and chromium-bsu. The problem is two-fold
#
# 1. pacman searching needs to use ^PACKAGE$ to match
# exact names. `pacman -Qs $$@^` doesn't work, but how to
# properly escape is beyond me.
#
# 2. Output from `pacman -Sw` should be captured to get the
# exact filename of the package. Calling `ls` is sloppy
if ! pacman -Qs "$@" >/dev/null; then
sudo pacman -Sw --noconfirm "$@"
pacman -Qlp $(ls /var/cache/pacman/pkg/$@*)
else
pacman -Ql "$@"
fi
It has been wild seeing others contribute and add functionality to this project! I want to make a few changes to contribute back to everyone that's helped.
Credit where credit is due:
CONTRIBUTORS
file with everyone's information to thank everyone.
CONTRIBUTING
file. Something short and sweet like:
piu is supported and made possible by contributors like you! Submit a pull request today!
Expanding the Project
piu is going to become an organization on GitHub: "The PIU Project". The switchover will occur around the v2.0 mark.
I'm open to general feedback and any non-code suggestions you might have, please feel free to leave a comment here!
I use this package to write cross platform set up scripts. As part of that script, I need to install several packages. On at least apt, dnf, and yum, if you want to install a package without a confirmation prompt, you have to pass a “-y" confirmation flag; however, on brew, there is no confirmation flag so the command always fails when passing the flag.
I could probably pretty easily write a PR to make this package not pass on the "-y" flag to brew. Any other ideas on a better way to handle this?
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.
The syntax of the curl command seems to be wrong:
$ curl -o https://raw.githubusercontent.com/beyondmeh/piu/master/piu && sudo mv piu /usr/local/bin && sudo chmod +x /usr/local/bin/piu
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
Seems like it should be like so:
curl https://raw.githubusercontent.com/beyondmeh/piu/master/piu -o piu && sudo mv piu /usr/local/bin && sudo chmod +x /usr/local/bin/piu
or
wget https://raw.githubusercontent.com/beyondmeh/piu/master/piu && sudo mv piu /usr/local/bin && sudo chmod +x /usr/local/bin/piu
It would be convenient to install/update piu
with brew
instead of copy/pasting curl
command. I can create the formula, but the repo needs to carry version tags for the latest and greatest release.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.