<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>365813</bug_id>
          
          <creation_ts>2016-07-18 13:00:02 +0000</creation_ts>
          <short_desc>options doesn&apos;t work for module-sets</short_desc>
          <delta_ts>2024-05-10 09:17:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Developer tools</classification>
          <product>kdesrc-build</product>
          <component>general</component>
          <version>Git</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Faure">faure</reporter>
          <assigned_to name="Michael Pyne">mpyne</assigned_to>
          
          
          <cf_commitlink>https://invent.kde.org/sdk/kdesrc-build/-/commit/dc70f55c7dc6e494fbc8a16b94e48111a59b5740</cf_commitlink>
          <cf_versionfixedin>16.08</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1608888</commentid>
    <comment_count>0</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2016-07-18 13:00:02 +0000</bug_when>
    <thetext>I would like to keep using branch-group kf5-qt5 (for KF5 itself, for the workspace, for most apps, etc.) but I would like to switch to Applications/16.08 for the kde pim stack.


Reproducible: Always

Steps to Reproduce:
The modules that make up &quot;kde pim&quot; are a very large number (hmm what&apos;s the proper English sentence for this?).

They are defined in 3 module-sets in kf5-kdepim-build-include:
 akonadi kde-pimlibs kde-pim
Therefore my attempt, to avoid forking kf5-kdepim-build-include, was to write, in my kdesrc-buildrc:

include extragear/utils/kdesrc-build/kf5-qt5-build-include

options akonadi
    branch Applications/16.08
end options
options kde-pimlibs
    branch Applications/16.08
end options
options kde-pim
    branch Applications/16.08
end options


Actual Results:  
This works well for akonadi, because that&apos;s the module name, but not for the others, e.g. kdesrc-build kde-pimlibs shows

Building kcontacts from kde-pimlibs (1/43)
        Updating kcontacts (to branch master)


Expected Results:  
Could &quot;options&quot; for a module-set be applied to all the modules of the module-set ?

Alternatively you might prefer a more explicit module-set-options, don&apos;t know what fits best with kdesrc-build&apos;s overall design for modules and module-sets.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1609997</commentid>
    <comment_count>1</comment_count>
      <attachid>100253</attachid>
    <who name="Michael Pyne">mpyne</who>
    <bug_when>2016-07-22 23:30:12 +0000</bug_when>
    <thetext>Created attachment 100253
Patch options matching named module-sets into module options

The attached patch does what you want in my testing. I&apos;m not sure if this simple change is exactly the best way to go though.

Having a separate module-set-options seems needlessly user-hostile (though in fairness it is consistent with the way option handling has evolved in the code). It wouldn&apos;t be hard to adjust the config file parser to warn (or throw error) if a module-set and module both have the same name, and that would ensure that a plain &apos;options&apos; block works for both..... except that &apos;options&apos; is also meant to work in the case of modules that are not known about in the rc-file parser, but only become visible later (e.g. if you name a module-set &apos;juk&apos; but perform a &apos;use-modules kde/kdemultimedia&apos; in a separate module-set, you&apos;d have two entities named &quot;juk&quot; that could have options applied).

That&apos;s somewhat contrived of course, I&apos;m just worried that &quot;options foo ... end options&quot; could end up meaning 2 separate things depending only on events that happen at runtime.

With all that said, this does seem to work and they say that the perfect is the enemy of the good, so maybe it&apos;s best to integrate it and wait for problems (if any) before worrying too much?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1610160</commentid>
    <comment_count>2</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2016-07-24 09:05:49 +0000</bug_when>
    <thetext>Thanks for the patch, much appreciated, I needed this to be able to work on kdepim ;)
Tested to work, please push the change.

&quot;could end up meaning two separate things&quot; is already a problem, I think, when having a module and a module-set with the same name. For instance, kf5-extragear-build-include says

module-set kmymoney
    repository kde-projects
    use-modules kdiagram alkimia kmymoney
end module-set

What happens when doing &quot;kdesrc-build kmymoney&quot; is that it builds the module-set, which also means one can&apos;t *just* rebuild the module alone. And, with this patch, &quot;options kmymoney&quot; would always apply to the whole module-set rather than just one module. It seems to me that module-set-options wouldn&apos;t be ideal because it would fix the 2nd issue while &quot;kdesrc-build kmymoney&quot; would still be ambiguous.

The obvious best solution to that problem is to not use module names for module-sets, since this makes us lose flexibility. Therefore I would rename these badly named module sets (&quot;akonadi&quot; could very well be &quot;kde-pim-akonadi&quot;, in fact that module set name is useless, maybe &quot;module&quot; would have been enough? (I forgot it that would use branch-group settings...)).

And then if we make sure that we don&apos;t have conflicts anymore (=&gt; your suggestion of a warning sounds good), we can keep using &quot;options&quot; for both (so this patch is fine).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1610232</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Pyne">mpyne</who>
    <bug_when>2016-07-24 17:03:42 +0000</bug_when>
    <thetext>Git commit c3081844077eb53adb8a9d58c8a3e3dc66921cee by Michael Pyne.
