Package: needrestart
Version: 1.2-8+deb8u1
Severity: important

I've a running live system which is using /bin/zsh as interactive
shell and $SHELL is pointing to it. Inside a chroot I'm installing
Debian and then enter this chroot via:

  chroot /media/vg0-root /bin/bash

Now every package installation via dpkg fails:

| (test-jessie1)root@test-jessie1:~# apt-get install zsh
| Reading package lists... Done
| Building dependency tree
| Reading state information... Done
| Suggested packages:
|   zsh-doc
| The following NEW packages will be installed:
|   zsh
| 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
| Need to get 0 B/700 kB of archives.
| After this operation, 2,023 kB of additional disk space will be used.
| E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file 
or directory)
| dpkg (subprocess): unable to execute status logger ((test -x 
/usr/lib/needrestart/dpkg-status && /usr/lib/needrestart/dpkg-status || cat > 
/dev/null)): No such file or directory
| Selecting previously unselected package zsh.
| (Reading database ... 40973 files and directories currently installed.)
| Preparing to unpack .../archives/zsh_5.0.7-5_amd64.deb ...
| E: Sub-process /usr/bin/dpkg exited unexpectedly
| (test-jessie1)root@test-jessie1:~# echo $?
| 100

This is caused because of:

| (test-jessie1)root@test-jessie1:~# echo $SHELL
| /bin/zsh
| (test-jessie1)root@test-jessie1:~# ls -la /bin/zsh
| ls: cannot access /bin/zsh: No such file or directory

in combination with:

| (test-jessie1)root@test-jessie1:~# cat /etc/dpkg/dpkg.cfg.d/needrestart
| # needrestart - Restart daemons after library updates.
| #
| # Scan for (successfully) installed packages,
| # triggers needrestart in apt's Dpkg::Post-Invoke
| # hook.
| 
| status-logger=(test -x /usr/lib/needrestart/dpkg-status && 
/usr/lib/needrestart/dpkg-status || cat > /dev/null)

As soon as I unset $SHELL this works as expected again:

| (test-jessie1)root@test-jessie1:~# unset SHELL
| (test-jessie1)root@test-jessie1:~# apt-get install zsh
| Reading package lists... Done
| Building dependency tree
| Reading state information... Done
| Suggested packages:
|   zsh-doc
| The following NEW packages will be installed:
|   zsh
| 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
| Need to get 0 B/700 kB of archives.
| After this operation, 2,023 kB of additional disk space will be used.
| E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file 
or directory)
| Selecting previously unselected package zsh.
| (Reading database ... 40973 files and directories currently installed.)
| Preparing to unpack .../archives/zsh_5.0.7-5_amd64.deb ...
| Unpacking zsh (5.0.7-5) ...
| Setting up zsh (5.0.7-5) ...
| update-alternatives: using /bin/zsh5 to provide /bin/zsh (zsh) in auto mode
| update-alternatives: using /bin/zsh5 to provide /bin/rzsh (rzsh) in auto mode
| Scanning processes...
| Scanning candidates...
| Scanning kernel images...
| (test-jessie1)root@test-jessie1:~#

I'm aware that dpkg(1) says:

| SHELL  The program dpkg will execute when starting a new shell.

and I'm not sure whether needrestart really can do anything about
it. But I'm reporting it since other users might stumble upon this
as well and maybe something can be done about this "invalid $SHELL
setting" situation? Feel free to reassign as needed.

regards,
-mika-


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/2015-06-15t13-18...@devnull.michael-prokop.at

Reply via email to