Open Mic92 opened 9 years ago
No, there is no way to do this. There are two main blockers for adding this feature:
General dependency resolution has some catches as well, as there would have to be a lot of logic to support cross repo checks (probably wouldn't tackle this).
What this really means is I need to expand the scope of repose quite a bit to do more than just generate the database. It needs to become a general tool for managing "packages grouped together on the filesystem", which building a repository out of is just one thing it can do.
Another thing I've wondered if fit well with this is if repose should also be able to do things like 'remove everything but the most 3 packages' (I know things like pacleaner tackle this).
Now this is actually something I'd be interesting in doing, but I'd start it off by separating out the backend stuff into its own library, writing a separate tool, and, if its useful, eventually merge it together.
I forgot about this issue, I'm actually still interested in this feature. Work anything out with your python script?
Well. I have an LXC container, where I install packages with an AUR helper. Every package build gets exported to a directory. Then I use the script to detect new packages/updates/removed packages and update the repo as well as package signatures. The problem is still that it is not trivial to rebuild the dependency checker of pacman - that's why I just use the package state inside pacman database to see what package are still required.
https://gist.github.com/Mic92/2cbb6f7f4a02be57ae4e68afcfc1066d
On this machine I do not really care about disk space. So this solution works for me. Currently the script does not check, if an packages gets updated without having the version number changed. This could be fixed by checking mtime of the package.
Looks very nice. So for what its worth, you're not using repose anymore then I take it?
Anyways, as my personal repository has grown, I've found myself wanting a feature like this, an ability to manage and clean old packages (like keep only the last 3 recent versions), and in one case, ability to script things better.
I'll probably end up exposing a lot of internals to python through cffi shortly - its already how I've chosen to test my code.
I just use repo-add
and repo-remove
at the moment. One way to recycle pacman in a more efficient way, would be to put the database in a non-standard location and then set the NoExtract
option in pacman.conf to *
. Packages would be still registered in the pacman database, but do not have to actually extract files to the filesystem. However... now that I migrate slowly migrate everything to NixOS anyway, custom repos are no longer necessary for me, because their Hydra compiles every package.
Packages would be still registered in the pacman database, but do not have to actually extract files to the filesystem.
Not sure what you mean by this. You mean for inspecting the contents of a database without allowing anything to be installed?
Random trick I use, for what its worth, is I put my database's folder in the CacheDir list. It saves pacman from having the first "download" (copy) packages from my repository into /var/cache/pacman/pkg
Anyways, enjoy NixOS and thanks for the script.
I want to use the feature of pacman, that I have some packages explicitly installed and pacman keeps track of the dependencies. That way I can install/uninstall packages from yaourt and the packages gets synced in my repo automatically. At the moment some packages are installed just for the purpose of being in my repository.
Lets say, I use PKGDEST in /etc/makepkg.conf do export an AUR package with its dependencies to a directory and have
repose
to build a repo from it. And later I want remove this package again. Do you have a convenient way, to purge its dependencies as well? Or is about removing every dependency manually. I currently use a self-written python script to achieve something similar, but it has the disadvantage of having every package in repo installed.