fix rsync rules
authorMark Huang <mlhuang@cs.princeton.edu>
Fri, 10 Mar 2006 21:44:07 +0000 (21:44 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Fri, 10 Mar 2006 21:44:07 +0000 (21:44 +0000)
planetlab.mk
plc.mk

index 3c17ce0..d90d223 100644 (file)
@@ -4,7 +4,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2003-2006 The Trustees of Princeton University
 #
-# $Id: planetlab.mk,v 1.2 2006/03/10 16:56:02 mlhuang Exp $
+# $Id$
 #
 
 #
@@ -345,11 +345,15 @@ endif
         # Create package manifest
        sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/SRPMS" SRPMS > SRPMS/packages.xml
         # Populate repository
-       ssh $(SERVER) mkdir -p $(ARCHIVE)/$(BASE)
+       ssh $(SERVER) mkdir -p $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS
        rsync --delete --links --perms --times --group --compress --rsh=ssh \
-           --exclude "*-debuginfo-*.rpm" RPMS SRPMS $(SERVER):$(ARCHIVE)/$(BASE)/
-       ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
-       ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
+           $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*))) $(SERVER):$(ARCHIVE)/$(BASE)/RPMS/
+       ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/RPMS >/dev/null
+       ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/RPMS >/dev/null
+       rsync --delete --links --perms --times --group --compress --rsh=ssh \
+           $(wildcard SRPMS/*) $(SERVER):$(ARCHIVE)/$(BASE)/SRPMS/
+       ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
+       ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
 ifeq ($(TAG),HEAD)
         # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
        if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
diff --git a/plc.mk b/plc.mk
index bdfa72b..e7b44a4 100644 (file)
--- a/plc.mk
+++ b/plc.mk
@@ -4,7 +4,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2003-2005 The Trustees of Princeton University
 #
-# $Id: plc.mk,v 1.8 2005/12/22 22:29:37 mlhuang Exp $
+# $Id: plc.mk,v 1.9 2006/03/08 21:45:27 mlhuang Exp $
 #
 
 #
@@ -133,8 +133,8 @@ endif
        install -D -m 644 groups/stock_fc2_groups.xml RPMS/yumgroups.xml
         # Populate repository
        mkdir -p $(ARCHIVE)/$(BASE)
-       rsync --delete --links --perms --times --group --exclude "*-debuginfo-*.rpm" \
-           RPMS $(ARCHIVE)/$(BASE)/
+       rsync --delete --links --perms --times --group \
+           $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*))) $(ARCHIVE)/$(BASE)/
        yum-arch $(ARCHIVE)/$(BASE) >/dev/null
 ifeq ($(TAG),HEAD)
        ln -nsf $(ARCHIVE)/$(BASE) $(REPOS)