<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Sample plugin has no difference from
      other plugins, it is wrong to specially design a command for that
      sample plugin.<br>
      A plugin should have a way to disable itself, I prefer the
      original way to disable a plugin like below.<br>
      <br>
      In plugin descriptor xml file, comment out all tabs, if no tabs is
      defined, then the plugin will not be loaded.<br>
      By this way, no special command is needed, no additional overhead
      in coding is needed.<br>
      <br>
      <img src="cid:part1.03030308.04060808@linux.vnet.ibm.com" alt=""><br>
      <br>
      On 5/19/2014 5:31 PM, Yu Xin Huo wrote:<br>
    </div>
    <blockquote cite="mid:5379CF7C.7040906@linux.vnet.ibm.com"
      type="cite">On 5/17/2014 3:30 AM, <a class="moz-txt-link-abbreviated" href="mailto:shaohef@linux.vnet.ibm.com">shaohef@linux.vnet.ibm.com</a>
      wrote:
      <br>
      <blockquote type="cite">From: ShaoHe Feng
        <a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com">&lt;shaohef@linux.vnet.ibm.com&gt;</a>
        <br>
        <br>
        sample plugin is used to test as a plugin demo.
        <br>
        <br>
        we disable it by default.
        <br>
        <br>
        use this command to enable sample plugin
        <br>
        $ ./autogen.sh --enable-plugins
        <br>
      </blockquote>
      As this command is specially used to enable the sample plugin, so
      the param of "enable-plugins" is quite confusing, looks like
      enabling all the plugins.
      <br>
      If it is only to enable that sample plugin, I do not think it is
      worth to add such a command specially for that.
      <br>
      <blockquote type="cite">
        <br>
        Signed-off-by: ShaoHe Feng <a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com">&lt;shaohef@linux.vnet.ibm.com&gt;</a>
        <br>
        ---
        <br>
        &nbsp; configure.ac&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 10 ++++++++++
        <br>
        &nbsp; plugins/sample/Makefile.am&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 18
        +++++++++++++++++-
        <br>
        &nbsp; plugins/sample/{sample.conf =&gt; sample.conf.in} |&nbsp; 2 +-
        <br>
        &nbsp; 3 files changed, 28 insertions(+), 2 deletions(-)
        <br>
        &nbsp; rename plugins/sample/{sample.conf =&gt; sample.conf.in} (90%)
        <br>
        <br>
        diff --git a/configure.ac b/configure.ac
        <br>
        index cc971e8..ab1b302 100644
        <br>
        --- a/configure.ac
        <br>
        +++ b/configure.ac
        <br>
        @@ -48,6 +48,16 @@ if test "x$PYFLAKES" = "x"; then
        <br>
        &nbsp;&nbsp;&nbsp; AC_MSG_WARN([pyflakes not found])
        <br>
        &nbsp; fi
        <br>
        <br>
        +AC_ARG_ENABLE(
        <br>
        +&nbsp;&nbsp;&nbsp; [plugins],
        <br>
        +&nbsp;&nbsp;&nbsp; [AS_HELP_STRING(
        <br>
        +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [--enable-plugins],
        <br>
        +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [build plugins packages @&lt;:@default=no@:&gt;@]
        <br>
        +&nbsp;&nbsp;&nbsp; )],
        <br>
        +&nbsp;&nbsp;&nbsp; ,
        <br>
        +&nbsp;&nbsp;&nbsp; [enable_plugins="no"]
        <br>
        +)
        <br>
        +AM_CONDITIONAL([PLUGINS], [test "${enable_plugins}" = "yes"])
        <br>
        <br>
        &nbsp; AC_CONFIG_FILES([
        <br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; po/Makefile.in
        <br>
        diff --git a/plugins/sample/Makefile.am
        b/plugins/sample/Makefile.am
        <br>
        index e03a4c0..b0beb32 100644
        <br>
        --- a/plugins/sample/Makefile.am
        <br>
        +++ b/plugins/sample/Makefile.am
        <br>
        @@ -19,4 +19,20 @@
        <br>
        <br>
        &nbsp; SUBDIRS = ui
        <br>
        <br>
        -EXTRA_DIST = API.json sample.conf $(wildcard *.py)
        <br>
        +EXTRA_DIST = API.json sample.conf.in $(wildcard *.py)
        <br>
        +
        <br>
        +if PLUGINS
        <br>
        +ENABLE_PLUGINS =&nbsp; True
        <br>
        +else
        <br>
        +ENABLE_PLUGINS =&nbsp; False
        <br>
        +endif
        <br>
        +
        <br>
        +do_substitution = \
        <br>
        +&nbsp;&nbsp;&nbsp; sed -e 's,[@]ENABLE_PLUGINS[@],$(ENABLE_PLUGINS),g'
        <br>
        +
        <br>
        +sample.conf: sample.conf.in Makefile
        <br>
        +&nbsp;&nbsp;&nbsp; echo $(ENABLE_PLUGINS)
        <br>
        +&nbsp;&nbsp;&nbsp; $(do_substitution) &lt; $&lt; &gt; $@
        <br>
        +
        <br>
        +BUILT_SOURCES = sample.conf
        <br>
        +CLEANFILES = sample.conf
        <br>
        diff --git a/plugins/sample/sample.conf
        b/plugins/sample/sample.conf.in
        <br>
        similarity index 90%
        <br>
        rename from plugins/sample/sample.conf
        <br>
        rename to plugins/sample/sample.conf.in
        <br>
        index 78a9f4e..12a3eef 100644
        <br>
        --- a/plugins/sample/sample.conf
        <br>
        +++ b/plugins/sample/sample.conf.in
        <br>
        @@ -1,5 +1,5 @@
        <br>
        &nbsp; [kimchi]
        <br>
        -enable = True
        <br>
        +enable = @ENABLE_PLUGINS@
        <br>
        &nbsp; plugin_class = "Drawings"
        <br>
        &nbsp; uri = "/plugins/sample"
        <br>
        <br>
      </blockquote>
      <br>
      <br>
      _______________________________________________
      <br>
      Kimchi-devel mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>