From: Raphael Hertzog Date: Fri, 14 Mar 2008 18:35:58 +0000 (+0100) Subject: Misc bugfixes X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=632c7ee03ebfd7a31bff486ae7f0cd43d4c0cfbf;p=dpkg Misc bugfixes * scripts/Dpkg/Source/Package/V3_0/git.pm (can_build): Add the missing can_build() function. It checks if the source directory contains a .git directory. * scripts/Dpkg/Source/Patch.pm (get_type): Fix format specifier. --- diff --git a/scripts/Dpkg/Source/Package/V3_0/git.pm b/scripts/Dpkg/Source/Package/V3_0/git.pm index 73171a6a..1b4bef86 100644 --- a/scripts/Dpkg/Source/Package/V3_0/git.pm +++ b/scripts/Dpkg/Source/Package/V3_0/git.pm @@ -104,6 +104,11 @@ sub read_git_config { return \%ret; } +sub can_build { + my ($self, $dir) = @_; + return (-d "$dir/.git", _g("doesn't contain a git repository")); +} + sub do_build { my ($self, $dir) = @_; my @argv = @{$self->{'options'}{'ARGV'}}; diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm index 2135be0d..c186212f 100644 --- a/scripts/Dpkg/Source/Patch.pm +++ b/scripts/Dpkg/Source/Patch.pm @@ -410,7 +410,7 @@ sub get_type { } else { -f _ && return _g("plain file"); -d _ && return _g("directory"); - -l _ && return sprintf(_g("symlink to %"), readlink($file)); + -l _ && return sprintf(_g("symlink to %s"), readlink($file)); -b _ && return _g("block device"); -c _ && return _g("character device"); -p _ && return _g("named pipe");