New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature propose] versioning in pact, and pact upgrade & pact dist-upgrade (or the other way) #239

Closed
v-yadli opened this Issue Feb 21, 2015 · 62 comments

Comments

Projects
None yet
4 participants
@v-yadli
Contributor

v-yadli commented Feb 21, 2015

We'll have to come up with something in order to stop the confusion about commands yielding 127 silently.

The root case is that now dependency is handled without considering the versions of packages. However, Cygwin packages update with a dependency of constantly updating low level libraries such as libgcc1 (this package has been mentioned in quite a few issues) and unfortunately these low level libraries have no compatibility across different versions at all.

luckily we could reconstruct the dependency tree with "compatible version spans" (think about it like a dep tree with a slider on each tree node, allowing some interchangeable versions to present), and all the packages captured in a pact update command are assumed to be compatible with each other.

Thus, if the low level packages are not changes across pact update repo snapshots, we could say that the packages are compatible with the previous versions, and thus we could code up 'pact upgrade'.

Also, if the low level packages are changed, we could say that it's a "dist-upgrade" like going from Fancy_Distro_Name X to Fancy_Distro_Name X+1. An external program (not relying on the Cygwin env to be upgraded) is needed though.

This will stop the problem on the Cygwin side, but not those real package dependency problems.
However imho Cygwin is not designed to be used like this anyway. We might work it out the other way by not fetching a new package list that frequently. It's like to drop 'pact upgrade' completely and leaves only pact dist-upgrade.

update: related issues:
#235 #232 #231 #229 #225 #222 #210 #203 (and possibly more)

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Feb 22, 2015

Contributor

Thank you for this extremely constructive voice in the discussion about babun updates!
When I released babun last year I knew that this problem would eventually pop-up, but I had deferred it till the moment when it actually becomes a pain in the neck... As you said, it's the perfect moment to solve it now.

Would it be possible to schedule a skype call where we could discuss the possible solutions and decide to implement one of them? All people who are interested in this topic are welcome to participate.
@v-yadli @jlupi What do you think?

Contributor

tombujok commented Feb 22, 2015

Thank you for this extremely constructive voice in the discussion about babun updates!
When I released babun last year I knew that this problem would eventually pop-up, but I had deferred it till the moment when it actually becomes a pain in the neck... As you said, it's the perfect moment to solve it now.

Would it be possible to schedule a skype call where we could discuss the possible solutions and decide to implement one of them? All people who are interested in this topic are welcome to participate.
@v-yadli @jlupi What do you think?

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Feb 23, 2015

Contributor

Sure! :) Where are you guys? I'm in CST +8. It's Chinese new year here and it's no problem to arrange it in the working hours.

Sent from my Sony Xperia™ smartphone

---- Tom Bujok wrote ----

Thank you for this extremely constructive voice in the discussion about babun updates!
When I released babun last year I knew that this problem would eventually pop-up, but I had deferred it till the moment when it actually becomes a pain in the neck... As you said, it's the perfect moment to solve it now.

Would it be possible to schedule a skype call where we could discuss the possible solutions and decide to implement one of them? All people who are interested in this topic are welcome to participate.
@v-yadli @jlupi What do you think?


Reply to this email directly or view it on GitHub:
#239 (comment)

Contributor

v-yadli commented Feb 23, 2015

Sure! :) Where are you guys? I'm in CST +8. It's Chinese new year here and it's no problem to arrange it in the working hours.

Sent from my Sony Xperia™ smartphone

---- Tom Bujok wrote ----

Thank you for this extremely constructive voice in the discussion about babun updates!
When I released babun last year I knew that this problem would eventually pop-up, but I had deferred it till the moment when it actually becomes a pain in the neck... As you said, it's the perfect moment to solve it now.

Would it be possible to schedule a skype call where we could discuss the possible solutions and decide to implement one of them? All people who are interested in this topic are welcome to participate.
@v-yadli @jlupi What do you think?


Reply to this email directly or view it on GitHub:
#239 (comment)

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 9, 2015

Contributor

@tombujok after thinking about this again I feel that leaving dist-upgrade only would be a better idea. Less effort and more consistency. Please drop me a mail if you'd like to schedule a meeting.

Contributor

v-yadli commented Mar 9, 2015

@tombujok after thinking about this again I feel that leaving dist-upgrade only would be a better idea. Less effort and more consistency. Please drop me a mail if you'd like to schedule a meeting.

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 9, 2015

Contributor

Thanks! I was also thinkg about it and the dist-upgrade options seems the only reasonable solution.
dist-updrade could be implemented in the following way:

  • in babun we keep track of the underlying cygwin version (e.g. using their versioning 1.7.35)
  • we also keep track of the newest cygwin version, e.g. like here, but in the cygwin.version file:
    https://github.com/babun/babun/blob/master/babun.version
  • babun update compares the current and the newest cygwin version - in the same way as it already does with the babun's version.
  • whenver a new cygwin version is released we increment the marker in the cygwin.version file, so that the babun check command may printa message that a dist-updrade is necessary
  • whenever a pact install / uninstall command is executed the cygwin's versions are also compared, not allowing the user to install a new package if he/she is not running on the newest cygwin version
  • we also code up a upgrade.bat file that could be executed to execute the dist-upgrade

The upgrade.bat file would:

  • download the newest setup-x86.exe from cygwin.com
  • execute the cygwin update silently pointing to the babun's cygwin folder

Open questions:
1.) Does the dist-upgrade looking like above make sense to everybody? Am I missing something here?
2.) Would the setup-x86.exe dist-upgrade silently recognize and upgrade all packages that have been already installed with pact?
3.) Do also we show a popup message on babun.bat start asking whether the user would like to do the dist-upgrade?

Contributor

tombujok commented Mar 9, 2015

Thanks! I was also thinkg about it and the dist-upgrade options seems the only reasonable solution.
dist-updrade could be implemented in the following way:

  • in babun we keep track of the underlying cygwin version (e.g. using their versioning 1.7.35)
  • we also keep track of the newest cygwin version, e.g. like here, but in the cygwin.version file:
    https://github.com/babun/babun/blob/master/babun.version
  • babun update compares the current and the newest cygwin version - in the same way as it already does with the babun's version.
  • whenver a new cygwin version is released we increment the marker in the cygwin.version file, so that the babun check command may printa message that a dist-updrade is necessary
  • whenever a pact install / uninstall command is executed the cygwin's versions are also compared, not allowing the user to install a new package if he/she is not running on the newest cygwin version
  • we also code up a upgrade.bat file that could be executed to execute the dist-upgrade

The upgrade.bat file would:

  • download the newest setup-x86.exe from cygwin.com
  • execute the cygwin update silently pointing to the babun's cygwin folder

