[pacman-dev] IDEA: checkdb script
Hi! After yet another local database corruption I've got an idea for a script that will do the following: go through files in /var/lib/pacman/local/ and check dependencies of them with those, listed in /var/lib/pacman/{current,extra,testing,unstable,community} and try to repair any found problems. For example both pacman and pacman3 write wrong dependency info into local database after some actions with some packages (there are few bugs about this already, but some may be unknown) - this script could fix this by rebuilding dependency tree from repos (it's highly recommended that all packages in current are up-to-date for this, but not strictly necessary, because depends are changed not so frequently). Of course there is the problem with this - what if this script will build wrong dependency tree or have other bugs. :p But I think there shouldn't be big problem to ensure it will work like swiss watch, and it can be used to find bugs in pacman when doing -S / -R intensively. What do you think about this? -- Roman Kyrylych (Роман Кирилич)
On Sat, 23 Dec 2006 00:21:14 +0200 "Roman Kyrylych" <roman.kyrylych@gmail.com> wrote:
Hi!
After yet another local database corruption I've got an idea for a script that will do the following: go through files in /var/lib/pacman/local/ and check dependencies of them with those, listed in /var/lib/pacman/{current,extra,testing,unstable,community} and try to repair any found problems.
For example both pacman and pacman3 write wrong dependency info into local database after some actions with some packages (there are few bugs about this already, but some may be unknown) - this script could fix this by rebuilding dependency tree from repos (it's highly recommended that all packages in current are up-to-date for this, but not strictly necessary, because depends are changed not so frequently).
Of course there is the problem with this - what if this script will build wrong dependency tree or have other bugs. :p But I think there shouldn't be big problem to ensure it will work like swiss watch, and it can be used to find bugs in pacman when doing -S / -R intensively.
What do you think about this?
What if I build a custom package that has different deps but the same name as something in current/extra? Then the script would think it was wrong even though it wasn't. I'd probably want such a script to prompt me about things that it noticed wrong. Jason
Just a thought, but it strikes me that.. if this dependancy data is the same in each repo for all repos, shouldn't the data simply be included in a file in each repo to save on compile/build time? On 12/23/06, Jason Chu <jason@archlinux.org> wrote:
On Sat, 23 Dec 2006 00:21:14 +0200 "Roman Kyrylych" <roman.kyrylych@gmail.com> wrote:
Hi!
After yet another local database corruption I've got an idea for a script that will do the following: go through files in /var/lib/pacman/local/ and check dependencies of them with those, listed in /var/lib/pacman/{current,extra,testing,unstable,community} and try to repair any found problems.
For example both pacman and pacman3 write wrong dependency info into local database after some actions with some packages (there are few bugs about this already, but some may be unknown) - this script could fix this by rebuilding dependency tree from repos (it's highly recommended that all packages in current are up-to-date for this, but not strictly necessary, because depends are changed not so frequently).
Of course there is the problem with this - what if this script will build wrong dependency tree or have other bugs. :p But I think there shouldn't be big problem to ensure it will work like swiss watch, and it can be used to find bugs in pacman when doing -S / -R intensively.
What do you think about this?
What if I build a custom package that has different deps but the same name as something in current/extra? Then the script would think it was wrong even though it wasn't.
I'd probably want such a script to prompt me about things that it noticed wrong.
Jason
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
participants (3)
-
Christ Schlacta
-
Jason Chu
-
Roman Kyrylych