[tahoe-lafs-trac-stream] [tahoe-lafs] #166: command line order is problematic

tahoe-lafs trac at tahoe-lafs.org
Thu May 31 22:08:57 UTC 2012


#166: command line order is problematic
-------------------------+-------------------------------------------------
     Reporter:  zandr    |      Owner:  warner
         Type:  defect   |     Status:  assigned
     Priority:  major    |  Milestone:  1.11.0
    Component:  code-    |    Version:  0.6.1
  frontend-cli           |   Keywords:  security usability unix mac error
   Resolution:           |  needs-review
Launchpad Bug:           |
-------------------------+-------------------------------------------------
Changes (by warner):

 * keywords:  security usability unix mac error => security usability unix
     mac error needs-review


Comment:

 Ok, that patch makes the changes proposed in comment:18, leaves
 {{{--basedir}}} in place according to comment:21 (but pays
 attention to {{{--basedir}}} rather than ignoring it). It also
 requires that {{{--version}}}, {{{--version-and-path}}}, and
 {{{--quiet}}} live in ARG1, rejecting them if they appear in ARG2.
 Tests that exercise command-line parsing have been updated to
 match.

 The patch is a bit big because it changes the way we use base
 classes in {{{src/allmydata/scripts/}}} . Previously
 {{{common.BaseOptions}}} provided {{{--version}}} and
 {{{--node-directory}}}, and '''both''' the ARG1-handling
 {{{runner.Options}}} '''and''' all the ARG2-handling parsers
 inherited from it, and then the basedir-needing parsers
 additionally inherited from {{{common.BasedirMixin}}}.

 In the new world, {{{BaseOptions}}} is much smaller (it forbids
 --version and sets up .command_name), {{{BasedirOptions}}} is a
 parent class instead of a mixin, the ARG1 parser inherits from
 neither (but now contains the {{{--node-directory}}} handler), and
 the ARG2 parsers all inherit from {{{BaseOptions}}}, or
 {{{BasedirOptions}}} if they need {{{--basedir/BASEDIR}}}
 (create/start/stop/restart).

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/166#comment:22>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list