[debhelper-devel] [debhelper] 04/04: dh_gencontrol: Re-indent code

Niels Thykier nthykier at moszumanska.debian.org
Sat Jun 24 12:32:17 UTC 2017


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit 773641f541bd63f5f1dc64bf21548c873fe6a23f
Author: Niels Thykier <niels at thykier.net>
Date:   Sat Jun 24 12:31:46 2017 +0000

    dh_gencontrol: Re-indent code
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 dh_gencontrol | 164 +++++++++++++++++++++++++++++-----------------------------
 1 file changed, 82 insertions(+), 82 deletions(-)

diff --git a/dh_gencontrol b/dh_gencontrol
index 0f1a358..befc379 100755
--- a/dh_gencontrol
+++ b/dh_gencontrol
@@ -54,99 +54,99 @@ init(options => {
 });
 
 on_pkgs_in_parallel {
-foreach my $package (@_) {
-	my $tmp=tmpdir($package);
-	my $ext=pkgext($package);
-	my $dbgsym_info_dir = "debian/.debhelper/${package}";
-	my $dbgsym_tmp = "${dbgsym_info_dir}/dbgsym-root";
-
-	my $substvars="debian/${ext}substvars";
-	
-	my $changelog=pkgfile($package,'changelog');
-	if (! $changelog) {
-		$changelog='debian/changelog';
-	}
+	foreach my $package (@_) {
+		my $tmp=tmpdir($package);
+		my $ext=pkgext($package);
+		my $dbgsym_info_dir = "debian/.debhelper/${package}";
+		my $dbgsym_tmp = "${dbgsym_info_dir}/dbgsym-root";
 
-	install_dir("$tmp/DEBIAN");
+		my $substvars="debian/${ext}substvars";
 
-	# avoid gratuitous warning
-	if (! -e $substvars || system("grep -q '^misc:Depends=' $substvars") != 0) {
-		complex_doit("echo misc:Depends= >> $substvars");
-	}
-	# avoid (another) gratuitous warning
-	if (! -e $substvars || system("grep -q '^misc:Pre-Depends=' $substvars") != 0) {
-		complex_doit("echo misc:Pre-Depends= >> $substvars");
-	}
+		my $changelog=pkgfile($package,'changelog');
+		if (! $changelog) {
+			$changelog='debian/changelog';
+		}
 
-	my (@debug_info_params, $build_ids, @multiarch_params);
-	if ( -d $dbgsym_info_dir ) {
-		$build_ids = read_dbgsym_build_ids($dbgsym_info_dir);
-	}
+		install_dir("$tmp/DEBIAN");
 
-	if ( -d $dbgsym_tmp) {
-		my $multiarch = package_multiarch($package);
-		my $section = package_section($package);
-		my $replaces = read_dbgsym_migration($dbgsym_info_dir);
-		my $component = '';
-		if ($section =~ m{^(.*)/[^/]+$}) {
-			$component = "${1}/";
-			# This should not happen, but lets not propogate the error
-			# if does.
-			$component = '' if $component eq 'main/';
+		# avoid gratuitous warning
+		if (! -e $substvars || system("grep -q '^misc:Depends=' $substvars") != 0) {
+			complex_doit("echo misc:Depends= >> $substvars");
+		}
+		# avoid (another) gratuitous warning
+		if (! -e $substvars || system("grep -q '^misc:Pre-Depends=' $substvars") != 0) {
+			complex_doit("echo misc:Pre-Depends= >> $substvars");
 		}
 
-		# Remove and override more or less every standard field.
-		my @dbgsym_options = (qw(
-			-UPre-Depends -URecommends -USuggests -UEnhances -UProvides -UEssential
-			-UConflicts -DPriority=extra -UHomepage
-			-DAuto-Built-Package=debug-symbols
-			),
-			 "-DPackage=${package}-dbgsym",
-			 "-DDepends=${package} (= \${binary:Version})",
-			 "-DDescription=Debug symbols for ${package}",
-			 "-DBuild-Ids=${build_ids}",
-			 "-DSection=${component}debug",
-		);
-		# Disable multi-arch unless the original package is an
-		# multi-arch: same package.  In all other cases, we do not
-		# need a multi-arch value.
-		if ($multiarch ne 'same') {
-			push(@dbgsym_options, '-UMulti-Arch');
+		my (@debug_info_params, $build_ids, @multiarch_params);
+		if ( -d $dbgsym_info_dir ) {
+			$build_ids = read_dbgsym_build_ids($dbgsym_info_dir);
 		}
-		# If the dbgsym package is replacing an existing -dbg package,
-		# then declare the necessary Breaks + Replaces.  Otherwise,
-		# clear the fields.
-		if ($replaces) {
-			push(@dbgsym_options, "-DReplaces=${replaces}",
-				 "-DBreaks=${replaces}");
-		} else {
-			push(@dbgsym_options, '-UReplaces', '-UBreaks');
+
+		if ( -d $dbgsym_tmp) {
+			my $multiarch = package_multiarch($package);
+			my $section = package_section($package);
+			my $replaces = read_dbgsym_migration($dbgsym_info_dir);
+			my $component = '';
+			if ($section =~ m{^(.*)/[^/]+$}) {
+				$component = "${1}/";
+				# This should not happen, but lets not propogate the error
+				# if does.
+				$component = '' if $component eq 'main/';
+			}
+
+			# Remove and override more or less every standard field.
+			my @dbgsym_options = (qw(
+					-UPre-Depends -URecommends -USuggests -UEnhances -UProvides -UEssential
+						-UConflicts -DPriority=extra -UHomepage
+						-DAuto-Built-Package=debug-symbols
+					),
+				"-DPackage=${package}-dbgsym",
+				"-DDepends=${package} (= \${binary:Version})",
+				"-DDescription=Debug symbols for ${package}",
+				"-DBuild-Ids=${build_ids}",
+				"-DSection=${component}debug",
+			);
+			# Disable multi-arch unless the original package is an
+			# multi-arch: same package.  In all other cases, we do not
+			# need a multi-arch value.
+			if ($multiarch ne 'same') {
+				push(@dbgsym_options, '-UMulti-Arch');
+			}
+			# If the dbgsym package is replacing an existing -dbg package,
+			# then declare the necessary Breaks + Replaces.  Otherwise,
+			# clear the fields.
+			if ($replaces) {
+				push(@dbgsym_options, "-DReplaces=${replaces}",
+					"-DBreaks=${replaces}");
+			} else {
+				push(@dbgsym_options, '-UReplaces', '-UBreaks');
+			}
+			install_dir("${dbgsym_tmp}/DEBIAN");
+			doit("dpkg-gencontrol", "-p${package}", "-l$changelog", "-T$substvars",
+				"-P${dbgsym_tmp}",@{$dh{U_PARAMS}}, @dbgsym_options);
+
+			reset_perm_and_owner('0644', "${dbgsym_tmp}/DEBIAN/control");
+		} elsif ($build_ids) {
+			# Only include the build-id if there is no dbgsym package (if
+			# there is a dbgsym package, the build-ids into the control
+			# file of the dbgsym package)
+			push(@debug_info_params, "-DBuild-Ids=${build_ids}");
 		}
-		install_dir("${dbgsym_tmp}/DEBIAN");
-		doit("dpkg-gencontrol", "-p${package}", "-l$changelog", "-T$substvars",
-			"-P${dbgsym_tmp}",@{$dh{U_PARAMS}}, @dbgsym_options);
-
-		reset_perm_and_owner('0644', "${dbgsym_tmp}/DEBIAN/control");
-	} elsif ($build_ids) {
-		# Only include the build-id if there is no dbgsym package (if
-		# there is a dbgsym package, the build-ids into the control
-		# file of the dbgsym package)
-		push(@debug_info_params, "-DBuild-Ids=${build_ids}");
-	}
 
-	# Remove explicit "Multi-Arch: no" headers to avoid autorejects by dak.
-	push (@multiarch_params, '-UMulti-Arch')
-		if (package_multiarch($package) eq 'no');
+		# Remove explicit "Multi-Arch: no" headers to avoid autorejects by dak.
+		push (@multiarch_params, '-UMulti-Arch')
+			if (package_multiarch($package) eq 'no');
 
-	# Generate and install control file.
-	doit("dpkg-gencontrol", "-p$package", "-l$changelog", "-T$substvars",
-		"-P$tmp", @debug_info_params, @multiarch_params,
-		@{$dh{U_PARAMS}});
+		# Generate and install control file.
+		doit("dpkg-gencontrol", "-p$package", "-l$changelog", "-T$substvars",
+			"-P$tmp", @debug_info_params, @multiarch_params,
+			@{$dh{U_PARAMS}});
 
-	# This chmod is only necessary if the user sets the umask to
-	# something odd.
-	reset_perm_and_owner('0644', "${tmp}/DEBIAN/control");
-}
+		# This chmod is only necessary if the user sets the umask to
+		# something odd.
+		reset_perm_and_owner('0644', "${tmp}/DEBIAN/control");
+	}
 };
 
 sub read_dbgsym_file {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list