Open questions:
1.) Does the dist-upgrade looking like above make sense to everybody? Am I missing something here?
2.) Would the setup-x86.exe dist-upgrade silently recognize and upgrade all packages that have been already installed with pact?
3.) Do also we show a popup message on babun.bat start asking whether the user would like to do the dist-upgrade?

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 10, 2015

Contributor

1.) "•whenever a pact install / uninstall command is executed the cygwin's versions are also compared, not allowing the user to install a new package if he/she is not running on the newest cygwin version"

This is a solid way to guarantee consistency. However, it might occur too frequently that it would break the whole work flow. How about still letting a user to install from the old repo package list file? The old packages are very likely to be still there (and that's how I recovered from mistakenly installed new packages at first). It is indeed necessary to inform users that Cygwin has moved forward so the current snapshot would be dropped indefinitely.

I'm playing around the installer and see if it does the job for us...

Contributor

v-yadli commented Mar 10, 2015

1.) "•whenever a pact install / uninstall command is executed the cygwin's versions are also compared, not allowing the user to install a new package if he/she is not running on the newest cygwin version"

This is a solid way to guarantee consistency. However, it might occur too frequently that it would break the whole work flow. How about still letting a user to install from the old repo package list file? The old packages are very likely to be still there (and that's how I recovered from mistakenly installed new packages at first). It is indeed necessary to inform users that Cygwin has moved forward so the current snapshot would be dropped indefinitely.

I'm playing around the installer and see if it does the job for us...

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 10, 2015

Contributor

"2.) Would the setup-x86.exe dist-upgrade silently recognize and upgrade all packages that have been already installed with pact?"

Yes please see -g option.
The installer is quite nice :-)

Contributor

v-yadli commented Mar 10, 2015

"2.) Would the setup-x86.exe dist-upgrade silently recognize and upgrade all packages that have been already installed with pact?"

Yes please see -g option.
The installer is quite nice :-)

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 10, 2015

Contributor

ad.1) But how would we know that the older versions of installed packaged are compatible with the older cygwin dist?
ad.2) Would you paste a "command" that does the upgrade silently assuming that the setup-x86.exe is in the current folder and that the current folder is the .babun folder?

Contributor

tombujok commented Mar 10, 2015

ad.1) But how would we know that the older versions of installed packaged are compatible with the older cygwin dist?
ad.2) Would you paste a "command" that does the upgrade silently assuming that the setup-x86.exe is in the current folder and that the current folder is the .babun folder?

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 10, 2015

Contributor

@tombujok Could you please drop me a mail to yatli@microsoft.com? There's a very interesting solution I'd like to discuss with you. The basic idea is that we can setup a server to record all the changes from Cygwin. And babun users can then use RESTful API to query the server and pull back dependency information.

Contributor

v-yadli commented Mar 10, 2015

@tombujok Could you please drop me a mail to yatli@microsoft.com? There's a very interesting solution I'd like to discuss with you. The basic idea is that we can setup a server to record all the changes from Cygwin. And babun users can then use RESTful API to query the server and pull back dependency information.

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 10, 2015

Contributor

@v-yadli Email sent!
What I am afraid of is that we will intensively rely on our own logic and that we will make assumptions about Cygwin that will not always hold - so that the whole upgrade system may collapse at the end...
For example when somebody upgrades from version X to version X+3 (skipping 2 version inbetween).

Cygwin guys frequently change things. If we could rely on their setup.exe upgrade mechanism we would be 100% sure that everything works in every update... WDYT?

Contributor

tombujok commented Mar 10, 2015

@v-yadli Email sent!
What I am afraid of is that we will intensively rely on our own logic and that we will make assumptions about Cygwin that will not always hold - so that the whole upgrade system may collapse at the end...
For example when somebody upgrades from version X to version X+3 (skipping 2 version inbetween).

Cygwin guys frequently change things. If we could rely on their setup.exe upgrade mechanism we would be 100% sure that everything works in every update... WDYT?

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 10, 2015

Contributor

@tombujok this dist-upgrade looks pretty good to me

whenever a pact install / uninstall command is executed the cygwin's versions are also compared, not allowing the user to install a new package if he/she is not running on the newest cygwin version

This is a solid way to guarantee consistency. However, it might occur too frequently that it would break the whole work flow. How about still letting a user to install from the old repo package list file?

But how would we know that the older versions of installed packaged are compatible with the older cygwin dist?

Both are very good points. We should consider what is the better option taking into account that there were about 8-10 cygwin releases in the past year
1.7.31 Jul 2014 https://cygwin.com/ml/cygwin-announce/2014-07/msg00010.html
1.7.32 Aug 2014 https://cygwin.com/ml/cygwin-announce/2014-08/msg00020.html
1.7.33 Oct 2014 https://cygwin.com/ml/cygwin-announce/2014-10/msg00042.html
1.7.34 Nov 2014 https://cygwin.com/ml/cygwin-announce/2014-11/msg00020.html
1.7.35 Mar 2015 https://cygwin.com/ml/cygwin-announce/2015-03/msg00009.html

It would be interesting to know if Red-Hat has a fixed schedule for cygwin releases or if it rather happens ad-hoc.

What I am afraid of is that we will intensively rely on our own logic and that we will make assumptions about Cygwin that will not always hold

I would also rather rely on cygwin's installer for now (also to avoid complexity).
However there are some requests to support a downgrade of packages. Looks like with this solution we'll rather not be able to do that (it might be necessary to downgrade the whole dist).
@v-yadli would your solution be able to support this?

Contributor

jlupi commented Mar 10, 2015

@tombujok this dist-upgrade looks pretty good to me

whenever a pact install / uninstall command is executed the cygwin's versions are also compared, not allowing the user to install a new package if he/she is not running on the newest cygwin version

This is a solid way to guarantee consistency. However, it might occur too frequently that it would break the whole work flow. How about still letting a user to install from the old repo package list file?

But how would we know that the older versions of installed packaged are compatible with the older cygwin dist?

Both are very good points. We should consider what is the better option taking into account that there were about 8-10 cygwin releases in the past year
1.7.31 Jul 2014 https://cygwin.com/ml/cygwin-announce/2014-07/msg00010.html
1.7.32 Aug 2014 https://cygwin.com/ml/cygwin-announce/2014-08/msg00020.html
1.7.33 Oct 2014 https://cygwin.com/ml/cygwin-announce/2014-10/msg00042.html
1.7.34 Nov 2014 https://cygwin.com/ml/cygwin-announce/2014-11/msg00020.html
1.7.35 Mar 2015 https://cygwin.com/ml/cygwin-announce/2015-03/msg00009.html

It would be interesting to know if Red-Hat has a fixed schedule for cygwin releases or if it rather happens ad-hoc.

What I am afraid of is that we will intensively rely on our own logic and that we will make assumptions about Cygwin that will not always hold

