[Debian-l10n-commits] r2272 - in /dl10n/trunk: Changelog lib/Debian/Pkg/DebSrc.pm lib/Debian/Pkg/Tar.pm
nekral-guest at users.alioth.debian.org
nekral-guest at users.alioth.debian.org
Wed Jun 9 20:43:24 UTC 2010
Author: nekral-guest
Date: Wed Jun 9 20:43:23 2010
New Revision: 2272
URL: http://svn.debian.org/wsvn/?sc=1&rev=2272
Log:
* lib/Debian/Pkg/DebSrc.pm, lib/Debian/Pkg/Tar.pm: A file can be
included in multiple archives. The archives are parsed in reverse
order, and once extracted files do not need to be overridden.
Modified:
dl10n/trunk/Changelog
dl10n/trunk/lib/Debian/Pkg/DebSrc.pm
dl10n/trunk/lib/Debian/Pkg/Tar.pm
Modified: dl10n/trunk/Changelog
URL: http://svn.debian.org/wsvn/dl10n/trunk/Changelog?rev=2272&op=diff
==============================================================================
--- dl10n/trunk/Changelog (original)
+++ dl10n/trunk/Changelog Wed Jun 9 20:43:23 2010
@@ -1,3 +1,9 @@
+2010-06-09 Nicolas François <nicolas.francois at centraliens.net>
+
+ * lib/Debian/Pkg/DebSrc.pm, lib/Debian/Pkg/Tar.pm: A file can be
+ included in multiple archives. The archives are parsed in reverse
+ order, and once extracted files do not need to be overridden.
+
2010-06-09 Nicolas François <nicolas.francois at centraliens.net>
* html/pseudo-urls.html: There are no bug number with the DONE
Modified: dl10n/trunk/lib/Debian/Pkg/DebSrc.pm
URL: http://svn.debian.org/wsvn/dl10n/trunk/lib/Debian/Pkg/DebSrc.pm?rev=2272&op=diff
==============================================================================
--- dl10n/trunk/lib/Debian/Pkg/DebSrc.pm (original)
+++ dl10n/trunk/lib/Debian/Pkg/DebSrc.pm Wed Jun 9 20:43:23 2010
@@ -176,6 +176,7 @@
my $expr = shift;
my @found = ();
+# FIXME: There can be duplicates if the file exist in different archives
@found = $self->SUPER::file_matches($expr);
push @found, $self->{v3}->file_matches($expr)
@@ -208,12 +209,12 @@
my $self = shift;
my $file = shift;
my $length = shift || -1;
-
- if ($self->SUPER::file_exists($file)) {
- return $self->SUPER::file_content($file, $length);
- }
-
- return $self->{v3}->file_content($file, $length);
+ if ( (defined $self->{v3})
+ and $self->{v3}->file_exists($file)) {
+ return $self->{v3}->file_content($file, $length);
+ }
+
+ return $self->SUPER::file_content($file, $length);
}
=back
Modified: dl10n/trunk/lib/Debian/Pkg/Tar.pm
URL: http://svn.debian.org/wsvn/dl10n/trunk/lib/Debian/Pkg/Tar.pm?rev=2272&op=diff
==============================================================================
--- dl10n/trunk/lib/Debian/Pkg/Tar.pm (original)
+++ dl10n/trunk/lib/Debian/Pkg/Tar.pm Wed Jun 9 20:43:23 2010
@@ -300,7 +300,11 @@
# Store information
push(@{$self->{data}->{list_files}}, $name);
- if ($path ne '') {
+ if ( ($path ne '')
+ and (! -e $path)) {
+ # If a file already exist, it is not overwritten
+ # When multiple archives are extracted, they shall
+ # be extracted in reverse order.
my $dir = File::Basename::dirname($path);
File::Path::mkpath($dir, 0, 0755);
open(DISK, "> ".$path)
More information about the Debian-l10n-commits
mailing list