[med-svn] r8732 - trunk/packages/ensembl/ensembl/trunk/debian
Andreas Tille
tille at alioth.debian.org
Wed Nov 30 20:29:27 UTC 2011
Author: tille
Date: 2011-11-30 20:29:26 +0000 (Wed, 30 Nov 2011)
New Revision: 8732
Modified:
trunk/packages/ensembl/ensembl/trunk/debian/changelog
trunk/packages/ensembl/ensembl/trunk/debian/prepare_ensembl_source_packages.sh
Log:
Fix prepare_ensembl_source_packages.sh
Modified: trunk/packages/ensembl/ensembl/trunk/debian/changelog
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/changelog 2011-11-30 15:53:19 UTC (rev 8731)
+++ trunk/packages/ensembl/ensembl/trunk/debian/changelog 2011-11-30 20:29:26 UTC (rev 8732)
@@ -4,6 +4,10 @@
* debian/control:
- Fixed Vcs fields
- Added myself to uploaders
+ * debian/prepare_ensembl_source_packages.sh:
+ - Make sure the files that should be removed will be really removed
+ - Make script way less noisy
+ - Simplyfy script and move result to policy conform dir (./tarballs)
-- Andreas Tille <tille at debian.org> Wed, 30 Nov 2011 13:30:15 +0100
Modified: trunk/packages/ensembl/ensembl/trunk/debian/prepare_ensembl_source_packages.sh
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/prepare_ensembl_source_packages.sh 2011-11-30 15:53:19 UTC (rev 8731)
+++ trunk/packages/ensembl/ensembl/trunk/debian/prepare_ensembl_source_packages.sh 2011-11-30 20:29:26 UTC (rev 8732)
@@ -3,87 +3,69 @@
# bail out upon error
set -e
-startdir=`pwd`
-destdir=.
+FORCE_ENSEMBL_VERSION=64
+destdir=`pwd`/../tarballs
ensemblversion=""
+PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
if [ -d debian ]; then
echo "I: Found debian directory, retrieving Ensembl version from debian/changelog"
- ensemblversion=`dpkg-parsechangelog | grep ^Version | head -1 | cut -f2 -d\ | cut -f1 -d-`
- destdir=..
+ if ! echo $@ | grep -q upstream-version ; then
+ # if called manually run uscan to obtain file and version number
+ # ensemblversion=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
+ ensemblversion=`uscan --verbose --force-download | \
+ grep "Newest version on remote site is .* local version is .*" | \
+ head -n 1 | \
+ sed "s/Newest version on remote site is \([-0-9.]\+\),.*/\1/"`
+ else
+ # If called by uscan
+ ensemblversion=`echo $@ | sed "s?^.*--upstream-version \([0-9.]\+\) .*${PKG}.*?\1?"`
+ if echo "$ensemblversion" | grep -q "upstream-version" ; then
+ echo "Unable to parse version number"
+ exit
+ fi
+ fi
fi
-
-
# All libraries must be of the same version - update them all or none
if [ -z "$ensemblversion" ]; then
- echo "W: Ensembl version previously unset, setting to '62'."
- ensemblversion=63
+ echo "W: Ensembl version previously unset, setting to '$FORCE_ENSEMBL_VERSION'."
+ ensemblversion=$FORCE_ENSEMBL_VERSION
fi
-downloaddir=$destdir/$ensemblversion.$$
-
-
-echo "I: Will download to directory '$downloaddir'."
-
-if [ ! -d "$downloaddir" ] ; then
- mkdir "$downloaddir"
-fi
+downloaddir="$destdir/ensembl-$ensemblversion"
+mkdir -p "$downloaddir"
cd "$downloaddir"
+##if [ 1 = 0 ] ; then ## debug
export CVSROOT=":pserver:cvsuser at cvs.sanger.ac.uk:/cvsroot/ensembl"
echo " * Logging in to Sanger CVS, type password CVSUSER"
cvs login
-echo
-echo "I: Performing checkout"
-echo
-
for package in ensembl-api ensembl-website
do
- echo "----------------------------------------------------"
- echo " $package"
- echo "----------------------------------------------------"
+ echo "I: Performing checkout of $package"
if [ -d "$dname" ]; then
echo "W: Skipping fetch of package '$dname', directory is already existing."
#(cd $i && cvs -z 3 update .)
else
- cvs -z 3 checkout -r branch-ensembl-${ensemblversion} ${package}
+ cvs -z 3 checkout -r branch-ensembl-${ensemblversion} ${package} > /dev/null 2> /dev/null
fi
echo
done
+##fi # end debug
-
-echo
-echo " Removing CVS directories."
-echo
-
+# set -x
# still in $downloaddir
find . -name CVS -a -type d | xargs -r rm -rf
-cd "$startdir"
+# Removing a series of files for better DFSG compliance
+find . -name "*.pdf" | grep -v ComparaTutorial | xargs -r rm
+rm -f ensembl-compara/scripts/synteny/BuildSynteny.jar
+# jalview is now in Debian and can be removed from the source tree
+rm -rf htdocs/jalview
-echo "I: Renaming for looking nice to ensembl-$ensemblversion"
-if [ -e "$$destdir/ensembl-$ensemblversion" ]; then
- echo " Moving existing file/folder 'ensembl-$ensemblversion' to 'ensembl-$ensemblversion.old'"
- rm -rf "ensembl-$ensemblversion.old"
- mv "$$destdir/ensembl-$ensemblversion" "$$destdir/ensembl-$ensemblversion.old"
-fi
-
-echo "I: Removing a series of files for better DFSG compliance"
-find "$destdir"/"ensembl-$ensemblversion" -name "*.pdf" | grep -v ComparaTutorial | xargs -r rm
-rm -f "$destdir"/"ensembl-$ensemblversion"/ensembl-compara/scripts/synteny/BuildSynteny.jar
-# The jalview.jar needs to remain in the source tree
-
-
-mv "$downloaddir" "$destdir/ensembl-$ensemblversion"
cd "$destdir"
-GZIP="--best --no-name" tar czvf ensembl_${ensemblversion}.orig.tar.gz ensembl-$ensemblversion
-
-echo
-echo "I: Success."
-echo
-echo "I: Left downloaded folder '$destdir/ensembl-$ensemblversion' intact."
-echo
+GZIP="--best --no-name" tar czf ensembl_${ensemblversion}.orig.tar.gz ensembl-$ensemblversion
More information about the debian-med-commit
mailing list