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

handle a SIGINT in all modes as a break after the currently running
dpkg transaction instead of ignoring it completely

David Kalnischkies лет назад: 14
Родитель
Сommit
b1803e01ec
2 измененных файлов с 7 добавлено и 4 удалено
  1. 4 3
      apt-pkg/deb/dpkgpm.cc
  2. 3 1
      debian/changelog

+ 4 - 3
apt-pkg/deb/dpkgpm.cc

@@ -860,6 +860,8 @@ static int racy_pselect(int nfds, fd_set *readfds, fd_set *writefds,
 */
 bool pkgDPkgPM::Go(int OutStatusFd)
 {
+   pkgPackageManager::SigINTStop = false;
+
    // Generate the base argument list for dpkg
    std::vector<const char *> Args;
    unsigned long StartSize = 0;
@@ -1429,9 +1431,8 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 }
 
 void SigINT(int sig) {
-   if (_config->FindB("APT::Immediate-Configure-All",false)) 
-      pkgPackageManager::SigINTStop = true;
-} 
+   pkgPackageManager::SigINTStop = true;
+}
 									/*}}}*/
 // pkgDpkgPM::Reset - Dump the contents of the command list		/*{{{*/
 // ---------------------------------------------------------------------

+ 3 - 1
debian/changelog

@@ -12,6 +12,8 @@ apt (0.8.16~exp13) UNRELEASED; urgency=low
     - call dpkg --assert-multi-arch with execvp instead of execv
     - save the universe by not printing messages about apport if a package
       with this name is not installed (Closes: #619646)
+    - handle a SIGINT in all modes as a break after the currently running
+      dpkg transaction instead of ignoring it completely
   * apt-pkg/depcache.cc:
     - if a M-A:same package is marked for reinstall, mark all it's installed
       silbings for reinstallation as well (LP: #859188)
@@ -70,7 +72,7 @@ apt (0.8.16~exp13) UNRELEASED; urgency=low
   * apt-pkg/contrib/fileutl.h:
     - fix compat with FileFd::OpenDescriptor() in ReadOnlyGzip mode
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Sun, 04 Mar 2012 22:40:27 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com>  Sun, 04 Mar 2012 22:59:55 +0100
 
 apt (0.8.16~exp12) experimental; urgency=low