Doesn't contrib/pull complete an unfinished installation? 2011/4/24 <smi...@zenzebra.mv.com>: > erik quanstrom <quans...@quanstro.net> writes: > >>> IIRC it's based on replica(1) >>> which rather requires ideal circumstances for correct behaviour. >> >> partial installs are easy to recover from. i just used it friday to sort >> out a file system that had a contrib package listed as installed, but it >> hadn't been. > > It *would* be easy if contrib(1) properly indicated the install status > of a package. As it is right now, contrib/install marks a package as > installed and THEN goes about installing it. If anything fails, the > install will still be marked as having been successful. A subsequent > contrib/install for the same package will snubly claim that the package > has already been installed and refuse to run. You have to supply the > '-f' switch to make the install complete. However, doing this requires > (1) knowing that the install broke, and (2) that all the packages > dependencies have been met (because -f also overrides dependency > checking). contrib(1) doesn't provide any way to check if a package is > up to date, like replica/changes. Having a contrib(1) wrapper for > replica/changes (say, 'contrib/changes') would be very handy. (And > simple to write.) > > As for prematurely marking packages as successfully installed... > > This: > > cat > $cfg <<! > ... > exec /bin/contrib/pull $name > > should probably be replaced with something like: > > cat > $cfg.part <<! > ... > /bin/contrib/pull $name > if(~ -$status -) mv $cfg.part $cfg > if not { > echo install failed >[1=2] > rm $cfg.part > exit 'oh, crap' > } > > -- > +---------------------------------------------------------------+ > |E-Mail: smi...@zenzebra.mv.com PGP key ID: BC549F8B| > |Fingerprint: 9329 DB4A 30F5 6EDA D2BA 3489 DAB7 555A BC54 9F8B| > +---------------------------------------------------------------+ > >
-- - Yaroslav