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

Roger Leigh rleigh at whinlatter.ukfsn.org
Sun Jul 8 10:10:25 UTC 2007


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.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20070708/fbccbe0a/attachment.pgp 


More information about the Buildd-tools-devel mailing list