I would also rather rely on cygwin's installer for now (also to avoid complexity).
However there are some requests to support a downgrade of packages. Looks like with this solution we'll rather not be able to do that (it might be necessary to downgrade the whole dist).
@v-yadli would your solution be able to support this?

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 11, 2015

Contributor

@jlupi Nak I discussed with @tombujok and I realized that it will not work as expected given that old Cygwin packages will be removed from the repo.

However, as per:
http://cygwin.com/faq/faq.html#faq.setup.cli

2.6.

Can I use Cygwin Setup to get old versions of packages (like gcc-2.95)?

Cygwin Setup can be used to install any packages that are on a Cygwin mirror, which usually >includes one version previous to the current one. The complete list may be searched at https://cygwin.com/packages/. There is no complete archive of older packages. If you have a problem with the current version of a Cygwin package, please report it to the mailing list using the guidelines at https://cygwin.com/problems.html.

That said, if you really need an older package, you may be able to find an outdated or archival mirror by searching the web for an old package version (for example, gcc2-2.95.3-10-src.tar.bz2), but keep in mind that this older version will not be supported by the mailing list and that installing the older version will not help improve Cygwin.

If I understand correctly, even if the old packages are not binary compatible with the new ones, one can still compile them from source. Yet the problem is still that older packages are to be "searched over the internet"...

Contributor

v-yadli commented Mar 11, 2015

@jlupi Nak I discussed with @tombujok and I realized that it will not work as expected given that old Cygwin packages will be removed from the repo.

However, as per:
http://cygwin.com/faq/faq.html#faq.setup.cli

2.6.

Can I use Cygwin Setup to get old versions of packages (like gcc-2.95)?

Cygwin Setup can be used to install any packages that are on a Cygwin mirror, which usually >includes one version previous to the current one. The complete list may be searched at https://cygwin.com/packages/. There is no complete archive of older packages. If you have a problem with the current version of a Cygwin package, please report it to the mailing list using the guidelines at https://cygwin.com/problems.html.

That said, if you really need an older package, you may be able to find an outdated or archival mirror by searching the web for an old package version (for example, gcc2-2.95.3-10-src.tar.bz2), but keep in mind that this older version will not be supported by the mailing list and that installing the older version will not help improve Cygwin.

If I understand correctly, even if the old packages are not binary compatible with the new ones, one can still compile them from source. Yet the problem is still that older packages are to be "searched over the internet"...

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 12, 2015

Contributor

The installer automatically updates with the following command:

setup-x86.exe -s http://mirrors.kernel.org/sourceware/cygwin -R "D:\your_cygwin_root" -g -N -d -q -a x86 -B

explaination:

-R for Cygwin root
-g for upgrade
-N for not creating startup menu entries
-d for not creating desktop shortcut
-q for quiet (not really!)
-a X86
-B do not elevate.

However the GUI is still shown and even with "quiet mode" (-q) it still won't go away.
Is there any general way of disabling a window?

Contributor

v-yadli commented Mar 12, 2015

The installer automatically updates with the following command:

setup-x86.exe -s http://mirrors.kernel.org/sourceware/cygwin -R "D:\your_cygwin_root" -g -N -d -q -a x86 -B

explaination:

-R for Cygwin root
-g for upgrade
-N for not creating startup menu entries
-d for not creating desktop shortcut
-q for quiet (not really!)
-a X86
-B do not elevate.

However the GUI is still shown and even with "quiet mode" (-q) it still won't go away.
Is there any general way of disabling a window?

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 12, 2015

Contributor

Thanks! We hacked on it a bit at Hackergarten on Tuesday and @airborn pushed a pull request:
#246

It contains the script that will do the dist-upgrade. @v-yadli Could you review it?
Unfortunately it's impossible to get rid of the window completely, but the user will not be asked anything, and Admin rights are not required, so I think it's OK...

Contributor

tombujok commented Mar 12, 2015

Thanks! We hacked on it a bit at Hackergarten on Tuesday and @airborn pushed a pull request:
#246

It contains the script that will do the dist-upgrade. @v-yadli Could you review it?
Unfortunately it's impossible to get rid of the window completely, but the user will not be asked anything, and Admin rights are not required, so I think it's OK...

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 12, 2015

Contributor

Awesome! I just added a quick note on the .bat file.
As for the GUI I agree with you. It does provide some nice progress indicators :-)

Contributor

v-yadli commented Mar 12, 2015

Awesome! I just added a quick note on the .bat file.
As for the GUI I agree with you. It does provide some nice progress indicators :-)

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 16, 2015

Contributor

OK. The fix is ready. The next release is scheduled for around Wednesdey (if tests are successful).
I need to add a Yes/No popup to the update.bat script. I was thinking about sth like this:
http://stackoverflow.com/questions/23530293/adding-vbs-yes-no-box-code-to-a-batch-file

Does anybody know if it works on all Windows versions? Or is there a better way to do it?

Contributor

tombujok commented Mar 16, 2015

OK. The fix is ready. The next release is scheduled for around Wednesdey (if tests are successful).
I need to add a Yes/No popup to the update.bat script. I was thinking about sth like this:
http://stackoverflow.com/questions/23530293/adding-vbs-yes-no-box-code-to-a-batch-file

Does anybody know if it works on all Windows versions? Or is there a better way to do it?

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 17, 2015

Contributor

http://www.autohotkey.com/docs/commands/MsgBox.htm

Guess this will be more robust and scalable, and it can be compiled into a portable executable.

Contributor

v-yadli commented Mar 17, 2015

http://www.autohotkey.com/docs/commands/MsgBox.htm

Guess this will be more robust and scalable, and it can be compiled into a portable executable.

@duckunix

This comment has been minimized.

Show comment
Hide comment
@duckunix

duckunix Mar 18, 2015

I have a few errors I am seeing.

First, while the wget uses the Proxy as defined, the actual setup-x86.exe does not, and I have no way of passing proxy info to it w/o hacking the .bat file.

Also, I am seeing this error:

Starting cygwin install, version 2.870
User has NO backup/restore rights
io_stream_cygfile: fopen(/etc/setup/setup.rc) failed 2 No such file or directory
Current Directory: C:\Users\harperdo\.babun\dist

This is running as a domain user under Windows 8.1

duckunix commented Mar 18, 2015

I have a few errors I am seeing.

First, while the wget uses the Proxy as defined, the actual setup-x86.exe does not, and I have no way of passing proxy info to it w/o hacking the .bat file.

Also, I am seeing this error:

Starting cygwin install, version 2.870
User has NO backup/restore rights
io_stream_cygfile: fopen(/etc/setup/setup.rc) failed 2 No such file or directory
Current Directory: C:\Users\harperdo\.babun\dist

