zqqw / pakku

Pacman wrapper with AUR support
GNU General Public License v3.0
39 stars 3 forks source link

What are the distro specific features? #25

Closed hochata closed 2 years ago

hochata commented 2 years ago

The README says options -Sn and -Sz will only work if they have distro specific support. I know @zqqw worked really hard for the Artix support, but there are some isArch, isArtix and isParabola variables defined and I am not sure how they change the behavior or what features they imply.

So, could someone list the supported extra features, by distro? I didn't even know that Pakku had Parabola only features.

zqqw commented 2 years ago

Arch, Artix and Parabola store the PKGBUILD's for the packages online in various different formats, in git repos which can be queried to checkout any version that is in there, and have to be. Arch changed it's arrangements recently thus breaking Pakku -Sn -Sz for a while. Artix was not previously supported. Parabola was, but I've not yet got round to installing Parabola to test if that even works (although nobody has ever complained either) so that is functioning as it originally was. Arch repo's were originally laid out like Parabola ones but are now more like Artix but not quite. So you have the original long and convoluted code path to download the right branch of the overall git repo (because the original Arch PKGBUILD's were all in one giant repo) and checkout the correct version. Then overlaid and intertwined with that (which is now routed for Parabola only) it will download and checkout the individual per package git repos that are now used in Arch and Artix. I tried to put in plenty of comments in the code for the bits I added. It's basically determining what distro is in use, what repo the package is in, and how to get the right PKGBUILD for it at the right version. AUR PKGBUILDS are obtained in a totally different manner again but that is mostly separate so is still pretty much original kitsunyan code barring small changes for Nim version updates. Also those isArch etc bools are no longer used and I just forgot to delete the declarations, they were used earlier on as it was simple to have some global variables when a lot of things were getting changed but it was kind of "namespace pollution." There are also some libalpm functions that have been wrapped but aren't used anywhere I saw, perhaps they could be commented out in case they came in useful later which might cut build times by a tiny tiny amount. Possibly other unused things are around too. There are some parts of the code that only runs at build time though.

hochata commented 2 years ago

Thanks! I'll try to clean up the code when I have time. It seems there is not really anything to document, other that non-standard repos requiring specific support.