From 632c7ee03ebfd7a31bff486ae7f0cd43d4c0cfbf Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Fri, 14 Mar 2008 19:35:58 +0100 Subject: [PATCH] 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. --- scripts/Dpkg/Source/Package/V3_0/git.pm | 5 +++++ scripts/Dpkg/Source/Patch.pm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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"); -- 2.39.5