This is running as a domain user under Windows 8.1

@duckunix

This comment has been minimized.

Show comment
Hide comment
@duckunix

duckunix Mar 18, 2015

adding --proxy=myproxyhost:8080 to the script does the trick.

duckunix commented Mar 18, 2015

adding --proxy=myproxyhost:8080 to the script does the trick.

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 18, 2015

Contributor

@duck What script are you running?

Contributor

tombujok commented Mar 18, 2015

@duck What script are you running?

@duckunix

This comment has been minimized.

Show comment
Hide comment
@duckunix

duckunix Mar 19, 2015

update.bat from pull request #246.

duckunix commented Mar 19, 2015

update.bat from pull request #246.

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 19, 2015

Contributor

Ok, thankx. @jlupi still is working on the script. We have experienced some other problems too...

Contributor

tombujok commented Mar 19, 2015

Ok, thankx. @jlupi still is working on the script. We have experienced some other problems too...

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 23, 2015

Contributor

I recently updated the update.bat file.

The bat script now additionally checks whether the user has http_proxy set in ~./babunrc and passes it to the cygwin installer (only host:port, the user has to provide his username and password manually)

I also removed the --download option. The download option silently sets 'download without installing' option on the installer but what we really want is the 'Install from Internet' option.

image

The problem here is that the installer stores those options in the windows registry. This means that if you once selected the 'download without installing' option and re-run the installer without --download in silent mode it will still remember this setting. I don't know if there is any way to force the 'download from Internet' setting. At least I do not see any flag you can set in the installer.

If you have previously selected the 'Install from Internet' and re-run the update.bat in quiet mode than it works as expected (I tried it with and without proxy).

For me at the moment the possible solutions are:

  • set a flag to cygwin installer to enforce 'install from internet' option -> prefered but probably not possible
  • disable the --quiet-mode option and let user clicking through the installation process -> no hacks but quite painful for the user
  • reset cygwin settings in windows registry (o_O)
  • any other?
Contributor

jlupi commented Mar 23, 2015

I recently updated the update.bat file.

The bat script now additionally checks whether the user has http_proxy set in ~./babunrc and passes it to the cygwin installer (only host:port, the user has to provide his username and password manually)

I also removed the --download option. The download option silently sets 'download without installing' option on the installer but what we really want is the 'Install from Internet' option.

image

The problem here is that the installer stores those options in the windows registry. This means that if you once selected the 'download without installing' option and re-run the installer without --download in silent mode it will still remember this setting. I don't know if there is any way to force the 'download from Internet' setting. At least I do not see any flag you can set in the installer.

If you have previously selected the 'Install from Internet' and re-run the update.bat in quiet mode than it works as expected (I tried it with and without proxy).

For me at the moment the possible solutions are:

  • set a flag to cygwin installer to enforce 'install from internet' option -> prefered but probably not possible
  • disable the --quiet-mode option and let user clicking through the installation process -> no hacks but quite painful for the user
  • reset cygwin settings in windows registry (o_O)
  • any other?
@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 23, 2015

Contributor

I found sth like this here: http://superuser.com/questions/167219/how-to-completely-uninstall-remove-cygwin-from-windows-7

"Finally, if you want to be thorough you can delete the registry tree Software\Cygwin under HKEY_LOCAL_MACHINE and/or HKEY_CURRENT_USER."

Can anybody script it?

Contributor

tombujok commented Mar 23, 2015

I found sth like this here: http://superuser.com/questions/167219/how-to-completely-uninstall-remove-cygwin-from-windows-7

"Finally, if you want to be thorough you can delete the registry tree Software\Cygwin under HKEY_LOCAL_MACHINE and/or HKEY_CURRENT_USER."

Can anybody script it?

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

I guess the entries should not be deleted, or otherwise the installer will not detect the existing installation.
However, I checked my registry and there're no entries related to download options.

The entry is like:

key = 1299052366339799
value = \??\D:\yatli\.babun\cygwin

Options encoded in the key?

Contributor

v-yadli commented Mar 23, 2015

I guess the entries should not be deleted, or otherwise the installer will not detect the existing installation.
However, I checked my registry and there're no entries related to download options.

The entry is like:

key = 1299052366339799
value = \??\D:\yatli\.babun\cygwin

Options encoded in the key?

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 23, 2015

Contributor

The installer will recognize the existing installation as we pass all the info in the cmd-line.

The entries are stale -> they are there only if you have a separate cygwin instance.
So, we don't need them for babun - but if somebody has an existing cygwin instance we will screw it, if we delete this entries...

Probably the only solution is to pass all the options to the update.bat / cygwin.exe, but the user will have to click "OK" 3 times during the dist-upgrade...

Contributor

tombujok commented Mar 23, 2015

The installer will recognize the existing installation as we pass all the info in the cmd-line.

The entries are stale -> they are there only if you have a separate cygwin instance.
So, we don't need them for babun - but if somebody has an existing cygwin instance we will screw it, if we delete this entries...

Probably the only solution is to pass all the options to the update.bat / cygwin.exe, but the user will have to click "OK" 3 times during the dist-upgrade...

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

Would you mind using an ahk script? It clicks on "OK" faster than one can perceive.

Contributor

v-yadli commented Mar 23, 2015

Would you mind using an ahk script? It clicks on "OK" faster than one can perceive.

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 23, 2015

Contributor

Awesome! Could you create a proof-of-concept script to test the update.bat?

On Mon, Mar 23, 2015 at 11:57 AM, Yatao Li notifications@github.com wrote:

Would you mind using an ahk script? It clicks on "OK" faster than one can
perceive.


Reply to this email directly or view it on GitHub
#239 (comment).

Contributor

tombujok commented Mar 23, 2015

Awesome! Could you create a proof-of-concept script to test the update.bat?

On Mon, Mar 23, 2015 at 11:57 AM, Yatao Li notifications@github.com wrote:

Would you mind using an ahk script? It clicks on "OK" faster than one can
perceive.


Reply to this email directly or view it on GitHub
#239 (comment).

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

alright! this is fun.. :-D

Contributor

v-yadli commented Mar 23, 2015

alright! this is fun.. :-D

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

I think I'm missing something... This is the command line I'm using:
setup-x86.exe --upgrade-also --site="http://mirrors.kernel.org/sourceware/cygwin" --no-admin --no-shortcuts --no-startmenu --no-desktop --root="D:\TestCygwin" --local-package-dir="D:\temp\packages"

However it completes the installation silently without any message boxes popping out.
Manually ran setup-x86 once and set it to download only, and then the command line above also switched to download only.

removing --quiet-mode will bring more than just a few "OK"s to click through... So what is the correct way to bring up the message boxes to click?

Contributor

v-yadli commented Mar 23, 2015

