Uploaded image for project: 'Buildr'
  1. Buildr
  2. BUILDR-325

Overriding package spec with classifer doesn't work

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.4
    • Fix Version/s: 1.3.5
    • Component/s: Packaging
    • Labels:
      None

      Description

      The current code in package.rb does this:

      package = (no_options && packages.detect { |pkg| pkg.type == spec[:type] ||
      packages.find

      { |pkg| pkg.name == file_name } ||
      packager.call(file_name)

      ie, if you define two packages that use the :zip type, only the first one will be taken into account.

      I happen to work on Eclipse features, in which both the source and original features work with the same type, but have different classifiers.

      So I'd like the code to do this instead:

      package = (no_options && packages.detect { |pkg| pkg.type == spec[:type] && (spec[:classifier].nil? || pkg.classifier == spec[:classifier])}) ||
      packages.find { |pkg| pkg.name == file_name }

      ||
      packager.call(file_name)

        Attachments

        1. spec_BUILDR-325
          1 kB
          Antoine Toulme
        2. buildrpatch
          0.8 kB
          Antoine Toulme

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              toulmean Antoine Toulme
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: