]> cygwin.com Git - cygwin-apps/setup.git/commit - script.cc
implement minimal stratified postinstall
authorAchim Gratz <Stromeko@NexGo.DE>
Sat, 6 Dec 2014 13:50:41 +0000 (13:50 +0000)
committerAchim Gratz <Stromeko@NexGo.DE>
Sat, 6 Dec 2014 13:50:41 +0000 (13:50 +0000)
commit54978a88773d82d73060e90049104427db0c8954
treea7cdaf7e66876dd838cbda652c3309799d64df3a
parent157dc2b89d37c2c6e963894045440c6a93897603
implement minimal stratified postinstall

     * install.cc (do_install_thread): Remove initialization for
     run_script.
     * postinstall.cc (do_postinstall_thread): Remove initialization
     for run_script.  Implement stratified postinstall (hardcode three
     strata for now).  For each stratum, run perpetual scripts first
     after sorting them as ASCII, then the postinstall scripts just
     installed, then check for dormant scripts in postinstall and try
     to run those.
     (PerpetualFindVisitor): New helper class to pick up perpetual
     scripts.
     (RunFindVisitor): Use new Script member function and pick up only
     runnable non-perpetual scripts.
     * script.h (Script::baseName): Add private variable.
     (Script::scriptExtension): Ditto.
     (Script::scriptStratum): Ditto
     (Script::scriptType): Ditto
     (Script::allowedStrata): Ditto
     (Script::allowedTypes): Ditto
     (Script::match): New private member function.
     (Script::not_p): New public member function to check for
     non-perpetual runnable script.
     (Script::is_p): Ditto, but for perpetual scripts.
     (Script::operator ==): Qualify as const.
     (Script::operator <): New const qualified, used for sorting as ASCII.
     * script.cc (class Script): Implement those additional members.
     (run): Implement using the new member variables and std::string
     functions instead of C string manipulations.
     (isAScript): Ditto.
     (fullName): Ditto.
     (baseName): Ditto.
     (Script): Extend initialization section and calculate values for
     member variables.  Move initialization for run_script into the constructor.
ChangeLog
install.cc
postinstall.cc
script.cc
script.h
This page took 0.031149 seconds and 5 git commands to generate.