A lot of folks were having trouble installing the “BSD Subsystem” package (v1.5) via Installer.app today, from the Nullriver repository. As a temporary measure, I put up an alternate copy of it in my repository and people started downloading it.
Some of those people installed it, because it looked like and update, even though it really wasn’t - it just installed the same thing on top of itself, for them.
And then I started getting email about how the ‘vi’ command was broken after people applied the update. So, I took down the package and started investigating. This shouldn’t have been happening, as it was literally the same zip file as they would download from the other site.
A quick ‘ls’ immediately showed the problem: the new version of Installer.app doesn’t appear to handle symbolic links in the package’s zip file and it trashes them. Fortunately, I think there are only three in that package. You can easily see if you are affected or not. First, ssh into your iPhone and run the following:
cd /usr/bin
ls -l more nano vi
If the output looks similar to this, then you are ok:
lrwxr-xr-x 1 root wheel 4 Oct 10 23:07 more -> less
lrwxr-xr-x 1 root wheel 4 Oct 10 23:07 nano -> pico
lrwxr-xr-x 1 root wheel 3 Oct 10 23:07 vi -> vim
If, however, it looks similar to this, then your symlinks are hosed:
-rwxr-xr-x 1 root wheel 4 Oct 24 21:53 more
-rwxr-xr-x 1 root wheel 4 Oct 24 21:53 nano
-rwxr-xr-x 1 root wheel 3 Oct 24 21:53 vi
If that’s the case, you can easily fix it by running these commands:
rm more nano vi
ln -s less more
ln -s pico nano
ln -s vim vi
Now you should be all set.
I have reported this apparent bug to Nullriver.
UPDATE: This will also be a problem for anyone who installed the BSD Subsystem via Installer.app 3.0 , at any time.
UPDATE: This bug is fixed in Installer.app 3.0b7. Also fixed: problems downloading & unpacking large packages and an inability to handle packages zipped up on Windows. You should update to this release as soon as you can.
-ste