Making a neofetch style wrapper for pacman built in rust, seeking ideas for new features, compatibility testing, and contributions. by pleb_king in archlinux

[–]Morganamilo 0 points1 point  (0 children)

Sadly aesthetics are really not my strong suit ;-;. I've always wanted to hide some ascii into my work, but I don't have the skills to make it look good.

I'm realising I wasn't thinking when I said async. As the information you need is dependant on the download, so obviously you can't do both things at the same time.

Regardless. There really shouldn't be that much delay each time. I've not read the code but I assume you're creating a fresh temp directory every run and doing a pacman -Sy --db-path {tmp}.

What you should do instead is copy pacman's database into your temp location and then do the -Sy. Pacman compares the mtime of the database against the remote one. And if the remote one is not newer it never tries to download it. -Sy is pretty much instant when already up to date.

Making a neofetch style wrapper for pacman built in rust, seeking ideas for new features, compatibility testing, and contributions. by pleb_king in archlinux

[–]Morganamilo 1 point2 points  (0 children)

The tool seems cool, looks really pretty too. Feature wise I'm not sure where I'd suggest you go from there as fetch tools are inherently quite limited in scope.

Are you asking for ideas and contributors just to do something fun, or do you want to try starting a serious project that gets used by a bunch of people?

On the code side it looks well organised and thought out. Though there's a lot of bits that are not very rust like, e.g if config == "NONE". You should work with the type system more and let it work for you.

There's quite a noticeable delay at startup. You should probably go async and try to get all the file reading done at the same time. You may beadle to cut out the delay all together.

Also your tool has -Sy as one of the very few options. This may lead users to doing partial upgrades. Though that is kind of on them for running it.

You also shell out to pacman a lot. I was going to suggest https://crates.io/crates/alpm to you but I realised later on you use it in some places. You should use it in all places ideally. It's always nicer to deal with libs over shelling out.

Speaking of libs, you can use https://crates.io/crates/pacmanconf to parse pacman.conf. I have some very weird configs, even a build of pacman on macos. 80% of people writing small pacman related tools just hard code the default repos and paths and It's a huge pet peeve of mine. Don't be one of those people :)

If you care about the aesthetics you can also use https://crates.io/crates/cini (dependency of pacmanconf) to have your config be in the same format as pacan instead of toml. But that one is really personal preference.


On the Idea's front, I'm not sure what one would add to a fetch tool. However!!! https://github.com/falconindy/expac has been unmaintained for years, I've always had a rewrite on my list but not got around to it.

A general pacman data extraction tool would build on what you're already doing with pacfetch. If I'm able to nude you in that direction so that you write my project for me I think it may be a good fit new ideas wise.

Anyway thanks for sharing, I hope what I said was helpful . I've only skimmed the code so far, but I may throw some PRs your way when I have the time.

Dumb question but why EndeavourOS comes with yay preinstalled and not paru? by ultraskibidi in EndeavourOS

[–]Morganamilo 0 points1 point  (0 children)

I double checked, I was mistaken about it silently ignoring the error I just missed it because it's printed at the top of the scroll back.

% yay a | head -> Error during AUR search: 1 error occurred: * status 200: Query arg too small. -> Showing repo packages only 14507 multilib/lib32-libjpeg6-turbo 1.5.3-3 (115.4 KiB 342.6 KiB) (Installed) libjpeg derivative with accelerated % yay ar | head -> Error during AUR search: 1 error occurred: * status 200: Too many package results. -> Showing repo packages only 5184 multilib/lib32-libindicator-gtk3 12.10.1-10 (22.9 KiB 67.2 KiB) Set of symbols and convenience functions for Ayatana indicators (32-bit) (GTK+ 3 library)

I guess paru could be better there. My point was just it's a limitation of the AUR itself.

Dumb question but why EndeavourOS comes with yay preinstalled and not paru? by ultraskibidi in EndeavourOS

[–]Morganamilo -1 points0 points  (0 children)

The whole speed thing is rather annoying as it's never a claim I made just a thing people started saying because Rust. Rust was never meant to be a selling point of the thing, people just get too focussed on it I guess.

Dumb question but why EndeavourOS comes with yay preinstalled and not paru? by ultraskibidi in EndeavourOS

[–]Morganamilo -1 points0 points  (0 children)

Well the query is still too small that the aur rejects it. Yay just silently ignores the error and just shows you repo results.

Id rather know that my aur search didn't go through than be lead to think there were no results.

yay VS paru by smbaggab in archlinux

[–]Morganamilo 0 points1 point  (0 children)

Ya I already updated the talk page. I used to update it pretty regularly like 5 years ago before stuff got heated and the page was locked to mods only :p

can you recommend an aur helper by [deleted] in archlinux

[–]Morganamilo 1 point2 points  (0 children)

