[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#765366: apt: Could stop using unhonored DPKG_NO_TSTP environment variable



Package: apt
Version: 1.0.9.2
Severity: wishlist
Tags: patch

Hi!

dpkg has switched to spawn a subshell for conffile handling since
1.15.6, with the removal of the DPKG_NO_TSTP envvar support.

Here's a patch getting rid of such mentioned in apt. Althought I'm not
sure how far back you want to support dpkg versions.

Thanks,
Guillem
From 0aadeb13820a6e87ec4924d6d3e37aa491ff51b6 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Tue, 14 Oct 2014 13:52:33 +0200
Subject: [PATCH] Do not set unhonored DPKG_NO_TSTP variable for dpkg

Support for that variable was removed in dpkg in 1.15.6, in commit
6f037003e8b96878b485efb7cbd1f846e3bf4e97.
---
 apt-pkg/deb/dpkgpm.cc |  3 ---
 doc/dpkg-tech.dbk     | 10 +---------
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 04a13a8..c547792 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1509,9 +1509,6 @@ bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress)
 	       _exit(100);
 	 }
 
-	 /* No Job Control Stop Env is a magic dpkg var that prevents it
-	    from using sigstop */
-	 putenv((char *)"DPKG_NO_TSTP=yes");
 	 execvp(Args[0], (char**) &Args[0]);
 	 cerr << "Could not exec dpkg!" << endl;
 	 _exit(100);
diff --git a/doc/dpkg-tech.dbk b/doc/dpkg-tech.dbk
index 2584cf6..f95716c 100644
--- a/doc/dpkg-tech.dbk
+++ b/doc/dpkg-tech.dbk
@@ -404,15 +404,7 @@ As yet unwritten. You can refer to the other manuals for now. See
 <itemizedlist>
 <listitem>
 <para>
-DPKG_NO_TSTP - if set to a non-null value, this variable causes dpkg to run a
-child shell process instead of sending itself a SIGTSTP, when the user selects
-to background the dpkg process when it asks about conffiles.
-</para>
-</listitem>
-<listitem>
-<para>
-SHELL - used to determine which shell to run in the case when DPKG_NO_TSTP
-is set.
+SHELL - used to determine which shell to run.
 </para>
 </listitem>
 <listitem>
-- 
2.1.1.391.g7a54a76


Reply to: