Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

postinstall autorebase not running cleanly

Tags:

cygwin

I am always getting an error when I add a package to cygwin, for example: Package: Unknown package autorebase.bat exit code 1

/var/log/setup.log.full indicates the problem:

2013/12/02 10:07:57 running: cmd.exe /c "C:\cygwin64\etc\postinstall\autorebase.bat"
2013/12/02 10:07:57 abnormal exit: exit code=1

Running cmd.exe /c "C:\cygwin\etc\postinstall\autorebase.bat" complains about dash not being found.

C:\Users\xxx>cmd /c C:\cygwin64\etc\postinstall\autorebase.bat
'dash' is not recognized as an internal or external command,
operable program or batch file.

So I changed autorebase.bat from

@echo off
rem Postinstall scripts are always started from the Cygwin root dir
rem so we can just call dash from here
path .\bin;%path%
dash /bin/rebaseall -p

to

@echo off
rem Postinstall scripts are always started from the Cygwin root dir
rem so we can just call dash from here
C:
cd C:\cygwin64
path .\bin;%path%
dash /bin/rebaseall -pv

After this change I can run cmd /c C:\cygwin64\etc\postinstall\autorebase.bat cleanly from the command prompt but the error still shows up when I add a package using a installer.

How do I fix this?

like image 939
Arin Chaudhuri Avatar asked Dec 02 '13 16:12

Arin Chaudhuri


1 Answers

This problem keeps coming up and up... with complicated (but non-working) solutions on offer all over the message boards. A working solution is implied by https://cygwin.com/faq/faq.html#faq.using.bloda. Oddly, I don't find any specific direction on the connection between the two from Cygwin.

As near as I understand it the Cygwin rebase (script 0p_000_autorebase.dash which executes at the end of a setup) runs into problems because it bumps up against other things you've installed. Most likely one of your anti-virus filters. One solution is to boot up in Safe+Networking mode, do the installation, then reboot. Everything worked fine (at least for me).

It probably doesn't help that the installation folders get a read-only flag (though I'm not exactly sure why this should matter, assuming that you're running setup in admin mode; but I might be missing something).

like image 115
Alex Rudnicky Avatar answered Jan 15 '23 08:01

Alex Rudnicky