dash problem with dpkg-reconfigure

News and discussion about development of the Debian OS itself

dash problem with dpkg-reconfigure

Postby nadir » 2010-06-06 05:59

dpkg-reconfigure dash
gives me this:
Code: Select all
root# dpkg-reconfigure dash
dpkg-divert: mismatch on package
  when removing `diversion of /bin/sh by dash'
  found `diversion of /bin/sh to /bin/sh.distrib by bash'


My super-nanny gives me this:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582554
Code: Select all
root# dpkg-reconfigure --force dash
dpkg-divert: mismatch on package
  when removing `diversion of /bin/sh by dash'
  found `diversion of /bin/sh to /bin/sh.distrib by bash'


Odd problem and only a few useful search results. Some of those posts are very old ( ~ one year) Yesterday i had a bug-report including a patch, but i can't find it anymore.
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.
User avatar
nadir
 
Posts: 5964
Joined: 2009-10-05 22:06
Location: away

Re: dash problem with dpkg-reconfigure

Postby brain » 2010-06-06 09:02

dpkg-reconfigure --force dash wasn't a workaround/solution to bug 582554, it was a solution to Steven's problem with a dist-upgrade.
User avatar
brain
 
Posts: 253
Joined: 2006-04-25 17:15

Re: dash problem with dpkg-reconfigure

Postby bugsbunny » 2010-06-06 22:01

You should just wait for dash to be fixed. You can manually force dash to be the system shell, but it's a pain to do correctly. You need to remove, and then add 2, diversions. Plus you have to swap 2 sets of files around.

I know because I just did it. Started playing around after seeing this post. Changed the system shell (sh) from dash to bash. That part was easy :) (dpkg-reconfigure dash works fine for that, just answer NO). Trying to change it back I got the same error as you did. If you really want to manually do this:

swap the following 2 pairs of symlinks (Rename so A.distrib becomes A and A becomes A.distrib)
/bin/sh
/bin/sh.distrib

/usr/share/man/man1/sh.1.gz
/usr/share/man/man1/sh.distrib.1.gz

After the swap sh should run dash, and "man sh" should bring up the help for dash (the distrib versions should point to bash).
Next you have to fix the diversions. As root:
Code: Select all
dpkg-divert --package bash --remove /bin/sh
dpkg-divert --package bash --remove /usr/share/man/man1/sh.1.gz
dpkg-divert --package dash --divert /bin/sh.distrib --add /bin/sh
dpkg-divert --package dash --divert /usr/share/man/man1/sh.distrib.1.gz --add /usr/share/man/man1/sh.1.gz


After that you can test by running dpkg-reconfigure dash again and when you answer YES it should be fine. (Just don't answer NO unless you want to go through this again).
User avatar
bugsbunny
 
Posts: 5355
Joined: 2008-07-06 17:04

Re: dash problem with dpkg-reconfigure

Postby nadir » 2010-06-07 03:57

Bugsbunny, your how-to workaround the problem is very impressive (like most of your posts). But i think i will simply wait till its solved. Reason: for me the Shell (and all which comes with it, like env and that) is unknown territory.
But a big thanks for that (and i guess for others its more important to set dash as the system Shell, so they will have use of it)

I did only wanted to change it to test if i may work around the problems i had when dash was the system Shell, and my bash-scripting-training gave me little errors. Therefor i made bash the default again (as the most easy solution).
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.
User avatar
nadir
 
Posts: 5964
Joined: 2009-10-05 22:06
Location: away

Re: dash problem with dpkg-reconfigure

Postby nadir » 2010-06-18 15:42

If i am not wrong the problem got solved by todays upgrade.
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.
User avatar
nadir
 
Posts: 5964
Joined: 2009-10-05 22:06
Location: away


Return to Debian Development

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable