paru -Sc always cleans devel packages
Affected Version
paru -V: paru v1.5.0.r4.g9d9cdb1 - libalpm v12.0.2
Description
When I issue an paru -Sc and answer Y to
Clone Directory: /var/cache/paru/build
:: Do you want to remove all other AUR packages from cache? [Y/n]:
all built *-git packages are deleted from paru's cache - even all installed ones. By the way, this is not affected by the value of CleanMethod in the used pacman.conf file.
That's what -Sc. What do you expect it to do?
I expect for devel packages a similar behavior like for stable packages - both for repository and AUR packages: that the last version of the package is kept in paru's cache. To be a bit more specific: At least if in the used pacman.conf is set as:
CleanMethod = KeepInstalled
the installed version of a *-git package is kept in paru's cache.
Right, you didn't mention the clean method in the original issue. There's not code to treat devel packages differently. Are you sure the issue is devel packages always get cleaned and not some other factor?
Are you sure the issue is devel packages always get cleaned and not some other factor?
Of course I am not sure, but when using the scenario described above in the original issue, i.e.:
- Calling
paru -Sc; - Answering
Yto the third question mentioned above, I always get the built packages for-gitpackages cleaned but all stable packages - even from AUR - handled according to theCleanMethodvalue in the usedpacman.conf.
Do you get different results for -git packages in this scenario?
For comparison, here are the relevant content of my used configuration files:
/etc/paru.conf:
[options]
PgpFetch
Devel
Provides
DevelSuffixes = -git -cvs -svn -darcs -always
RemoveMake = ask
SudoLoop
CloneDir = /var/cache/paru/build
PacmanConf = /etc/pacman.conf
/etc/pacman.conf:
[options]
HoldPkg = pacman glibc
Architecture = auto
Color
CheckSpace
VerbosePkgLists
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
[custom]
SigLevel = Optional TrustAll
Server = file:///var/cache/artix-custom/pkg
[paru]
SigLevel = PackageOptional DatabaseOptional
Server = file:///var/cache/paru/pkg
# Standard Artix / Arch Linux repositories...
By the way, the described handling of -git packages in paru's cache remains the same if I do not use a local repository for paru. This behavior seems also not to be affected by the value of CleanMethod in pacman.conf: if this parameter either remains unset or is set to KeepInstalled or to KeepCurrent I always get the same clean behavior for -git packages in paru's cache.
I've just done exactly this and it has deleted the sudo package (and only sudo seemingly for some reason). Now without sudo and without knowing my root password, I am locked out of root privileges.
Currently trying to solve this without reinstalling Arch, but I'm not sure if it's possible. Quite a headache.
I do hope accidentally deleting base-devel packages would be made harder to prevent others from facing a similar fate. 1+ for this issue.
Not sure what you're on about as this issue is about clearing the paru cache.
Honestly, I'm not knowledgeable enough to tell you exactly why or what. But I'm quite sure this happened after doing paru -Sc.
I just saw this line in the installation section of the readme however: sudo pacman -S --needed base-devel
I think that would have prevented this problem? But since I installed paru via yay, I haven't run this command.
But anyways. If there is something I can do to make it more clear to you, let me know.