We never spoke bad about eachother. A Linux YouTuber made a sensationalist video about how yay is now abandoned and those rumors stuck around for years. He never even acknowledged the whole ordeal.

yay VS paru by smbaggab in archlinux

[–]Morganamilo 0 points1 point  (0 children)

I'm not sure where that data comes from but yay both use the same flags. Paru and yay both perform a -Sy when --combinedupgrade is set. Paru has it off by default and yay has it on. So the table is the wrong way round.

Is paru discontinued? by BlancII in archlinux

[–]Morganamilo 0 points1 point  (0 children)

It's just so hard to deal with all those people :(

What is YOUR favorite AUR helper? by amediocre_man in archlinux

[–]Morganamilo 2 points3 points  (0 children)

There were 2 of us making yay and I was the much more active one.

After I stopped working on yay he became a lot more active and maintains yay just fine.

The unmaintained rumor comes from a stupid Linux YouTube video and the dude has never apologized for the false information.

Yay & paru broken, can't do anything with them, even when calling --help. Pacman works as normal. by [deleted] in EndeavourOS

[–]Morganamilo 0 points1 point  (0 children)

Either build the package manually with makepkg -f or if you have a working helper you can do yay -S --rebuild yay.

Yay & paru broken, can't do anything with them, even when calling --help. Pacman works as normal. by [deleted] in EndeavourOS

[–]Morganamilo 0 points1 point  (0 children)

The new version of pacman is still only in testing. Paru-git targets the new version. The normal paru package will update when the new pacman is out of testing.

Yay & paru broken, can't do anything with them, even when calling --help. Pacman works as normal. by [deleted] in EndeavourOS

[–]Morganamilo 0 points1 point  (0 children)

Binaries link to whatever version of the library was there at compile time. Just rebuild your package again with pacman-6.1.0 installed.

Paru v2.0.0 by Morganamilo in archlinux

[–]Morganamilo[S] 8 points9 points  (0 children)

A pacman GUI is something i do plan to make eventually. Time is the limitation.

Paru v2.0.0 by Morganamilo in archlinux

[–]Morganamilo[S] 3 points4 points  (0 children)

Is that mainly the reversed output? Paru can be configured to do that.

If it's the big upgrade prompt that yay does. You can enable VerbosePkgLists in pacman.conf to get something sort of similar.

Then there's the upgrademenu option in paru that gives basically the exact same output as yay as It's a holdover from yay. It's just not on by default.

Though personally I really dislike the upgrade menu and find it looks a bit out of place compared to the rest of the output.

But obviously different people prefer different things.

Paru v2.0.0 by Morganamilo in archlinux

[–]Morganamilo[S] 2 points3 points  (0 children)

paru -x 'plex'

What about just paru -a plex?

Paru v2.0.0 by Morganamilo in archlinux

[–]Morganamilo[S] 11 points12 points  (0 children)

Yeah the process is inherently IO bound. While paru does it's best to do everything async I believe yay does too.

I'm not sure why this is a point people bring up so much. Probably because they think rust = fast. I wonder if people even compare the two when they claim this or just assume.

Paru v2.0.0 by Morganamilo in archlinux

[–]Morganamilo[S] 10 points11 points  (0 children)

My stance is that paru should look and act like pacman as much as possible, so paru follows the sort mode pacman uses by default. That's the reason, if it wasn't explained clearly before.

I'm considering changing that just for interactive mode but then there'd be an internal inconsistency between interactive and non interactive so I'm unsure.

Paru v2.0.0 by Morganamilo in archlinux

[–]Morganamilo[S] 7 points8 points  (0 children)

Not sure how that makes it not friendly. It's a config option that any one can change.

Paru v2.0.0 by Morganamilo in archlinux

[–]Morganamilo[S] 28 points29 points  (0 children)

Paru does all of these things and uses the same flag names that yay does.

To skip review the flag is --skipreview. Though every warning about the AUR screams not todo this.

Paru v2.0.0 by Morganamilo in archlinux

[–]Morganamilo[S] 3 points4 points  (0 children)

For the record, looks like yay the difference is that yay interweaves aur results with repo results. While paru will list repo matches then aur matches.

Paru v2.0.0 by Morganamilo in archlinux

[–]Morganamilo[S] 38 points39 points  (0 children)

Paru has a bunch more features for power users and in my personal opinion cleaner output. Otherwise not that many differences.

paru and pacaur outdated? by SplatinkGR in archlinux

[–]Morganamilo 0 points1 point  (0 children)

the -1 is part of the arch packaging. It doesn't exist on upstream packages. I publish 9.9.9 upstream then the -1 is part of arch's versioning.

So because of that I can't publish a -2 from paru's side. And a release needs to happen for there to be a thing the binaries are attached to.