-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 houghi wrote:
On Sun, Aug 06, 2006 at 11:15:31PM +0200, Hans-Peter Jansen wrote:
Sure, yast could do that by itself, and even on every start, but that would reduce user experience drastically for some setups (My local repo has about 500 packages..)
I notice this more and more that apparently a solution must be workable always in any situation. I believe that hinders development more then it helps as it, bcause most likely there will always be an exeption.
Yes, some thought needs to go into things. However due to the openness op /usr/src/packages/RPMS I do not think it is a good idea anymore.
Maybe a daemon, based on inotify, that triggers the rebuild everytime the repo changes, would be a smart solution to this problem..
If I would have the knowledge on how to write such a deamon, I would. Unfortunatly I am unable to do so. :-(
Actually that should be quite easy to do with a shell script, using inotify-tools [1] [2]: - ---8<------------------------------------------------------------ #!/bin/sh RPMDIRS=/usr/src/packages/RPMS/* REPODIR=/usr/src/packages/RPMS CACHEDIR=/usr/src/packages/RPMS/.cache inotifywait -m -eclose $RPMDIRS | while read event; do createrepo -q --cachedir="$CACHEDIR" "$REPODIR" >/dev/null done - ---8<------------------------------------------------------------ Would just need to make it somewhat smarter and only run createrepo if there hasn't been any write after a given amount of seconds (or minutes), because if rpmbuild creates several RPMS, it will trigger createrepo immediately although rpmbuild isn't finished with writing all of them. [1] http://inotify-tools.sourceforge.net/ [2] SUSE RPMs available in my repo: http://linux01.gwdg.de/~pbleser/rpm-navigation.php?cat=System/inotify-tools (2.2 is built and underway)
I've a patch pending to createrepo to speed this up considerably again, if the repo didn't change between invocations.
What is that patch doing ? :)
Also, consider using createrepo --cache
cheers
- --
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\