I think I'm missing something... This is the command line I'm using:
setup-x86.exe --upgrade-also --site="http://mirrors.kernel.org/sourceware/cygwin" --no-admin --no-shortcuts --no-startmenu --no-desktop --root="D:\TestCygwin" --local-package-dir="D:\temp\packages"

However it completes the installation silently without any message boxes popping out.
Manually ran setup-x86 once and set it to download only, and then the command line above also switched to download only.

removing --quiet-mode will bring more than just a few "OK"s to click through... So what is the correct way to bring up the message boxes to click?

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 23, 2015

Contributor

hmm, so without --quiet-mode you still do not get the wizard steps to confirm?
@jlupi could you help?

Contributor

tombujok commented Mar 23, 2015

hmm, so without --quiet-mode you still do not get the wizard steps to confirm?
@jlupi could you help?

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

I mean, I can get the wizard, but there are a lot of options to go through just like a standard installation. In that case the robustness of ahk cannot be guaranteed.

Contributor

v-yadli commented Mar 23, 2015

I mean, I can get the wizard, but there are a lot of options to go through just like a standard installation. In that case the robustness of ahk cannot be guaranteed.

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 23, 2015

Contributor

OK, but the thing is that with all the options that you specify in the command line you see 3 or 4 wizard steps, but all the options are already preselected (mirror, all packages, upgrade, etc.) You just have to make sure that the "Install from the Internet" is selected.", plus "Use Internet Explorer Proxy".
Is that possible?

Contributor

tombujok commented Mar 23, 2015

OK, but the thing is that with all the options that you specify in the command line you see 3 or 4 wizard steps, but all the options are already preselected (mirror, all packages, upgrade, etc.) You just have to make sure that the "Install from the Internet" is selected.", plus "Use Internet Explorer Proxy".
Is that possible?

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

hmm. Here's what I have in my mind now:

Method 1:

the first radiobox page "Install from the Internet" can be secured with several up arrow keys then enter

the second "Use Internet Explorer Proxy" alt+i then enter

then wait for the window to resize...

then wait for the installation to finish (no reliable way to do so!)

Method 2:

run Setup-x86.exe, select "Install from the Internet", "Use Internet Explorer Proxy", then exit right away (enter up up up enter enter enter alt+i esc enter), the options will be recorded. (Amazing!)

Then, start up the unattended version... XD

I'm going to try method 2 right away..

Contributor

v-yadli commented Mar 23, 2015

hmm. Here's what I have in my mind now:

Method 1:

the first radiobox page "Install from the Internet" can be secured with several up arrow keys then enter

the second "Use Internet Explorer Proxy" alt+i then enter

then wait for the window to resize...

then wait for the installation to finish (no reliable way to do so!)

Method 2:

run Setup-x86.exe, select "Install from the Internet", "Use Internet Explorer Proxy", then exit right away (enter up up up enter enter enter alt+i esc enter), the options will be recorded. (Amazing!)

Then, start up the unattended version... XD

I'm going to try method 2 right away..

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

It works...

The bat file content:

start install.ahk
setup-x86.exe --upgrade-also --site="http://mirrors.kernel.org/sourceware/cygwin" --no-admin --no-shortcuts --no-startmenu --no-desktop --root="D:\TestCygwin" --local-package-dir="D:\temp\packages"
setup-x86.exe --quiet-mode --upgrade-also --site="http://mirrors.kernel.org/sourceware/cygwin" --no-admin --no-shortcuts --no-startmenu --no-desktop --root="D:\TestCygwin" --local-package-dir="D:\temp\packages"

install.ahk content:

WinWaitActive , Cygwin Setup, , 100
Send {Enter}
Sleep 1
Send {Up}
Sleep, 1
Send {Up}
Sleep, 1
Send {Up}
Sleep, 1
Send {Enter}
Sleep, 1
Send {Enter}
Sleep, 1
Send {Enter}
Sleep, 1
Send !i
Sleep, 1
Send {Esc}
Sleep, 1
Send {Enter}

Update: remove all the sleepy code and it's still working:

WinWaitActive , Cygwin Setup, , 100
Send {Enter}
Send {Up}
Send {Up}
Send {Up}
Send {Enter}
Send {Enter}
Send {Enter}
Send !i
Send {Esc}
Send {Enter}
Contributor

v-yadli commented Mar 23, 2015

It works...

The bat file content:

start install.ahk
setup-x86.exe --upgrade-also --site="http://mirrors.kernel.org/sourceware/cygwin" --no-admin --no-shortcuts --no-startmenu --no-desktop --root="D:\TestCygwin" --local-package-dir="D:\temp\packages"
setup-x86.exe --quiet-mode --upgrade-also --site="http://mirrors.kernel.org/sourceware/cygwin" --no-admin --no-shortcuts --no-startmenu --no-desktop --root="D:\TestCygwin" --local-package-dir="D:\temp\packages"

install.ahk content:

WinWaitActive , Cygwin Setup, , 100
Send {Enter}
Sleep 1
Send {Up}
Sleep, 1
Send {Up}
Sleep, 1
Send {Up}
Sleep, 1
Send {Enter}
Sleep, 1
Send {Enter}
Sleep, 1
Send {Enter}
Sleep, 1
Send !i
Sleep, 1
Send {Esc}
Sleep, 1
Send {Enter}

Update: remove all the sleepy code and it's still working:

WinWaitActive , Cygwin Setup, , 100
Send {Enter}
Send {Up}
Send {Up}
Send {Up}
Send {Enter}
Send {Enter}
Send {Enter}
Send !i
Send {Esc}
Send {Enter}
@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 23, 2015

Contributor

Awesome!! Could you send a pull request with the adjusted update.bat script and the ahk.exe (in the tools folder), so that everything is bundled and can be automated from within's update.bat

Contributor

tombujok commented Mar 23, 2015

Awesome!! Could you send a pull request with the adjusted update.bat script and the ahk.exe (in the tools folder), so that everything is bundled and can be automated from within's update.bat

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

see #254
I didn't test it because update.bat complains about not finding wget.exe. Could you check if it works?

Contributor

v-yadli commented Mar 23, 2015

see #254
I didn't test it because update.bat complains about not finding wget.exe. Could you check if it works?

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 23, 2015

Contributor

Thx! I've merged it and I will definitely test too.
It should also work for you if you take the existing .babun folder and copy the akh.exe to the tools directory and the update.bat file to the .babun folder (where the babun.bat file resides)

Contributor

tombujok commented Mar 23, 2015

Thx! I've merged it and I will definitely test too.
It should also work for you if you take the existing .babun folder and copy the akh.exe to the tools directory and the update.bat file to the .babun folder (where the babun.bat file resides)

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

I've put the tools to the correct place and tested it working. The only problem now is that the send key mechanism is not robust. If any window jumps out and grabs the focus this little script will fail. Let me think if I can get a workaround..

