Przeglądaj źródła

scripts: Move each statement into its own line

Guillem Jover 11 lat temu
rodzic
commit
30caac9aa9

+ 2 - 1
scripts/Dpkg/Conf.pm

@@ -99,7 +99,8 @@ sub parse {
 
     while (<$fh>) {
 	chomp;
-	s/^\s+//; s/\s+$//;   # Strip leading/trailing spaces
+	s/^\s+//;             # Strip leading spaces
+	s/\s+$//;             # Strip trailing spaces
 	s/\s+=\s+/=/;         # Remove spaces around the first =
 	s/\s+/=/ unless m/=/; # First spaces becomes = if no =
 	# Skip empty lines and comments

+ 3 - 1
scripts/Dpkg/Source/Package/V2.pm

@@ -729,7 +729,9 @@ sub load_allowed_binaries {
         open(my $incbin_fh, '<', $incbin_file)
             or syserr(g_('cannot read %s'), $incbin_file);
         while (<$incbin_fh>) {
-            chomp; s/^\s*//; s/\s*$//;
+            chomp;
+            s/^\s*//;
+            s/\s*$//;
             next if /^#/ or length == 0;
             $self->{allowed_binaries}{$_} = 1;
         }

+ 1 - 1
scripts/Dpkg/Source/Patch.pm

@@ -552,7 +552,7 @@ sub prepare_apply {
     my ($self, $analysis, %opts) = @_;
     if ($opts{create_dirs}) {
 	foreach my $dir (keys %{$analysis->{dirtocreate}}) {
-	    eval { make_path($dir, { mode => 0777 }); };
+	    eval { make_path($dir, { mode => 0777 }) };
 	    syserr(g_('cannot create directory %s'), $dir) if $@;
 	}
     }

+ 3 - 1
scripts/Dpkg/Substvars.pm

@@ -282,7 +282,9 @@ sub substvars {
             error($opts{msg_prefix} .
                   g_("too many substitutions - recursive ? - in '%s'"), $v);
         }
-        $lhs = $1; $vn = $2; $rhs = $3;
+        $lhs = $1;
+        $vn = $2;
+        $rhs = $3;
         if (defined($self->{vars}{$vn})) {
             $v = $lhs . $self->{vars}{$vn} . $rhs;
             $self->mark_as_used($vn);

+ 3 - 1
scripts/dpkg-gensymbols.pl

@@ -283,7 +283,9 @@ unless ($quiet) {
     my $after = File::Temp->new(TEMPLATE=>'dpkg-gensymbolsXXXXXX');
     $ref_symfile->output($before, package => $oppackage, template_mode => 1);
     $symfile->output($after, package => $oppackage, template_mode => 1);
-    seek($before, 0, 0); seek($after, 0, 0);
+
+    seek $before, 0, 0;
+    seek $after, 0, 0;
     my ($md5_before, $md5_after) = (Digest::MD5->new(), Digest::MD5->new());
     $md5_before->addfile($before);
     $md5_after->addfile($after);