From a7591f4be3f9e741f5d1e5aeadd3ab20b497a252 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 20 Nov 2010 20:38:38 +0100 Subject: Simplify sourceballs creation * Read package lists directly from DB file * Make SVNREPO configurable --- misc-scripts/make-sourceball | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'misc-scripts/make-sourceball') diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball index 221d0ce..661f481 100755 --- a/misc-scripts/make-sourceball +++ b/misc-scripts/make-sourceball @@ -24,28 +24,26 @@ script_lock create_srcpackage() { if [ -d "$1" ]; then pushd "$1" >/dev/null - pkgver=$(. PKGBUILD; echo ${pkgver}) - pkgrel=$(. PKGBUILD; echo ${pkgrel}) - license=($(. PKGBUILD; echo ${license[@]})) - if ! [ $FORCE == 1 ] && ! chk_license ${license[@]} ; then - #Removed so as not to clutter failed.txt + pkgver=$(. PKGBUILD; echo ${pkgver}) + pkgrel=$(. PKGBUILD; echo ${pkgrel}) + license=($(. PKGBUILD; echo ${license[@]})) + if ! [ $FORCE == 1 ] && ! chk_license ${license[@]} ; then + # Removed so as not to clutter failed.txt #warning "$packagename license (${license[@]}) does not require source tarballs" cleanup 0 else msg "Creating source tarball for $packagename-$pkgver-$pkgrel" fi - local logfile="${LOGDIR}/sourceballs/$packagename" - if ! /usr/bin/makepkg --allsource --ignorearch >"$logfile" 2>&1; then - popd >/dev/null - /bin/gzip -f -9 "$logfile" + local logfile="${LOGDIR}/sourceballs/$packagename.gz" + if ! /usr/bin/makepkg --allsource --ignorearch 2>&1 | gzip >"$logfile"; then die "Failed to download source for $packagename-$pkgver-$pkgrel ($reponame-$arch)" fi - /bin/rm -f "$logfile"{,.gz} + /bin/rm -f "$logfile" local pkg_file="${packagename}-${pkgver}-${pkgrel}${SRCEXT}" - cp "$pkg_file" "${FTP_BASE}/${SRCPOOL}" + mv "$pkg_file" "${FTP_BASE}/${SRCPOOL}" popd >/dev/null @@ -57,18 +55,10 @@ set_umask [ ! -d "${LOGDIR}/sourceballs" ] && mkdir -p "${LOGDIR}/sourceballs" cd "$WORKDIR" -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 "Package '$packagename' does not exist in repo '$reponame-$arch'" - fi +if /usr/bin/svn export -q "$SVNREPO/$packagename" $packagename; then + create_srcpackage "$packagename/repos/$reponame-$arch" else - if /usr/bin/svn export -q "$SVNREPO/$packagename" $packagename; then - create_srcpackage "$packagename/repos/$reponame-$arch" - else - die "Package '$packagename' does not exist in repo '$reponame-$arch'" - fi + die "Package '$packagename' does not exist in repo '$reponame-$arch'" fi script_unlock -- cgit v1.2.3-24-g4f1b