Bläddra i källkod

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.
Raphael Hertzog 18 år sedan
förälder
incheckning
632c7ee03e
2 ändrade filer med 6 tillägg och 1 borttagningar
  1. 5 0
      scripts/Dpkg/Source/Package/V3_0/git.pm
  2. 1 1
      scripts/Dpkg/Source/Patch.pm

+ 5 - 0
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'}};

+ 1 - 1
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");