On Tue, 2010-03-16 at 11:45 +0100, Kamil Páral wrote:
autoqa.conf and repoinfo.conf are now installed by 'make
install' provided
that they don't already exist. The same holds for autoqa.cron, it is now
installed only if it does not already exist.
Rationale: We don't want to have config files overwritten every time we
do 'make install' when developing. We want similar behavior as RPM
installation does.
Seems sensible to me, and you've wrapped it around a conditional. I
can't recall if we also install irb.cfg in the 'make install' process.
If so, that should probably be included in this?
$ rpm -qpc autoqa-0.3.1-1.fc12.noarch.rpm
/etc/autoqa.conf
/etc/cron.d/autoqa
/etc/repoinfo.conf
/usr/share/autotest/client/site_tests/rats_sanity/irb.cfg
Thanks,
James
---
Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index c4b3a28..23c1160 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,9 @@ install: build
install -d -m 0775 $(PREFIX)/var/cache/autoqa
install autoqa $(PREFIX)/usr/bin/
install -d $(PREFIX)/etc/cron.d
- install -m 0644 autoqa.cron $(PREFIX)/etc/cron.d/autoqa
+ [ -f $(PREFIX)/etc/cron.d/autoqa ] || install -m 0644 autoqa.cron
$(PREFIX)/etc/cron.d/autoqa
+ [ -f $(PREFIX)/etc/autoqa.conf ] || install -m 0644 autoqa.conf $(PREFIX)/etc/
+ [ -f $(PREFIX)/etc/repoinfo.conf ] || install -m 0644 repoinfo.conf $(PREFIX)/etc/
install -d $(PREFIX)$(HOOK_DIR)
for h in hooks/*; do cp -a $$h $(PREFIX)$(HOOK_DIR); done
install -d $(PREFIX)$(TEST_DIR)