alexheretic / aurto

Arch Linux AUR tool for managing an auto-updating local 'aurto' package repository
MIT License
135 stars 9 forks source link

Difference beetwen db and real packages #17

Closed mygithubthrowaway closed 5 years ago

mygithubthrowaway commented 5 years ago

Hi there, first of all: Thanks for this great software

My problem is simple: i don't know how but a lot of package is missing from the repo but are listed in the aurto repo db:


aurto status:
aurto v0.9.0 managing 122 aur packages

but


 ls -lrt /var/cache/pacman/aurto/ | wc -l
32

I don't now this is possible and how i can easy rebuild all packages.

Thanks

alexheretic commented 5 years ago

If you're package files have been deleted you can aurto remove and aurto add them to rebuild.

Save the output of pacman -Slq aurto and use it as the arguments for each.

This shouldn't happen but seems to in some cases. I wonder if aurto can check for db mismatches and rebuild as part of the update task.

alexheretic commented 5 years ago

Ie this will rebuild all aurto packages

aurto_pkgs=$(pacman -Slq aurto); aurto remove $aurto_pkgs; aurto add $aurto_pkgs
mygithubthrowaway commented 5 years ago

Ie this will rebuild all aurto packages

aurto_pkgs=$(pacman -Slq aurto); aurto remove $aurto_pkgs; aurto add $aurto_pkgs

very nice, thanks again.

The only strange thing I have done that may have affected package missing is:

paccache -ruk0

for pacman cache purge.

Could it have affected the package deletion?

alexheretic commented 5 years ago

paccache -ruk0 for pacman cache purge. Could it have affected the package deletion?

Yes actually that is an issue, /var/cache/pacman/aurto is registered as a CacheDir to avoid packages being copied locally to /var/cache/pacman/pkg. I'll probably remove this as yes paccache -ruk0 will remove all packages in the aurto repo that are not installed.

The disadvantage is duplicate packages on the local system, one in the cache one in the repo. Overall I think it's simpler and more rugged this way though so I'll make the change.

mygithubthrowaway commented 5 years ago

Many Thanks for the info, i don't use paccache anymore on my vps (for the moment) Keep going

alexheretic commented 5 years ago

I've released 0.9.1 which will no longer register the aurto repo as a CacheDir, cheers.