[xml/sgml-commit] r2217 - in /packages/xml-core/trunk: debhelper/dh_installxmlcatalogs debian/changelog tools/update-xmlcatalog

aerostitch-guest at users.alioth.debian.org aerostitch-guest at users.alioth.debian.org
Fri Feb 28 06:30:57 UTC 2014


Author: aerostitch-guest
Date: Fri Feb 28 06:30:57 2014
New Revision: 2217

URL: http://svn.debian.org/wsvn/debian-xml-sgml/?sc=1&rev=2217
Log:
  * Non-maintainer upload.
  * Adding an optional sorting switch to sort the catalog entries 
    (Closes: #626036). This switch is used by default while adding
    data through the dh_installxmlcatalogs debhelper.


Modified:
    packages/xml-core/trunk/debhelper/dh_installxmlcatalogs
    packages/xml-core/trunk/debian/changelog
    packages/xml-core/trunk/tools/update-xmlcatalog

Modified: packages/xml-core/trunk/debhelper/dh_installxmlcatalogs
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/xml-core/trunk/debhelper/dh_installxmlcatalogs?rev=2217&op=diff
==============================================================================
--- packages/xml-core/trunk/debhelper/dh_installxmlcatalogs	(original)
+++ packages/xml-core/trunk/debhelper/dh_installxmlcatalogs	Fri Feb 28 06:30:57 2014
@@ -128,6 +128,7 @@
 sub add_xmlcat_cmd ($$$;$) {
     my ($pkg, $type, $id, $local) = @_;
     my $cmd = 'update-xmlcatalog';
+    $cmd .= ' --sort'; # Adding auto-sort on catalog installation see #626036
     $cmd .= ' --add';
     $cmd .= " --type $type";
     $cmd .= " --id \"$id\"";

Modified: packages/xml-core/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/xml-core/trunk/debian/changelog?rev=2217&op=diff
==============================================================================
--- packages/xml-core/trunk/debian/changelog	(original)
+++ packages/xml-core/trunk/debian/changelog	Fri Feb 28 06:30:57 2014
@@ -1,3 +1,12 @@
+xml-core (0.13+nmu3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Adding an optional sorting switch to sort the catalog entries 
+    (Closes: #626036). This switch is used by default while adding
+    data through the dh_installxmlcatalogs debhelper.
+
+ -- Joseph HERLANT <herlantj at gmail.com>  Thu, 27 Feb 2014 12:07:52 +0100
+
 xml-core (0.13+nmu2) unstable; urgency=low
 
   * Non-maintainer upload.

Modified: packages/xml-core/trunk/tools/update-xmlcatalog
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/xml-core/trunk/tools/update-xmlcatalog?rev=2217&op=diff
==============================================================================
--- packages/xml-core/trunk/tools/update-xmlcatalog	(original)
+++ packages/xml-core/trunk/tools/update-xmlcatalog	Fri Feb 28 06:30:57 2014
@@ -83,6 +83,17 @@
 =item B<--help>
 
 Displays the usage information.
+
+=item B<--verbose>
+
+Optional switch to make a verbose output.
+
+=item B<--sort>
+
+Optional switch to sort the manipulated catalog content.
+
+Tip: To sort a catalog without adding or removing an item,
+just add an already existing item to the catalog.
 
 =back
 
@@ -144,6 +155,7 @@
 use vars qw( $root );
 use vars qw( $type $id );
 use vars qw( $verbose );
+use vars qw( $sort );
 
 ## ----------------------------------------------------------------------
 if ( ! GetOptions(
@@ -157,6 +169,7 @@
 		  'root'      => \$root,
 		  'type=s'    => \$type,
 		  'verbose'   => \$verbose,
+		  'sort'      => \$sort,
 		  )
      )
 {
@@ -483,7 +496,9 @@
     open( CATALOG_DATA, '>', $catalog_data )
 	or die "$name: cannot open catalog data $catalog_data for writing: $!";
     my $counter = 0;
-    for my $key ( keys %catalog )
+    # Adding the optional sort of the catalog. See #626036.
+    my @catalog_keys = ( $sort ? sort keys %catalog : keys %catalog );
+    for my $key ( @catalog_keys )
     {
 	print( CATALOG_DATA "<$key><$catalog{ $key }>\n" );
 	$counter++;
@@ -543,7 +558,9 @@
 
     ## ------------------------------------------------------------------
     my $counter = 0;
-    for my $key ( keys %catalog )
+    # Adding the optional sort of the catalog. See #626036.
+    my @catalog_keys = ( $sort ? sort keys %catalog : keys %catalog );
+    for my $key ( @catalog_keys )
     {
 	push( @catalog, "<$key $catalog{ $key }/>" );
 	$counter++;
@@ -615,6 +632,7 @@
 
 Options:
     --verbose = be verbose
+    --sort = sorts the manipulated catalog content
 
 END
 




More information about the debian-xml-sgml-commit mailing list