This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Upgrading Cygwin - postinstall difficulties?


On Tue, 16 Sep 2003, Andrew DeFaria wrote:

> Igor Pechtchanski wrote:
>
> > On Tue, 16 Sep 2003, Andrew DeFaria wrote:
> >
> > Well, you shouldn't run setup with Cygwin processes running in the
> > first place.
>
> Having the "install files in place" option where Cygwin tells you that
> some installed files were in use and you should reboot, sure gives about
> the impression that Cygwin will do the right thing.

Yes, it does.  As I already said, setup is broken in this regard.

> > I've been meaning to add an interactive dialog on failing to replace
> > cygwin1.dll that would let you kill Cygwin processes and retry the
> > replacement, but haven't got to it yet (and probably won't for quite a
> > bit).
>
> How about... If any files that were to be installed could not be because
> they are busy then, since you are arranging to have things done on
> reboot anyway, delay execution of all postinstall scripts until reboot.
> At reboot replace in use files then run postinstall scripts...

This is reasonable.  Feel free to contribute a patch. ;-)

> > The postinstall scripts obviously did not complete. Also, since parts
> > of the postinstall scripts were executed, and other parts weren't, the
> > system is most likely in an unstable state.
>
> Hmmm... system seems pretty stable... :-)

Lucky you.  Let's hope it is.

> > Unfortunately, the corrective actions depend heavily on the packages
> > that were installed (e.g., if you installed base-files for the first
> > time, the postinstall scripts will have created a possibly incorrect
> > /etc/profile, but it won't be removed on uninstall, so a reinstall of
> > base-files won't give you a correct /etc/profile; similarly with
> > packages like apache). You may have to look at the individual
> > postinstall scripts to see which actions need to be reexecuted, and
> > which need to be undone.
>
> This is an unreasonable suggestion. Many people would have no idea how
> to determine which actions need to be re-executed and which to be
> undone. Most people are totally unaware of what postinstall scripts do -
> they just work - as they are supposed to.

This is one solution that is guaranteed to work.  The fact that people
won't know how to do this indicates that setup *should* handle things
better.  It currently doesn't.

Luckily, most people who won't have the expertise to wade through
postinstall scripts will probably also lack the ability to customize their
Cygwin installation so heavily that a complete reinstall from scratch
isn't an option.

> A far better software engineering solution would be to make it such that
> postinstall scripts are re-executable in that they either postinstall or
> fix up as required.

This is not under setup's control.  Postinstall scripts are written by
individual package maintainers.  Most of them *are* reexecutable, or, at
least, don't do anything that can't be redone.  Some, however, modify
existing state of the system, either in-place or conditionally on the
non-existence of this previous state (i.e., new install).  In both of
these cases, there's a potential for failure, and the scripts will
probably not be reexecutable.  A list of such scripts might be a useful
thing to have in the archives.

> > If a complete reinstall from scratch is an option, I'd suggest that as
> > the safest course.
>
> Perhaps. Not sure I can get enough server time to accomplish this though...

This is another solution that's guaranteed to work (but may not be worth
the trouble if you've customized your installation).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]