Log in

Bekijk de volledige versie : ipkg can't configure anymore: syntax error...



mumsoft
19-01-2008, 16:20
Hi,

I settled down to update my mt-daapd (firefly), so to re-compile it with help from my own how-to.
But first I thought it wise to do this:
ipkg upgrade
Gosh, that tries to update every installed package on my snow white brick. It took some ages, and I left my computer for more fun downstairs.
Coming back I saw some errors on the screen, but I had to go to bed. ZZZzzz

Next day, no hostname. Eh, 'hostname' is part of busybox, and there was no hostname link in /opt/bin anymore.
So I tried
ipkg install busybox.
That gives only a bunch of 'syntax error'-lines, I guess for each internal command one line:
Package busybox (1.9.0-1) installed in /opt/ is up to date.
Configuring busybox-links
syntax error
syntax error
....etc...

Also errors for configuring other packages, like:
postinst script returned status 255
ERROR: busybox-links.postinst returned 255
Configuring diffutils
syntax error
syntax error
syntax error
syntax error

Well, I searched the net for more info about ipkg, but I still don't know what it actually does, when it configures a package. I guess it needs some program that's not found, but that's just guessing.

Can anyone shed some more light on this matter? I would be obliged!

Marc

kfurge
20-01-2008, 00:52
Your fundamental problem is that the /bin/sh on the router is not capable of running some of the more elaborate pre/post install scripts in the packages. In particular, I found that the newer ipkg scripts have fixed the problem with packages overriding their busybox counterparts. Unfortunately, these scripts require the wonderfulness of bash to execute properly.

My new firmware image coming out really soon solves this problem. I made an application that looks for a KCSHELL environment variable. If that environment variable is set, then calling /bin/sh executes the shell referenced by KCSHELL, normally /opt/bin/bash. If it is not set, then calling /bin/sh executes the busybox shell. This approach guarantees Asus compatibility and eliminates annoying problems like what you're experiencing.

- K.C.

mumsoft
20-01-2008, 08:46
Hi,

Your fundamental problem is that the /bin/sh on the router is not capable of running some of the more elaborate pre/post install scripts in the packages. In particular, I found that the newer ipkg scripts have fixed the problem with packages overriding their busybox counterparts. Unfortunately, these scripts require the wonderfulness of bash to execute properly.

My new firmware image coming out really soon solves this problem. I made an application that looks for a KCSHELL environment variable. If that environment variable is set, then calling /bin/sh executes the shell referenced by KCSHELL, normally /opt/bin/bash. If it is not set, then calling /bin/sh executes the busybox shell. This approach guarantees Asus compatibility and eliminates annoying problems like what you're experiencing.

- K.C.

That's just beyond my expectations. When I composed my 'problem' I was well aware of your upcoming firmware, and of course I was convinced that that would sweep away my syntax errors. Nevertheless, from the other reply I learned that it all has to do with update-alternatives, and that Sollie once had given a solution for the same problem. But your solution is just wonderful. And I'll wait for it.
Then I will try to compile mt-daapd again.

Love
Marc