Imported Upstream version 3.3.3
[debian/amanda] / perl / Amanda / DB / Catalog.pm
index 162c731e87abd1fa2249f618a4827f02f138ea3a..1d50025f9b377b09b3b47b582e1c8a3e9675724a 100644 (file)
@@ -1,8 +1,9 @@
-# Copyright (c) 2008, 2009, 2010 Zmanda, Inc.  All Rights Reserved.
+# Copyright (c) 2008-2012 Zmanda, Inc.  All Rights Reserved.
 #
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -401,11 +402,10 @@ TODO: add_dump
 
 =cut
 
-use Amanda::Logfile qw( :constants match_disk match_host
-                       match_datestamp match_level );
+use Amanda::Logfile qw( :constants );
 use Amanda::Tapelist;
 use Amanda::Config qw( :init :getconf config_dir_relative );
-use Amanda::Util qw( quote_string weaken_ref );
+use Amanda::Util qw( quote_string weaken_ref match_disk match_host match_datestamp match_level);
 use File::Glob qw( :glob );
 use warnings;
 use strict;
@@ -903,7 +903,7 @@ sub sort_dumps {
        for my $key (@$keys) {
            my ($rev, $k) = ($key =~ /^(-?)(.*)$/);
 
-           if ($k =~ /^(nparts|level)$/) {
+           if ($k =~ /^(nparts|level|filenum)$/) {
                # compare dump components numerically
                $res = $a->{$k} <=> $b->{$k};
            } else { # ($k =~ /^(hostname|diskname|write_timestamp|dump_timestamp)$/)