Просмотр исходного кода

dpkg-gencontrol: Rename $package_type to $pkg_type for uniformity

Guillem Jover лет назад: 18
Родитель
Сommit
2c4ab968fc
2 измененных файлов с 11 добавлено и 6 удалено
  1. 5 0
      ChangeLog
  2. 6 6
      scripts/dpkg-gencontrol.pl

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-05-12  Guillem Jover  <guillem@debian.org>
+
+	* scripts/dpkg-gencontrol.pl ($package_type): Rename to ...
+	($pkg_type): ... this, for uniformity.
+
 2008-05-12  Guillem Jover  <guillem@debian.org>
 
 	* src/help.c (do_script): Expand 'maint' to 'maintainer' in string.

+ 6 - 6
scripts/dpkg-gencontrol.pl

@@ -264,14 +264,14 @@ for my $f (qw(Maintainer Description Architecture)) {
 }
 $oppackage = $fields->{'Package'};
 
-my $package_type = $pkg->{'Package-Type'} ||
-                   tied(%$pkg)->get_custom_field('Package-Type') || 'deb';
+my $pkg_type = $pkg->{'Package-Type'} ||
+               tied(%$pkg)->get_custom_field('Package-Type') || 'deb';
 
-if ($package_type eq 'udeb') {
+if ($pkg_type eq 'udeb') {
     delete $fields->{'Homepage'};
 } else {
     for my $f (qw(Subarchitecture Kernel-Version Installer-Menu-Item)) {
-        warning(_g("%s package with udeb specific field %s"), $package_type, $f)
+        warning(_g("%s package with udeb specific field %s"), $pkg_type, $f)
             if defined($fields->{$f});
     }
 }
@@ -324,7 +324,7 @@ if (open(X, "<", $fileslistfile)) {
         chomp;
         next if m/^([-+0-9a-z.]+)_[^_]+_([\w-]+)\.(a-z+) /
                 && ($1 eq $oppackage)
-	        && ($3 eq $package_type)
+	        && ($3 eq $pkg_type)
 	        && (debarch_eq($2, $fields->{'Architecture'})
 		    || debarch_eq($2, 'all'));
         print(Y "$_\n") || &syserr(_g("copy old entry to new files list file"));
@@ -336,7 +336,7 @@ if (open(X, "<", $fileslistfile)) {
 my $sversion = $fields->{'Version'};
 $sversion =~ s/^\d+://;
 $forcefilename = sprintf("%s_%s_%s.%s", $oppackage, $sversion, $fields->{'Architecture'},
-			 $package_type)
+			 $pkg_type)
 	   unless ($forcefilename);
 print(Y $substvars->substvars(sprintf("%s %s %s\n", $forcefilename,
 				      $fields->{'Section'} || '-',