[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r4912 - tzdata/trunk/debian



Author: aurel32
Date: 2011-08-22 20:23:22 +0000 (Mon, 22 Aug 2011)
New Revision: 4912

Modified:
   tzdata/trunk/debian/changelog
   tzdata/trunk/debian/control
   tzdata/trunk/debian/rules
Log:
  * Remove hardlinks to comply with the policy, by replacing identical
    files with symlinks. It also reduces the package size by 38% and 
    the installed size by 35%.



Modified: tzdata/trunk/debian/changelog
===================================================================
--- tzdata/trunk/debian/changelog	2011-08-22 20:11:45 UTC (rev 4911)
+++ tzdata/trunk/debian/changelog	2011-08-22 20:23:22 UTC (rev 4912)
@@ -1,6 +1,9 @@
 tzdata (2011h-4) UNRELEASED; urgency=low
 
   * Add build-arch and build-indep targets. 
+  * Remove hardlinks to comply with the policy, by replacing identical
+    files with symlinks. It also reduces the package size by 38% and 
+    the installed size by 35%.
 
  -- Aurelien Jarno <aurel32@debian.org>  Sat, 13 Aug 2011 15:48:55 +0200
 

Modified: tzdata/trunk/debian/control
===================================================================
--- tzdata/trunk/debian/control	2011-08-22 20:11:45 UTC (rev 4911)
+++ tzdata/trunk/debian/control	2011-08-22 20:23:22 UTC (rev 4912)
@@ -2,7 +2,7 @@
 Section: libs
 Priority: required
 Build-Depends: debhelper (>= 5.0.0)
-Build-Depends-Indep: po-debconf, openjdk-6-jre-headless
+Build-Depends-Indep: po-debconf, openjdk-6-jre-headless, fdupes
 Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
 Uploaders: Clint Adams <clint@debian.org>, Aurelien Jarno <aurel32@debian.org>
 Standards-Version: 3.9.2

Modified: tzdata/trunk/debian/rules
===================================================================
--- tzdata/trunk/debian/rules	2011-08-22 20:11:45 UTC (rev 4911)
+++ tzdata/trunk/debian/rules	2011-08-22 20:23:22 UTC (rev 4912)
@@ -72,6 +72,20 @@
 	# Generate a posixrules file
 	/usr/sbin/zic -d $(TZGEN) -p America/New_York
 
+	# Replace hardlinks by symlinks
+	cd $(TZGEN) ; \
+	fdupes -1 -H -q -R . | while read line ; do \
+	  set -- $${line} ; \
+	  tgt="$${1##./}" ; \
+	  shift ; \
+	  while [ "$$#" != 0 ] ; do \
+	    link="$${1##./}" ; \
+	    reltgt="$$(echo $$link | sed -e 's,[^/]\+$$,,g' -e 's,[^/]\+,..,g')$${tgt}" ; \
+	    ln -sf $${reltgt} $${link} ; \
+	    shift ; \
+	  done ; \
+	done
+
 	# Generate a java version
 	$(JHOME)/bin/java -jar $(JHOME)/jre/lib/javazic.jar -V $(VERSION) -d $(TZGEN_JAVA) $(TIMEZONES) $(TIMEZONES_JAVA)
 
@@ -100,7 +114,7 @@
 		    echo -n "__Choices: " ; \
 	    fi ; \
 	    cd $(CURDIR)/tzgen/$$i ; \
-	    find . -maxdepth 2 -type f | sed -e 's#^\./##' | \
+	    find . -maxdepth 2 -type f -o -type l | sed -e 's#^\./##' | \
 	    	egrep -v '^(Ashkhabad|Chungking|Dacca|Macao|Thimbu|Ulan_Bator|Faeroe|ACT|LHI|NSW|North|Queensland|South|Tasmania|Victoria|West|Argentina/ComodRivadavia|Buenos_Aires|Catamarca|Cordoba|Jujuy|Mendoza|Rosario|Louisville|Fort_Wayne|Indianapolis|Knox_IN|East-Indiana|East-Starke|Asmera|South_Pole|Saigon|Calcutta|Katmandu)$$' | \
 		sort -n | tr '\n' ',' | sed -e 's#,#, #g' -e 's#, $$#\n#' ; \
 	    echo "_Description: Time zone:" ; \


Reply to: