Closed puxplaying closed 4 years ago
is there any reason you have closed this PR?
i am sure you have noticed that db.lck file gets removed in "fix pacman errors" option. but i am curious about the partially downloaded packages part. have you had a problem with such .part files? i have just checked my pkg directory and have not found any .part files in there. it does not seem to be a typical problem.
Like you pointed out, fix pacman errors already includes db.lck removal.
The removal of partially downloaded packages is suggested by the Arch wiki and this problem sometimes occurs on Manjaro when for example Pamac GUI crashes, somebody aborts a update or the machine crashes while downloading packages.
I was not sure if you are interested in it and so I closed it! But I'm happy to open a new PR, just let me know :)
i am interested in the removing of .part files. feel free to add a PR. almost anything recommended by the arch wiki is worth implementing.
i recommend to create a new code "section" (e.g. like "checking symlinks ..."). in my opinion, this would fit right after the "cleaning package cache ..." section (i.e. line 434).
Sorry for the late reply!
i recommend to create a new code "section" (e.g. like "checking symlinks ..."). in my opinion, this would fit right after the "cleaning package cache ..." section (i.e. line 434).
In my experience partially downloaded packages prevent pacman from updating, means it will not redownload the partially downloaded packages in question unless they are removed. This was the reason to put this step right after the mirror check. So I'm not sure if this function makes sense after checking symlinks. It would be better to either put it into the Fix pacman errors function or after the mirror check in func_m in my opinion.
i found the arch wiki entry about this: https://wiki.archlinux.org/index.php/Pacman#"Failed_to_commit_transaction_(invalid_or_corrupted_package)"_error
i see no point in integrating this into "fix pacman errors", because before the system is updated, a "pacman -Sc" command is issued, which (to my knowledge) removes every package, which is not installed.
i included it in "maintain system" in this commit: 1d2a835f3d2341035b75e3188161d80739104638 can you test it and report back? it works so far on my side.
as you notice, i have added some error checks and suitable output and a help text.
I have tested it on my systems and seems to work fine, great job!
This adds a check to remove the db.lck file in case it is present and also removes partially downloaded packages. I think this is beneficial in case of func_m to make sure the update will will work even if got aborted the first time for example.