9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Yaroslav <yarikos@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] contrib(1) WAS: Re: wiki...
Date: Sun, 24 Apr 2011 20:56:18 +0300	[thread overview]
Message-ID: <BANLkTiktfO8LB9RF+vHbC1N56VfXmX30wg@mail.gmail.com> (raw)
In-Reply-To: <867hajg2nz.fsf_-_@cmarib.ramside>

Doesn't contrib/pull complete an unfinished installation?

2011/4/24  <smiley@zenzebra.mv.com>:
> erik quanstrom <quanstro@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: smiley@zenzebra.mv.com             PGP key ID: BC549F8B|
> |Fingerprint: 9329 DB4A 30F5 6EDA D2BA  3489 DAB7 555A BC54 9F8B|
> +---------------------------------------------------------------+
>
>



-- 
- Yaroslav



  parent reply	other threads:[~2011-04-24 17:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-23  4:43 [9fans] wiki Ethan Grammatikidis
2011-04-23  5:05 ` pmarin
2011-04-24  4:48 ` smiley
2011-04-24  5:13   ` Ethan Grammatikidis
2011-04-24  8:16     ` hiro
2011-04-26  6:30       ` Ethan Grammatikidis
2011-05-04 11:40         ` Balwinder S Dheeman
2011-05-04 15:37           ` Ethan Grammatikidis
2011-05-04 16:11             ` dexen deVries
2011-05-04 20:26               ` smiley
2011-05-05  9:54             ` Balwinder S Dheeman
2011-05-05 12:38               ` erik quanstrom
2011-04-24 10:08     ` erik quanstrom
2011-04-24 14:11       ` [9fans] contrib(1) WAS: wiki smiley
2011-04-24 15:50         ` erik quanstrom
2011-04-24 20:52           ` smiley
2011-04-24 20:58             ` Federico G. Benavento
2011-04-24 23:09               ` smiley
2011-04-25  1:13                 ` erik quanstrom
2011-04-25 13:29                   ` smiley
2011-04-24 17:17         ` Iruatã Souza
2011-04-24 17:56         ` Yaroslav [this message]
2011-04-24 10:16   ` [9fans] wiki erik quanstrom
2011-04-24 18:15   ` Richard Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTiktfO8LB9RF+vHbC1N56VfXmX30wg@mail.gmail.com \
    --to=yarikos@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).