
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Pascal Bleser wrote:
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)
Or using this Python module: http://pyinotify.sourceforge.net/ RPM will be here in a few hours: http://linux01.gwdg.de/~pbleser/rpm-navigation.php?cat=Libraries/python-pyin... - -- -o) Pascal Bleser http://linux01.gwdg.de/~pbleser/ /\\ <pascal.bleser@skynet.be> <guru@unixtech.be> _\_v The more things change, the more they stay insane. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFE1trZr3NMWliFcXcRAtqBAKCLdT6kmuRXo4CTmjAZj5CELlN1CgCgmw04 zBC6tj48BdYlj7XASv/gfug= =MgUw -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory-help@opensuse.org