Mantis - Squeak
Viewing Issue Advanced Details
3773 Monticello minor always 06-05-06 14:57 06-05-06 14:57
Ron  
avi  
normal  
assigned 3.9  
open  
none    
none  
0003773: Monticello Configuration Update From Repository Broken On More then One dash -
If you have a version name that has more then one dash, the update from repository doesn't work. The reason is that the version name will not match the package name copy upto last $- since packages only have 1 dash max. The following change fixes the problem.

========================================================================

MCConfiguration>>updateFromRepositories
    | oldInfos newNames sortedNames newDeps |
    oldInfos _ self dependencies collect: [:dep | dep versionInfo].
    newNames _ Dictionary new.
    self repositories
        do: [:repo |
            ProgressNotification signal: '' extra: 'Checking ', repo description.
            (repo possiblyNewerVersionsOfAnyOf: oldInfos)
                do: [:newName | newNames at: newName put: repo]]
        displayingProgress: 'Searching new versions'.

    sortedNames _ newNames keys asSortedCollection:
        [:a :b | a numericSuffix > b numericSuffix].

    newDeps _ OrderedCollection new.
    self dependencies do: [:dep |
        | newName |
        newName _ sortedNames
            detect: [:each | (each copyUpToLast: $-) = (dep versionInfo name copyUpToLast: $-)]
            ifNone: [nil].
        newDeps add: (newName
            ifNil: [dep]
            ifNotNil: [
                | repo ver |
                repo _ newNames at: newName.
                ver _ self versionNamed: newName for: dep from: repo.
                ver ifNil: [dep]
                    ifNotNil: [MCVersionDependency package: ver package info: ver info]
            ])
    ] displayingProgress: 'downloading new versions'.

    self dependencies: newDeps.

========================================================================

The fix is match on version info instead the above method was changed as follows:

newName _ sortedNames
            detect: [:each | (each copyUpToLast: $-) = (dep versionInfo name copyUpToLast: $-)]

from:

newName _ sortedNames
            detect: [:each | (each copyUpToLast: $-) = dep package name]

Ron Teitelbaum
Ron@USMedRec.com
 MCConfiguration-updateFromRepositories.st [^] (1,232 bytes) 06-05-06 14:57

There are no notes attached to this issue.