Contributor

v-yadli commented Mar 23, 2015

I've put the tools to the correct place and tested it working. The only problem now is that the send key mechanism is not robust. If any window jumps out and grabs the focus this little script will fail. Let me think if I can get a workaround..

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 23, 2015

Contributor

OK, it would be great to make it robust, so that we may bake the newest release ;) Thanks to your awesome work we are close to it!

Contributor

tombujok commented Mar 23, 2015

OK, it would be great to make it robust, so that we may bake the newest release ;) Thanks to your awesome work we are close to it!

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

An updated script:

WinWaitActive , Cygwin Setup, , 100
WinActivate ,Cygwin Setup
SetKeyDelay, 0, 0, Play
ControlSend ,Button2,{Enter}, Cygwin Setup
ControlSend ,,{Up}, Cygwin Setup
ControlSend ,,{Up}, Cygwin Setup
ControlSend ,,{Up}, Cygwin Setup
ControlSend ,Button7,{Enter}, Cygwin Setup
ControlSend ,Button12,{Enter}, Cygwin Setup
ControlSend ,Button14,{Enter}, Cygwin Setup
Sleep, 1
ControlSend ,Button2,{Alt down}i{Alt up}, Cygwin Setup
ControlSend ,Button2,{Esc down}{Esc up}, Cygwin Setup
WinWaitActive , Exit Cygwin Setup?, , 1
WinActivate ,Exit Cygwin Setup?
ControlSend ,,{Enter}, Exit Cygwin Setup?

This one uses ControlSend to precisely send into the buttons.
The Sleep, 1 is critical or there's 20% chance to choke the installer.
I'm issuing a new pull request.

Contributor

v-yadli commented Mar 23, 2015

An updated script:

WinWaitActive , Cygwin Setup, , 100
WinActivate ,Cygwin Setup
SetKeyDelay, 0, 0, Play
ControlSend ,Button2,{Enter}, Cygwin Setup
ControlSend ,,{Up}, Cygwin Setup
ControlSend ,,{Up}, Cygwin Setup
ControlSend ,,{Up}, Cygwin Setup
ControlSend ,Button7,{Enter}, Cygwin Setup
ControlSend ,Button12,{Enter}, Cygwin Setup
ControlSend ,Button14,{Enter}, Cygwin Setup
Sleep, 1
ControlSend ,Button2,{Alt down}i{Alt up}, Cygwin Setup
ControlSend ,Button2,{Esc down}{Esc up}, Cygwin Setup
WinWaitActive , Exit Cygwin Setup?, , 1
WinActivate ,Exit Cygwin Setup?
ControlSend ,,{Enter}, Exit Cygwin Setup?

This one uses ControlSend to precisely send into the buttons.
The Sleep, 1 is critical or there's 20% chance to choke the installer.
I'm issuing a new pull request.

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 23, 2015

Contributor

please see #255. This one works much better. :-)

Contributor

v-yadli commented Mar 23, 2015

please see #255. This one works much better. :-)

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 23, 2015

Contributor

@tombujok

So, we don't need them for babun - but if somebody has an existing cygwin instance we will screw it, if we delete this entries...

We would rather not screw up someone's cygwin installation if we delete those keys.
As you can read in https://cygwin.com/faq/faq.html#faq.setup.cli

How do I save, restore, delete, or modify the Cygwin information stored in the registry?

Since Cygwin 1.7, there's nothing important in the registry anymore, except for the installation directory information stored there for the sake of setup-x86{_64}.exe. There's nothing left to manipulate anymore.

Looks like in worst case when you start the cigwin installer in gui mode it will not remember your previous settings.

I didn't try @v-yadli 's script yet though, will try it soon.

Contributor

jlupi commented Mar 23, 2015

@tombujok

So, we don't need them for babun - but if somebody has an existing cygwin instance we will screw it, if we delete this entries...

We would rather not screw up someone's cygwin installation if we delete those keys.
As you can read in https://cygwin.com/faq/faq.html#faq.setup.cli

How do I save, restore, delete, or modify the Cygwin information stored in the registry?

Since Cygwin 1.7, there's nothing important in the registry anymore, except for the installation directory information stored there for the sake of setup-x86{_64}.exe. There's nothing left to manipulate anymore.

Looks like in worst case when you start the cigwin installer in gui mode it will not remember your previous settings.

I didn't try @v-yadli 's script yet though, will try it soon.

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 23, 2015

Contributor

OK. Please test it - you can also try with deleting the registry entries... Maybe it would work?

Contributor

tombujok commented Mar 23, 2015

OK. Please test it - you can also try with deleting the registry entries... Maybe it would work?

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 23, 2015

Contributor

I tried deleting registry keys but it didnt help. The state must be persisted somewhere on the filesystem. I'll try to check on the installer's source code.

Contributor

jlupi commented Mar 23, 2015

I tried deleting registry keys but it didnt help. The state must be persisted somewhere on the filesystem. I'll try to check on the installer's source code.

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 24, 2015

Contributor

OK guys, the situation looks like this:

  • we still cannot find the place where the setup.exe installer stores the "install-switch" if to "Download from the Internet" or "Download without installing". We know for sure that it's not stored in the windows registry. We hjave deleted all the registry entries, started setup.exe, chose one option, clicked next and it was stored, although there was nothing in the registry...
  • akh solution is OK, but the best option would be to avoid it - it's still the second choice option, since there are different paths, for example with proxy, and then the script does not work. Thanks to @v-yadli for his efforts though. We still may use it!

The preferred solution is:

  • to find the place where the "Install-switch" is stored
  • to delete that "install-switch" in the update.bat script
  • and to run the installer in the quite-mode

In order to achieve that we started browsing the cygwin's setup.exe source code (sic!)
There's definitely C language freaks among Cygwin users. Could you also have a look?
Any help is appreciated!
git clone git://cygwin.com/git/cygwin-setup.git

Contributor

tombujok commented Mar 24, 2015

OK guys, the situation looks like this:

  • we still cannot find the place where the setup.exe installer stores the "install-switch" if to "Download from the Internet" or "Download without installing". We know for sure that it's not stored in the windows registry. We hjave deleted all the registry entries, started setup.exe, chose one option, clicked next and it was stored, although there was nothing in the registry...
  • akh solution is OK, but the best option would be to avoid it - it's still the second choice option, since there are different paths, for example with proxy, and then the script does not work. Thanks to @v-yadli for his efforts though. We still may use it!

The preferred solution is:

  • to find the place where the "Install-switch" is stored
  • to delete that "install-switch" in the update.bat script
  • and to run the installer in the quite-mode

