ccollins476ad commented on issue #140: newt - Repo dependencies
URL: https://github.com/apache/mynewt-newt/pull/140#issuecomment-370938242
 
 
   Here are some tests with results.  I created some empty Mynewt repos for 
these tests ("mynewt-repo-01", "mynewt-repo-02").  These repos are in my github 
(ccollins476ad), but they should be publicly accessible to others.
   
   I ran these tests in order, starting from a newly created project.  Running 
them in a different order will change the output slightly.
   
   ## Test 1
   #### `project.yml`
   ```
   repository.mynewt-repo-01:
       type: git
       vers: 0.0.0
       url: 'g...@github.com:ccollins476ad/mynewt-repo-01.git'
   ```
   
   #### Action
   ```newt install```
   
   #### Result
   ```
   install mynewt-repo-01 (0.0.0)
   install mynewt-repo-02 (0.0.0)
   install apache-mynewt-core (0.0.0)
   ```
   
   #### Notes
   `project.yml` requires mynewt-repo-01,==0.0.0
   mynewt-repo-01,0.0.0 requires mynewt-repo-02,==0-dev (0.0.0)
   mynewt-repo-02,0.0.0 requires apache-mynewt-core,==0-dev (0.0.0)
   
   ## Test 2
   `project.yml`
   ```
   repository.mynewt-repo-01:
       type: git
       vers: 1.3.0
       url: 'g...@github.com:ccollins476ad/mynewt-repo-01.git'
   ```
   
   #### Action
   ```newt upgrade```
   
   #### Result
   ```
   upgrade to mynewt-repo-01 (0.0.0 --> 1.3.0)
   upgrade to mynewt-repo-02 (0.0.0 --> 1.3.0)
   install mynewt_arduino_zero (1.3.0)
   ```
   
   #### Notes
   `project.yml` requires mynewt-repo-01,==1.3.0
   mynewt-repo-01,1.3.0 requires mynewt-repo-02,>=1.2.0
   mynewt-repo-02,1.3.0 requires mynewt_arduino_zero,==1.3.0
   
   ## Test 3
   `project.yml`
   ```
   repository.mynewt-repo-01:
       type: git
       vers: 1.3.0
       url: 'g...@github.com:ccollins476ad/mynewt-repo-01.git'
   repository.mynewt_arduino_zero:
       type: git
       vers: 1.2.0
       url: 'g...@github.com:runtimeco/mynewt_arduino_zero.git'
   ```
   
   #### Action
   ```newt upgrade```
   
   #### Result
   ```
   Skipping "mynewt-repo-01": already upgraded (1.3.0)
   upgrade mynewt-repo-02 (1.3.0 --> 1.2.0)
   install mcuboot (1.1.0)
   upgrade mynewt_arduino_zero (1.3.0 --> 1.2.0)
   ```
   
   #### Notes
   `project.yml` and mynewt-repo-02,1.3.0 require conflicting versions of 
mynewt_arduino_zero.  The `project.yml` requirements always take precedence 
over repo dependencies, so the issue is resolved by downgrading mynewt-repo-02 
to a version that doesn't depend on a conflicting version of 
mynewt_arduino_zero.
   
   ## Test 4
   `project.yml`
   ```
   repository.mynewt-repo-01:
       type: git
       vers: 0.0.0
       url: 'g...@github.com:ccollins476ad/mynewt-repo-01.git'
   repository.apache-mynewt-core:
       type: git
       vers: 1.3.0
       url: 'g...@github.com:apache/mynewt-core.git'
   ```
   
   #### Action
   ```newt upgrade```
   
   #### Result
   ```
   Error: Repository conflicts:
       Installation of repo "apache-mynewt-core" is blocked:
                      `project.yml` requires apache-mynewt-core ==1.3.0
                 mynewt-repo-02,0.0.0 requires apache-mynewt-core ==0.0.0
   ```
   
   ## Test 5
   `project.yml`
   ```
   repository.mynewt-repo-01:
       type: git
       vers: 1.3.0
       url: 'g...@github.com:ccollins476ad/mynewt-repo-01.git'
   repository.apache-mynewt-core:
       type: git
       vers: 1.3.0
       url: 'g...@github.com:apache/mynewt-core.git'
   ```
   
   #### Action
   ```newt upgrade```
   
   #### Result
   ```
   Skipping "mynewt-repo-01": already upgraded (1.3.0)
   upgrade apache-mynewt-core (0.0.0 --> 1.3.0)
   upgrade mynewt-repo-02 (1.2.0 --> 1.3.0)
   upgrade mynewt_arduino_zero (1.2.0 --> 1.3.0)
   ```
   
   #### Notes
   Repos are always upgraded to the latest version possible.  Now that the 
mynewt_arduino_zero requirement has been removed from `project.yml`, 
mynewt-repo-02 is allowed to upgrade back to 1.3.0.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to