Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357616 - Copying Validation sets between models results in inter-model reference
Summary: Copying Validation sets between models results in inter-model reference
Status: CLOSED WONTFIX
Alias: None
Product: CBI
Classification: Technology
Component: CBI p2 Repository Aggregator (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CBI Inbox CLA
QA Contact: David Williams CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 06:48 EDT by Miles Daffin CLA
Modified: 2023-09-01 10:01 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miles Daffin CLA 2011-09-14 06:48:48 EDT
I copied the following VS from model A:

  <validationSets label="Scala IDE for Scala 2.8" extends="//@validationSets[label='main']">
    <contributions label="main">
      <repositories location="http://download.scala-ide.org/releases-28/2.0.0-beta">
        <features name="org.scala-ide.sdt.feature.feature.group" versionRange="[2.0.0.beta09-28,2.0.0.beta09-29]" categories="//@customCategories[identifier='Scala%20IDE%20for%20Scala%202.8']"/>
        <features name="org.scala-ide.sdt.source.feature.feature.group" versionRange="[2.0.0.beta09-28,2.0.0.beta09-29)" categories="//@customCategories[identifier='Scala%20IDE%20for%20Scala%202.8']"/>
      </repositories>
    </contributions>
  </validationSets>

When I pasted it into model B I got this:

  <validationSets label="Scala IDE for Scala 2.8">
    <contributions label="main">
      <repositories location="http://download.scala-ide.org/releases-28/2.0.0-beta">
        <features name="org.scala-ide.sdt.feature.feature.group" versionRange="[2.0.0.beta10-28,2.0.0.beta10-29]"/>
        <features name="org.scala-ide.sdt.source.feature.feature.group" versionRange="[2.0.0.beta09-28,2.0.0.beta09-29)"/>
      </repositories>
    </contributions>
    <extends href="../../B3%20Mirror%20-%20MSDE%203.7%20Mega%20Repository/msde-mega-indigo.b3aggr#//@validationSets[label='main']"/>
  </validationSets>

Note: extends is a separate element with an href pointing to a VS in model A, the source model. If I then close the model and open it again I see 2 Aggregation nodes instead of one: one for the model I am looking at and the other for the model referenced from the extends element. 

Suggested fix would be to simply remove the extension declaration and leave this to the user to fix manually.
Comment 1 Thomas Hallgren CLA 2011-09-14 07:04:07 EDT
(In reply to comment #0) 
> Suggested fix would be to simply remove the extension declaration and leave
> this to the user to fix manually.

This makes sense when the extended set (in this case 'main') doesn't exist. But let's say that a set with the same name exist. Should the copied set then be made to extend that?
Comment 2 Miles Daffin CLA 2011-09-14 07:33:50 EDT
Perhaps the reference could just be left alone during copy, i.e. left relative to the model in which it occurs. Then if the extended VS does not exist in the model it would just be marked as an problem.
Comment 3 David Williams CLA 2016-09-16 15:43:58 EDT
[Bookkeeping change only. Moving bugs to the new "home" of aggregator, CBI.]
Comment 4 Frederic Gurr CLA 2023-09-01 10:01:04 EDT
If this issue is still relevant, please move it to https://github.com/eclipse-cbi/p2repo-aggregator/issues.