In order to achieve that we started browsing the cygwin's setup.exe source code (sic!)
There's definitely C language freaks among Cygwin users. Could you also have a look?
Any help is appreciated!
git clone git://cygwin.com/git/cygwin-setup.git

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 24, 2015

Contributor

@tombujok Did you try capture all the IO activities of the installer with procmon? maybe that will help ;)

Contributor

v-yadli commented Mar 24, 2015

@tombujok Did you try capture all the IO activities of the installer with procmon? maybe that will help ;)

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 24, 2015

Contributor

No, but it would be great if somebody could try it out!
@v-yadli There's already evening in your timezone, we have just started working ;)

The path to check is:

  • start setup.exe
  • choose "Download from the Internet"
  • click "Next"
  • close the installer

That's enough for setup.exe to persist that "install-switch".

Contributor

tombujok commented Mar 24, 2015

No, but it would be great if somebody could try it out!
@v-yadli There's already evening in your timezone, we have just started working ;)

The path to check is:

  • start setup.exe
  • choose "Download from the Internet"
  • click "Next"
  • close the installer

That's enough for setup.exe to persist that "install-switch".

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 24, 2015

Contributor

I found it, the UserSettings.cc loads the settings file setup.rc from cygwin's /etc/setup folder

Contributor

jlupi commented Mar 24, 2015

I found it, the UserSettings.cc loads the settings file setup.rc from cygwin's /etc/setup folder

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 24, 2015

Contributor

I executed the installer several times with diferent options and this is how the setup.rc file is modified:

The 'Install from Internet' option writes

last-action
    Download,Install

where the 'download without installing' writes

last-action
    Download

Proxy Settings

User Proxy

net-method
    Proxy
net-proxy-host
    webproxy.xxx.com
net-proxy-port
    8080

Use Internet Explorer Proxy settings

net-method
    IE
net-proxy-host
    webproxy.xxx.com
net-proxy-port
    8080

Direct

net-method
    Direct
net-proxy-host
    webproxy.xxx.com
net-proxy-port
    8080

The installer remembers the host and port but probably does not use it for 'Direct' or 'Internet Explorer' proxy

Contributor

jlupi commented Mar 24, 2015

I executed the installer several times with diferent options and this is how the setup.rc file is modified:

The 'Install from Internet' option writes

last-action
    Download,Install

where the 'download without installing' writes

last-action
    Download

Proxy Settings

User Proxy

net-method
    Proxy
net-proxy-host
    webproxy.xxx.com
net-proxy-port
    8080

Use Internet Explorer Proxy settings

net-method
    IE
net-proxy-host
    webproxy.xxx.com
net-proxy-port
    8080

Direct

net-method
    Direct
net-proxy-host
    webproxy.xxx.com
net-proxy-port
    8080

The installer remembers the host and port but probably does not use it for 'Direct' or 'Internet Explorer' proxy

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 24, 2015

Contributor

looks like we can simplify our update script. It would be enough to create a setup.rc template and copy it to /etc/setup folder before the upgrade proces starts

Contributor

jlupi commented Mar 24, 2015

looks like we can simplify our update script. It would be enough to create a setup.rc template and copy it to /etc/setup folder before the upgrade proces starts

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 24, 2015

Contributor

@jlupi Ahh, yesterday I was messing with UserSettings.cc looking for registry operations and overlooked the /etc thing!

Maybe a cat in a bash script will fulfill the purpose of template generation?

Contributor

v-yadli commented Mar 24, 2015

@jlupi Ahh, yesterday I was messing with UserSettings.cc looking for registry operations and overlooked the /etc thing!

Maybe a cat in a bash script will fulfill the purpose of template generation?

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 24, 2015

Contributor

@jlupi You've unlocked the C-mastha badge, whereas @v-yadli unlocked the AKH-mastha badge ;)

OK, I would propose the following, we drop the akh solution; in update.bat, we:

  • delete the existing setup.rc file
  • create a new setup.rc file with
last-action
    Download,Install
net-method
    IE

I would also leave the existing /proxy switch in the update.bat.
When the user specifies it he/she will use the manually specified proxy (the password popup may be shown, but it's not a problem IMHO) WDYT?

Contributor

tombujok commented Mar 24, 2015

@jlupi You've unlocked the C-mastha badge, whereas @v-yadli unlocked the AKH-mastha badge ;)

OK, I would propose the following, we drop the akh solution; in update.bat, we:

  • delete the existing setup.rc file
  • create a new setup.rc file with
last-action
    Download,Install
net-method
    IE

I would also leave the existing /proxy switch in the update.bat.
When the user specifies it he/she will use the manually specified proxy (the password popup may be shown, but it's not a problem IMHO) WDYT?

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 24, 2015

Contributor

@tombujok sounds good. Would you rather leave the --site option as it is or shall we also put it into the setup.rc file?

@v-yadli what do you mean with cat in bash? I was thinking of a static file that will go to the tools folder and would just do a copy in the bat file. What do you think?

Contributor

jlupi commented Mar 24, 2015

@tombujok sounds good. Would you rather leave the --site option as it is or shall we also put it into the setup.rc file?

@v-yadli what do you mean with cat in bash? I was thinking of a static file that will go to the tools folder and would just do a copy in the bat file. What do you think?

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 24, 2015

Contributor

@jlupi No pun here (but cat in fish is more awesome ;), but if the proxy host name and port should be passed in, it would be better generated within a bash shell script that cat the static part and echo the dynamic part. WDYT?

Contributor

v-yadli commented Mar 24, 2015

@jlupi No pun here (but cat in fish is more awesome ;), but if the proxy host name and port should be passed in, it would be better generated within a bash shell script that cat the static part and echo the dynamic part. WDYT?

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 24, 2015

Contributor

Yes, the update.bat should have /proxy (/p) and /site (/s) switches.
They will be propagated to setup.rc anyway, but we don't need to put them there, don't we?
@jlupi Could you finish it up and submit a pull request?
We are an "inch" away from a super cool candidate release... 👍

Contributor

tombujok commented Mar 24, 2015

Yes, the update.bat should have /proxy (/p) and /site (/s) switches.
They will be propagated to setup.rc anyway, but we don't need to put them there, don't we?
@jlupi Could you finish it up and submit a pull request?
We are an "inch" away from a super cool candidate release... 👍

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 24, 2015

Contributor

in the current script we do not have the /proxy switch. We need to add it.

The workflow would look like this:

if user provids proxy with /proxy switch we use this
else if we find proxy in babunrc we take it
else we set IE as a net-method in the setup.rc

I have quite a busy day today and I am gone in the evening so I can start working on it no sooner than tomorrow / thursday.

@v-yadli, @tombujok (or others) any chance you guys could start with it sooner?

@v-yadli no fish support yet :-) It is OK for me.

Contributor

jlupi commented Mar 24, 2015

in the current script we do not have the /proxy switch. We need to add it.

The workflow would look like this:

if user provids proxy with /proxy switch we use this
else if we find proxy in babunrc we take it
else we set IE as a net-method in the setup.rc

I have quite a busy day today and I am gone in the evening so I can start working on it no sooner than tomorrow / thursday.

@v-yadli, @tombujok (or others) any chance you guys could start with it sooner?

@v-yadli no fish support yet :-) It is OK for me.

