Control: reassign -1 apt Hi!
On Tue, 2015-10-20 at 11:16:50 +0200, Harald Dunkel wrote: > Package: dpkg > Version: 1.17.25 > Use case: dpkg reports a config file conflict. I choose "z" to > edit the file (emacs) in a shell session (bash). > > Problem: I cannot leave emacs using ^X-^C or ^Z, because both > ^C and ^Z are disabled. Without second terminal I am stuck. I'm afraid I cannot see how this is a problem in dpkg as it does not ignore those signals in that case. I've not installed emacs though, but here's a session (using one of the dpkg-tests case) where I test that ^C and ^Z do work: ,--- # dpkg -i pkg-conff-prompt-1.deb (Reading database ... 3 files and directories currently installed.) Preparing to unpack pkg-conff-prompt-1.deb ... Unpacking pkg-conff-prompt (1) over (0) ... Setting up pkg-conff-prompt (1) ... Configuration file '/test-conffile' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** test-conffile (Y/I/N/O/D/Z) [default=N] ? z Type 'exit' when you're done. dpkg-tests/t-conffile-prompt# date +%s 1445369538 dpkg-tests/t-conffile-prompt# sleep 100 ^Z [1]+ Stopped sleep 100 dpkg-tests/t-conffile-prompt# fg sleep 100 ^C dpkg-tests/t-conffile-prompt# date +%s 1445369544 `--- Hmm, checking with apt I see that ^C does indeed not work there, and ^Z does not work as expected: ,--- # apt install pkg-conff-prompt-1.deb […] Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'pkg-conff-prompt' instead of 'pkg-conff-prompt-1.deb' The following packages will be upgraded: pkg-conff-prompt 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/764 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 [764 B] Reading changelogs... Done (Reading database ... 240716 files and directories currently installed.) Preparing to unpack .../pkg-conff-prompt-1.deb ... Unpacking pkg-conff-prompt (1) over (0) ... Setting up pkg-conff-prompt (1) ... Configuration file '/test-conffile' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** test-conffile (Y/I/N/O/D/Z) [default=N] ? z Type 'exit' when you're done. dpkg-tests/t-conffile-prompt# sleep 100 # ^Z not shown but bg apt. [1]+ Stopped apt install pkg-conff-prompt-1.deb dpkg-tests/t-conffile-prompt# fg # ^C ignored, ^Z shown but fg apt. apt install pkg-conff-prompt-1.deb ^C^Z [1]+ Stopped apt install pkg-conff-prompt-1.deb # kill %1 [1]+ Terminated apt install pkg-conff-prompt-1.deb # exit logout `--- And in addition when exiting the shell, it terminates apt's parent session and logs out, instead of getting back to dpkg, because apt has been backgrounded instead. So, reassigning to apt. :) Thanks, Guillem