[Buildd-tools-devel] Bug#401159: Bug#401159: schroot: let users name their sessions

Lucas Nussbaum lucas at lucas-nussbaum.net
Sun Jul 8 15:24:46 UTC 2007


On 08/07/07 at 11:10 +0100, Roger Leigh wrote:
> tags 401159 + fixed-upstream pending
> thanks
> 
> Lucas Nussbaum <lucas at lucas-nussbaum.net> writes:
> 
> > It would be nice if users could choose the identifier for their sessions
> > themselves, for example using:
> >   schroot -c etch -b etch-buildenv-mypkg
> >
> > The identifiers generated by schroot aren't really easy to remember ;)
> 
> I have added this now:
> 
> % bin/schroot/schroot -h
> Usage:
> [...]
> 
> Session actions:
>   --automatic-session     Begin, run and end a session automatically (default)
>   -b [ --begin-session ]  Begin a session; returns a session ID
>   --recover-session       Recover an existing session
>   -r [ --run-session ]    Run an existing session
>   -e [ --end-session ]    End an existing session
> 
> Session options:
>   -n [ --session-name ] arg Session name (defaults to an automatically
>                             generated name)
>   -f [ --force ]            Force operation, even if it fails
> 
> So you may simply run:
> 
> % schroot -c chroot -b -n my_session_name
> 
> (or --session-name=my_session_name).
> 
> I wanted to add this to the -b option as an optional argument, but the
> options parsing library doesn't permit optional args (due to the
> ambiguity I think, since the following arg might or might not be an
> option)
> 
> 
> I just have one small change to make to the session setup code.
> Currently, if you create the same session name twice, the second will
> fail to acquire a lock, but then the cleanup code gets run and the
> first running session is blown away as all its processes are reaped.
> Once this is done and tested, it will be ready to upload.

Hi Roger,

This looks really good :)

Lucas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20070708/4a2e85c5/attachment.pgp 


More information about the Buildd-tools-devel mailing list