@v-yadli

This comment has been minimized.

Show comment
Hide comment
@v-yadli

v-yadli Mar 24, 2015

Contributor

@jlupi Nak it's 11:00PM and I'm still at office. I'll see if I could quickly brush it up tmr morning.

Contributor

v-yadli commented Mar 24, 2015

@jlupi Nak it's 11:00PM and I'm still at office. I'll see if I could quickly brush it up tmr morning.

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 24, 2015

Contributor

@v-yadli easy, get some rest :)

I just tried the simplified setup.rc, it looks good I guess.

The only problem I have is that the installer keeps complaining about corrupted setup.ini file. I had to start it with the --no-verify option. Would it be save to use it in the script ?

I just discoved two problems (not related to the setup script itself). When i started the upgrade having babun running I got

The following DLLs couldn't be rebased because they were in use:
  /usr/lib/zsh/5.0.6/zsh/zutil.dll
  /usr/lib/zsh/5.0.6/zsh/zle.dll
  /usr/lib/zsh/5.0.6/zsh/terminfo.dll
  /usr/lib/zsh/5.0.6/zsh/stat.dll
  /usr/lib/zsh/5.0.6/zsh/parameter.dll
  /usr/lib/zsh/5.0.6/zsh/computil.dll
  /usr/lib/zsh/5.0.6/zsh/complist.dll
  /usr/lib/zsh/5.0.6/zsh/complete.dll
  /usr/bin/libzsh-5.0.6.dll
  /usr/bin/cygncursesw-10.dll
  /usr/bin/cyggcc_s-1.dll

Do we want to do anygthing about that?

Aftewwards I started it again but now i am getting

Updating package information in /var/cache/rebase/rebase_pkg.
Updating rebase information for installed dynamic objects in /var/cache/rebase/rebase_lst.
/bin/rebaselst: 211: /bin/rebaselst: cannot create /var/cache/rebase/rebase_lst: Permission denied
Updating rebase information for installed executables in /var/cache/rebase/rebase_exe.
/bin/rebaselst: 197: /bin/rebaselst: cannot create /var/cache/rebase/rebase_exe: Permission denied
removing /var/cache/rebase/rebase_dyn

Strange, previous run was OK.

Contributor

jlupi commented Mar 24, 2015

@v-yadli easy, get some rest :)

I just tried the simplified setup.rc, it looks good I guess.

The only problem I have is that the installer keeps complaining about corrupted setup.ini file. I had to start it with the --no-verify option. Would it be save to use it in the script ?

I just discoved two problems (not related to the setup script itself). When i started the upgrade having babun running I got

The following DLLs couldn't be rebased because they were in use:
  /usr/lib/zsh/5.0.6/zsh/zutil.dll
  /usr/lib/zsh/5.0.6/zsh/zle.dll
  /usr/lib/zsh/5.0.6/zsh/terminfo.dll
  /usr/lib/zsh/5.0.6/zsh/stat.dll
  /usr/lib/zsh/5.0.6/zsh/parameter.dll
  /usr/lib/zsh/5.0.6/zsh/computil.dll
  /usr/lib/zsh/5.0.6/zsh/complist.dll
  /usr/lib/zsh/5.0.6/zsh/complete.dll
  /usr/bin/libzsh-5.0.6.dll
  /usr/bin/cygncursesw-10.dll
  /usr/bin/cyggcc_s-1.dll

Do we want to do anygthing about that?

Aftewwards I started it again but now i am getting

Updating package information in /var/cache/rebase/rebase_pkg.
Updating rebase information for installed dynamic objects in /var/cache/rebase/rebase_lst.
/bin/rebaselst: 211: /bin/rebaselst: cannot create /var/cache/rebase/rebase_lst: Permission denied
Updating rebase information for installed executables in /var/cache/rebase/rebase_exe.
/bin/rebaselst: 197: /bin/rebaselst: cannot create /var/cache/rebase/rebase_exe: Permission denied
removing /var/cache/rebase/rebase_dyn

Strange, previous run was OK.

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 25, 2015

Contributor

Regarding the problem with open cygwin during update:

The following DLLs couldn't be rebased because they were in use:

I may have a possible solution. We could add a babun upgrade option. This would simply do

PROXY= //take from .babunrc or from the user i.e. babun upgrade --proxy=host:port
open update.bat /proxy $PROXY && exit 

Open is a new alias to cygstart.
The update.bat would at the end call babun.bat to start the shell.

I just made a small PoC that does exactly this, looks like it is working.

I think this would be a better solution from the usability point of view - the user doesn't have to know where the upodate.bat is. The only problem is that the exit command would close the current window, there is no check if other instances are running.

@tombujok how do you see this? Do we want to include that in this release?

Contributor

jlupi commented Mar 25, 2015

Regarding the problem with open cygwin during update:

The following DLLs couldn't be rebased because they were in use:

I may have a possible solution. We could add a babun upgrade option. This would simply do

PROXY= //take from .babunrc or from the user i.e. babun upgrade --proxy=host:port
open update.bat /proxy $PROXY && exit 

Open is a new alias to cygstart.
The update.bat would at the end call babun.bat to start the shell.

I just made a small PoC that does exactly this, looks like it is working.

I think this would be a better solution from the usability point of view - the user doesn't have to know where the upodate.bat is. The only problem is that the exit command would close the current window, there is no check if other instances are running.

@tombujok how do you see this? Do we want to include that in this release?

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 25, 2015

Contributor

Thanks for the update.
Every babun windows spawns a new /usr/bin/mintty process that you can see in any babun console by executing ps which will do the trick!

Contributor

tombujok commented Mar 25, 2015

Thanks for the update.
Every babun windows spawns a new /usr/bin/mintty process that you can see in any babun console by executing ps which will do the trick!

@jlupi

This comment has been minimized.

Show comment
Hide comment
@jlupi

jlupi Mar 25, 2015

Contributor

all right so it will look more or less like this

open update.bat /proxy $PROXY && pkill mintty
Contributor

jlupi commented Mar 25, 2015

all right so it will look more or less like this

open update.bat /proxy $PROXY && pkill mintty
@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 30, 2015

Contributor

Fixed in 1.1.0.
Release status: #266

Contributor

tombujok commented Mar 30, 2015

Fixed in 1.1.0.
Release status: #266

@tombujok tombujok closed this Mar 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment