This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch wheezy
in repository libdatetime-timezone-perl.

commit 3acec01a1e2162f49ce3fbd5bfce4ea1754c238a
Author: gregor herrmann <gre...@debian.org>
Date:   Wed Oct 26 19:17:59 2016 +0200

    Update debian/tools/update-tzdata.sh helper script.
    
    Use new upstream host, change some logic in debian version handling, and
    deal with changes in upstream VERSION handling.
    
    This script is only used manually for updating Olson database data.
---
 debian/tools/update-tzdata.sh | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/debian/tools/update-tzdata.sh b/debian/tools/update-tzdata.sh
index be2d945..868ad9b 100644
--- a/debian/tools/update-tzdata.sh
+++ b/debian/tools/update-tzdata.sh
@@ -5,19 +5,18 @@ die () {
     exit 1
 }
 
-#HOST=elsie.nci.nih.gov/pub
-HOST=munnari.oz.au/pub
-#HOST=ftp.iana.org/tz/releases
+HOST=https://www.iana.org/time-zones
 
 dh_testdir debian/changelog || die "You are not in the source package's root 
directory."
 
 debdbversion=$(head -n1 debian/changelog  | sed 's/^.*+\([0-9a-z]*\)).*$/\1/')
-updbversion=$(wget -q -O- ftp://${HOST}/ | grep tzdata | perl -pe 
's/.+".+tzdata(.+)\.tar.gz".+/$1/')
+updbversion=$(wget -q -O- ${HOST}/ | grep tzdata | perl -pe 
's/.+".+tzdata(.+)\.tar.gz".+/$1/')
+dttzversion=$(awk '/version =/ {print $3;}' dist.ini)
 
 if [ "$debdbversion" != "$updbversion" ] ; then
     echo "Debian dbversion $debdbversion != upstream dbversion $updbversion."
     echo "You might want to change the Debian dbversion in debian/changelog."
-    read -p "Continue with $debdbversion (y/N)? " CONTINUE
+    read -p "Continue with $updbversion (y/N)? " CONTINUE
     case $CONTINUE in
         y|Y)
             ;;
@@ -31,8 +30,8 @@ mkdir -p debian/tzdata || die "Cannot mkdir debian/tzdata."
 
 pushd debian/tzdata || die "Cannot cd debian/tzdata."
 
-    file=tzdata$debdbversion.tar.gz
-    url=ftp://${HOST}/$file
+    file=tzdata$updbversion.tar.gz
+    url=${HOST}/repository/releases/$file
 
     rm -f *
     
@@ -50,4 +49,12 @@ pushd debian/tzdata || die "Cannot cd debian/tzdata."
 
 popd
 
-perl -Ilib.bak tools/parse_olson --dir debian/tzdata --version $debdbversion 
--clean
+perl tools/parse_olson --dir debian/tzdata --version $updbversion --clean
+
+# add VERSION to files; fix Inf
+for f in $(find lib/DateTime -name "*.pm"); do
+       grep -q "::VERSION = '$dttzversion';" $f && continue
+       module=$(echo $f | perl -pe 
's{lib/DateTime/TimeZone/(.+)(?:(/.+))?.pm}{DateTime/TimeZone/$1$2}; 
s{/}{::}g;')
+       perl -pi -e "s|package $module;\s+|$&\{\\n  \\\$${module}::VERSION = 
'$dttzversion';\\n\}\\n|m" $f
+       perl -pi -e 
's|-Inf|DateTime::TimeZone::NEG_INFINITY|g;s|Inf|DateTime::TimeZone::INFINITY|g'
 $f
+done

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libdatetime-timezone-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to