[ 
https://issues.apache.org/jira/browse/COUCHDB-1012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086455#comment-13086455
 ] 

Noah Slater commented on COUCHDB-1012:
--------------------------------------

Oh, I had missed the patch.

Comments:

Please rename the script to couchenv.

Please change the help output to be more helpful:

    The $basename command runs the %package_name% environment tool.

    When %package_name% is installed, certain environment variables are set.

    This script will display the current values of those variables.

    The exit status is 0 for success or 1 for failure.

Please support --V, --version for printing version information.

Please support -h, --help for printing help information.

Please remove the -? option.

Please make the wording of the help output start with:

  -h          display a short help message and exit
  -V          display version information and exit

This is essential to main consistency between the output of the scripts we ship.

Please change the wording of the help output the match this.

As an example:

  --logfile     Display log file path

Please change the flags to mirror the variable name precisely:

--couchlibdir
--couchincludedir
--couchebindir
--dbdir
--viewdir
--couchprivlibdir
--bindir
--confdir
--urifile
--logfile

Please add the new script to the dist_man1_MANS variable so that we build a man 
page for it.

Please check that the new -h, -V output produces a sensible looking man page.

Compare this with the man page for the couched command.

I would recommend keeping with the variable names as they exist:

So from this:

+dbdir="%localstatelibdir%"

To this:

+localstatelibdir="%localstatelibdir%"

As with the help output, it might seem like shortening them helps. I would 
argue that given sufficient knowledge of either CouchDB or Autotools, the 
originals make more sense. I know what the localstatelibdir is, because I have 
worked with that variable so much. The same is not necessarily true for dbdir. 
We should keep with the existing values throughout the code and our external 
interfaces to that code.

Other than that, this is exactly how I would have implemented it.


> Utility to help plugin developers manage paths
> ----------------------------------------------
>
>                 Key: COUCHDB-1012
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1012
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Build System
>            Reporter: Randall Leeds
>            Assignee: Randall Leeds
>             Fix For: 1.2
>
>         Attachments: 
> 0001-add-couch-config-file-used-to-ease-the-build-of-plug.patch, 
> 0001-add-couch-config-file-used-to-ease-the-build-of-plug.patch, 
> 0001-support-pkg-config-for-plugins-COUCHDB-1012.patch
>
>
> Developers may want to write plugins (like GeoCouch) for CouchDB. Many hooks 
> in the configuration system allow loading arbitrary Erlang modules to handle 
> various internal tasks, but currently there is no straightforward and 
> portable way for developers of these plugins to discover the location of the 
> CouchDB library files.
> Two options that have been proposed are to use pkg-config or install a 
> separate script that could be invoked (e.g. as couch-config --erl-libs) to 
> discover important CouchDB installation paths.
> As far as I know the loudest argument against pkg-config is lack of support 
> for Windows.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to