[Reproducible-commits] [dpkg] 54/61: Rename create_control_tar() variables to more meaningful names

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Sep 21 09:57:43 UTC 2015


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

lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit cd764c839c8c95a068ff701a126fc7e2d18a6161
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Fri Jan 17 12:58:15 2014 +0100

    Rename create_control_tar() variables to more meaningful names
---
 dpkg-deb/build.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index fff514a..b8bc322 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -238,15 +238,15 @@ static void
 create_control_tar(const char *dir, struct compress_params *control_compress_params,
                    int gzfd)
 {
-  int p1[2];
-  pid_t c1, c2;
+  int tar_pipefd[2];
+  pid_t tar_pid, compressor_pid;
 
   /* Fork a tar to package the control-section of the package. */
   unsetenv("TAR_OPTIONS");
-  m_pipe(p1);
-  c1 = subproc_fork();
-  if (!c1) {
-    m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
+  m_pipe(tar_pipefd);
+  tar_pid = subproc_fork();
+  if (!tar_pid) {
+    m_dup2(tar_pipefd[1],1); close(tar_pipefd[0]); close(tar_pipefd[1]);
     if (chdir(dir))
       ohshite(_("failed to chdir to '%.255s'"), dir);
     if (chdir(BUILDCONTROLDIR))
@@ -254,18 +254,18 @@ create_control_tar(const char *dir, struct compress_params *control_compress_par
     execlp(TAR, "tar", "-cf", "-", "--format=gnu", ".", NULL);
     ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
   }
-  close(p1[1]);
+  close(tar_pipefd[1]);
 
   /* And run the compressor on our control archive. */
 
-  c2 = subproc_fork();
-  if (!c2) {
-    compress_filter(control_compress_params, p1[0], gzfd, _("compressing control member"));
+  compressor_pid = subproc_fork();
+  if (!compressor_pid) {
+    compress_filter(control_compress_params, tar_pipefd[0], gzfd, _("compressing control member"));
     exit(0);
   }
-  close(p1[0]);
-  subproc_reap(c2, _("<compress> from tar -cf"), 0);
-  subproc_reap(c1, "tar -cf", 0);
+  close(tar_pipefd[0]);
+  subproc_reap(compressor_pid, _("<compress> from tar -cf"), 0);
+  subproc_reap(tar_pid, "tar -cf", 0);
 }
 
 static const char *const maintainerscripts[] = {

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



More information about the Reproducible-commits mailing list