Committed on 24/07/2016 at 17:01.
Pushed by mpyne into branch &apos;master&apos;.

Allow &apos;options&apos; groups to apply to named module-sets.

This makes it more convenient to work with baseline configurations (that
are &apos;include&apos;d) without changing the upstream configuration.

Still to do: add a warning when modules and module-sets end up sharing
the same name somehow.
FIXED-IN:16.08

M  +9    -1    doc/index.docbook
M  +5    -1    modules/ksb/ModuleResolver.pm

http://commits.kde.org/kdesrc-build/c3081844077eb53adb8a9d58c8a3e3dc66921cee</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2318741</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Pyne">mpyne</who>
    <bug_when>2024-05-10 09:17:13 +0000</bug_when>
    <thetext>Git commit dc70f55c7dc6e494fbc8a16b94e48111a59b5740 by Michael Pyne.
Committed on 24/07/2016 at 17:01.
Pushed by ashark into branch &apos;docbook_historied_per_file&apos;.

Allow &apos;options&apos; groups to apply to named module-sets.

This makes it more convenient to work with baseline configurations (that
are &apos;include&apos;d) without changing the upstream configuration.

Still to do: add a warning when modules and module-sets end up sharing
the same name somehow.
FIXED-IN:16.08

Original commit: c3081844
https://invent.kde.org/sdk/kdesrc-build/-/commit/c3081844077eb53adb8a9d58c8a3e3dc66921cee

M  +1    -1    doc/index.docbook
M  +8    -0    doc/kdesrc-buildrc/kdesrc-buildrc-overview.docbook

https://invent.kde.org/sdk/kdesrc-build/-/commit/dc70f55c7dc6e494fbc8a16b94e48111a59b5740</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>100253</attachid>
            <date>2016-07-22 23:30:12 +0000</date>
            <delta_ts>2016-07-22 23:30:12 +0000</delta_ts>
            <desc>Patch options matching named module-sets into module options</desc>
            <filename>kdesrc-build-mset-options.patch</filename>
            <type>text/plain</type>
            <size>816</size>
            <attacher name="Michael Pyne">mpyne</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL21vZHVsZXMva3NiL01vZHVsZVJlc29sdmVyLnBtIGIvbW9kdWxlcy9rc2Iv
TW9kdWxlUmVzb2x2ZXIucG0KaW5kZXggNjY5NmE0OC4uMGNmZDNjNiAxMDA2NDQKLS0tIGEvbW9k
dWxlcy9rc2IvTW9kdWxlUmVzb2x2ZXIucG0KKysrIGIvbW9kdWxlcy9rc2IvTW9kdWxlUmVzb2x2
ZXIucG0KQEAgLTc1LDExICs3NSwxNSBAQCBzdWIgX2FwcGx5Q21kbGluZU9wdGlvbnMKIAogICAg
IGZvcmVhY2ggbXkgJG0gKEBtb2R1bGVzKSB7CiAgICAgICAgIG15ICRuYW1lID0gJG0tPm5hbWUo
KTsKKyAgICAgICAgbXkgJG1vZHVsZVNldE5hbWUgPSAkbS0+bW9kdWxlU2V0KCktPm5hbWUoKTsK
IAogICAgICAgICAjIFJlbW92ZSBhbnkgb3B0aW9ucyB0aGF0IHdvdWxkIGludGVyZmVyZSB3aXRo
IGNtZGxpbmUgYXJncwogICAgICAgICBkZWxldGUgQHskbS0+e29wdGlvbnN9fXtAY21kbGluZUFy
Z3N9OwogCi0gICAgICAgICMgUmVhcHBseSBtb2R1bGUtc3BlY2lmaWMgY21kbGluZSBhcmdzCisg
ICAgICAgICMgUmVhcHBseSBtb2R1bGUtc3BlY2lmaWMgY21kbGluZSBhcmdzIChtb2R1bGUtc2V0
IGZpcnN0KQorICAgICAgICBpZiAoJG1vZHVsZVNldE5hbWUgJiYgZXhpc3RzICRzZWxmLT57cGVu
ZGluZ09wdGlvbnN9LT57JG1vZHVsZVNldE5hbWV9KSB7CisgICAgICAgICAgICAkbS0+c2V0T3B0
aW9uKCV7JHNlbGYtPntwZW5kaW5nT3B0aW9uc30tPnskbW9kdWxlU2V0TmFtZX19KTsKKyAgICAg
ICAgfQogICAgICAgICAkbS0+c2V0T3B0aW9uKCV7JHNlbGYtPntwZW5kaW5nT3B0aW9uc30tPnsk
bmFtZX19KTsKICAgICB9CiAK
</data>

          </attachment>
      

    </bug>

</bugzilla>