From e2cc14311b1bfad0c30cef395a1a033cdef030c0 Mon Sep 17 00:00:00 2001 From: Eric Bélanger Date: Sun, 27 Jun 2010 23:40:38 -0400 Subject: sourceballs: Added community and community-testing support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Bélanger Signed-off-by: Pierre Schmitz --- config | 1 + cron-jobs/sourceballs | 2 +- misc-scripts/make-sourceball | 14 +++++++++++--- misc-scripts/sourceballs-cleanup | 5 +++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/config b/config index 57ae64b..1cd533f 100644 --- a/config +++ b/config @@ -2,6 +2,7 @@ FTP_BASE="/srv/ftp" SVNREPO="file:///srv/svn-packages" +SVNREPOCOMMUNITY="file:///srv/svn-community" CLEANUP_DESTDIR="/srv/package-cleanup" CLEANUP_DRYRUN=false diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs index ccb00ad..93cb842 100755 --- a/cron-jobs/sourceballs +++ b/cron-jobs/sourceballs @@ -2,7 +2,7 @@ ftpbase="/srv/ftp" srcbase="/srv/ftp/sources" -repos="core extra testing" #community" +repos="core extra testing community community-testing" . "$(dirname $0)/../db-functions" . "$(dirname $0)/../config" diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball index 610d7f1..37141c7 100755 --- a/misc-scripts/make-sourceball +++ b/misc-scripts/make-sourceball @@ -81,8 +81,16 @@ set_umask /bin/mkdir -p "$logpath" cd "$WORKDIR" -if /usr/bin/svn export -q "$SVNREPO/$packagename" $packagename; then - create_srcpackage "$packagename/repos/$reponame-$_arch" +if [[ "$reponame" = "community" || "$reponame" = "community-testing" ]]; then + if /usr/bin/svn export -q "$SVNREPOCOMMUNITY/$packagename" $packagename; then + create_srcpackage "$packagename/repos/$reponame-$_arch" + else + die "\tPackage '$packagename' does not exist in repo '$reponame-$_arch'" + fi else - die "\tPackage '$packagename' does not exist in repo '$reponame-$_arch'" + if /usr/bin/svn export -q "$SVNREPO/$packagename" $packagename; then + create_srcpackage "$packagename/repos/$reponame-$_arch" + else + die "\tPackage '$packagename' does not exist in repo '$reponame-$_arch'" + fi fi diff --git a/misc-scripts/sourceballs-cleanup b/misc-scripts/sourceballs-cleanup index 0a1ac4d..c7f284d 100755 --- a/misc-scripts/sourceballs-cleanup +++ b/misc-scripts/sourceballs-cleanup @@ -43,7 +43,7 @@ remove_old() { break fi done - if [ $skip -ne 1 ]; then + if [ $skip -ne 1 ]; then mv "$srcpkg" $SOURCE_CLEANUP_DESTDIR fi fi @@ -78,7 +78,8 @@ for sourceball in "$srcpath"/*$SRCEXT; do packagename=$(basename $sourceball) packagename=${packagename%-*-*$SRCEXT} - if ! /usr/bin/svn export -q --force "$SVNREPO/$packagename" "$packagename" >/dev/null 2>&1 ; then + if ! /usr/bin/svn export -q --force "$SVNREPO/$packagename" "$packagename" >/dev/null 2>&1 \ + && ! /usr/bin/svn export -q --force "$SVNREPOCOMMUNITY/$packagename" "$packagename" >/dev/null 2>&1 ; then echo "$packagename : no longer in svn. Removing sourceball." >> "$logfile" mv $sourceball $SOURCE_CLEANUP_DESTDIR elif [ -z "$(ls -A "$packagename/repos")" ]; then -- cgit v1.2.3-24-g4f1b