Frank Shearar uploaded a new version of Installer-Core to project The Inbox:
http://source.squeak.org/inbox/Installer-Core-fbs.361.mcz ==================== Summary ==================== Name: Installer-Core-fbs.361 Author: fbs Time: 17 January 2013, 10:14:55.106 pm UUID: 6b44c4f2-631a-46e9-82a1-29df951936b9 Ancestors: Installer-Core-bp.360 #3 of 3 letting "Installer ss install: 'Foo'" use the local cache repository if possible. If you run "Installer ss3 install: 'CoolWidget-xyz.1.mcz', load it from the cache repository if possible. Otherwise, use the canonical repository. This lets you still use SqueakMap Installer scripts even when you're not connected to the Internet. =============== Diff against Installer-Core-bp.360 =============== Item was changed: ----- Method: InstallerMonticello>>mcThing (in category 'monticello') ----- mcThing + | loader localCache | - | loader | loader := self classMCVersionLoader new. + localCache := self classMCCacheRepository default. self logCR: 'reading ' , mc description , '...'. "several attempts to read files - repository readableFileNames sometimes fails" self packages do: [:pkg | | versionNames fileToLoad version | + versionNames := self versionNamesForPackageNamed: (self packageName: pkg) withCache: localCache. - versionNames := mc versionNamesForPackageNamed: - (pkg asMCVersionName versionNumber = 0 - ifTrue: [ "Just a package name specified, use it whole." pkg ] - ifFalse: [pkg asMCVersionName packageName]). versionNames sort: self mcSortFileBlock. fileToLoad := versionNames detect: (self mcDetectFileBlock: pkg) ifNone: [ nil ]. fileToLoad + ifNotNil: [version := [localCache versionNamed: fileToLoad] on: MCError do: [mc versionNamed: fileToLoad]. - ifNotNil: [version := mc versionNamed: fileToLoad. (version isKindOf: MCConfiguration) ifTrue: [^ version] ifFalse: [MCRepositoryGroup default addRepository: self normalizedRepository. version workingCopy repositoryGroup addRepository: self normalizedRepository. loader addVersion: version]. self logCR: ' found ' , version fileName , '...']]. ^ loader! Item was added: + ----- Method: InstallerMonticello>>packageName: (in category 'private') ----- + packageName: versionString + "Extract the package name out of a Monticello version string: 'Foo', 'Foo-fbs.1', 'Foo-fbs.1.mcz'." + ^ versionString asMCVersionName versionNumber = 0 + ifTrue: [ "Just a package name specified, use it whole." versionString ] + ifFalse: [versionString asMCVersionName packageName]! Item was added: + ----- Method: InstallerMonticello>>versionNamesForPackageNamed:withCache: (in category 'private') ----- + versionNamesForPackageNamed: aString withCache: localCache + "The local cache might contain some versions of this package. The network might not be available. Try return a merged list of both, but otherwise just return the local versions." + | localVersions remoteVersions | + localVersions := localCache versionNamesForPackageNamed: aString. + remoteVersions := [mc versionNamesForPackageNamed: aString] + on: MCError do: [Array empty]. + ^ (localVersions asSet addAll: remoteVersions; yourself) asArray.! |
On 17 January 2013 22:14, <[hidden email]> wrote:
> Frank Shearar uploaded a new version of Installer-Core to project The Inbox: > http://source.squeak.org/inbox/Installer-Core-fbs.361.mcz > > ==================== Summary ==================== > > Name: Installer-Core-fbs.361 > Author: fbs > Time: 17 January 2013, 10:14:55.106 pm > UUID: 6b44c4f2-631a-46e9-82a1-29df951936b9 > Ancestors: Installer-Core-bp.360 > > #3 of 3 letting "Installer ss install: 'Foo'" use the local cache repository if possible. > > If you run "Installer ss3 install: 'CoolWidget-xyz.1.mcz', load it from the cache repository if possible. Otherwise, use the canonical repository. > > This lets you still use SqueakMap Installer scripts even when you're not connected to the Internet. > > =============== Diff against Installer-Core-bp.360 =============== Ultimately I'd like to see "this package is made up of these parts" and "this package's parts can be found at these locations" to be completely separated. Providing a canonical location is great, but there are many situations where being able to specify the location of the parts is extremely useful. Not having an internet connection, for instance, or someone using a cache on the LAN. This change makes a tiny step in that direction by permitting the loading of fully specified Monticello artifacts to use the local cache in preference to always downloading things. (One nit: you can already say "install: 'Foo-fbs.1" which does not do what you might think: it will load the most recent version whose prefix matches - "Foo-fbs.19.mcz", say. If you want a particular version, you MUST give the ".mcz" suffix. This change does not alter this behaviour: it will simply try load the latest match from the union of local and remote versions.) frank |
On 17 January 2013 22:20, Frank Shearar <[hidden email]> wrote:
> On 17 January 2013 22:14, <[hidden email]> wrote: >> Frank Shearar uploaded a new version of Installer-Core to project The Inbox: >> http://source.squeak.org/inbox/Installer-Core-fbs.361.mcz >> >> ==================== Summary ==================== >> >> Name: Installer-Core-fbs.361 >> Author: fbs >> Time: 17 January 2013, 10:14:55.106 pm >> UUID: 6b44c4f2-631a-46e9-82a1-29df951936b9 >> Ancestors: Installer-Core-bp.360 >> >> #3 of 3 letting "Installer ss install: 'Foo'" use the local cache repository if possible. >> >> If you run "Installer ss3 install: 'CoolWidget-xyz.1.mcz', load it from the cache repository if possible. Otherwise, use the canonical repository. >> >> This lets you still use SqueakMap Installer scripts even when you're not connected to the Internet. >> >> =============== Diff against Installer-Core-bp.360 =============== > > Ultimately I'd like to see "this package is made up of these parts" > and "this package's parts can be found at these locations" to be > completely separated. > > Providing a canonical location is great, but there are many situations > where being able to specify the location of the parts is extremely > useful. Not having an internet connection, for instance, or someone > using a cache on the LAN. > > This change makes a tiny step in that direction by permitting the > loading of fully specified Monticello artifacts to use the local cache > in preference to always downloading things. > > (One nit: you can already say "install: 'Foo-fbs.1" which does not do > what you might think: it will load the most recent version whose > prefix matches - "Foo-fbs.19.mcz", say. If you want a particular > version, you MUST give the ".mcz" suffix. This change does not alter > this behaviour: it will simply try load the latest match from the > union of local and remote versions.) I think the idea can be generalised slightly. As an example: SqueakSource is vital to our community. It is also rather unreliable. There's a Latin American mirror. Wouldn't it be nice if "Installer ss install: 'Foo'" meant "try install from SqueakSource and, if you can't, try the LatAm mirror instead.". So while you look at this and hopefully think it's not too rubbish, I'll go off and think about an InstallerWithFailover. frank |
In reply to this post by Frank Shearar-3
On 1/17/13, Frank Shearar <[hidden email]> wrote:
> On 17 January 2013 22:14, <[hidden email]> wrote: >> Frank Shearar uploaded a new version of Installer-Core to project The >> Inbox: >> http://source.squeak.org/inbox/Installer-Core-fbs.361.mcz >> >> ==================== Summary ==================== >> >> Name: Installer-Core-fbs.361 >> Author: fbs >> Time: 17 January 2013, 10:14:55.106 pm >> UUID: 6b44c4f2-631a-46e9-82a1-29df951936b9 >> Ancestors: Installer-Core-bp.360 >> >> #3 of 3 letting "Installer ss install: 'Foo'" use the local cache >> repository if possible. >> >> If you run "Installer ss3 install: 'CoolWidget-xyz.1.mcz', load it from >> the cache repository if possible. Otherwise, use the canonical >> repository. >> >> This lets you still use SqueakMap Installer scripts even when you're not >> connected to the Internet. >> >> =============== Diff against Installer-Core-bp.360 =============== > > Ultimately I'd like to see "this package is made up of these parts" > and "this package's parts can be found at these locations" to be > completely separated. > > Providing a canonical location is great, but there are many situations > where being able to specify the location of the parts is extremely > useful. Not having an internet connection, for instance, or someone > using a cache on the LAN. > > This change makes a tiny step in that direction by permitting the > loading of fully specified Monticello artifacts to use the local cache > in preference to always downloading things. +1 very useful for installation tests like the ones I did in December. Some times of the day the internet is slow. Or for other reasons the local cache is preferable. --Hannes > > (One nit: you can already say "install: 'Foo-fbs.1" which does not do > what you might think: it will load the most recent version whose > prefix matches - "Foo-fbs.19.mcz", say. If you want a particular > version, you MUST give the ".mcz" suffix. This change does not alter > this behaviour: it will simply try load the latest match from the > union of local and remote versions.) > > frank > > |
In reply to this post by Frank Shearar-3
On 1/19/13, Frank Shearar <[hidden email]> wrote:
> On 17 January 2013 22:20, Frank Shearar <[hidden email]> wrote: >> On 17 January 2013 22:14, <[hidden email]> wrote: >>> Frank Shearar uploaded a new version of Installer-Core to project The >>> Inbox: >>> http://source.squeak.org/inbox/Installer-Core-fbs.361.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Installer-Core-fbs.361 >>> Author: fbs >>> Time: 17 January 2013, 10:14:55.106 pm >>> UUID: 6b44c4f2-631a-46e9-82a1-29df951936b9 >>> Ancestors: Installer-Core-bp.360 >>> >>> #3 of 3 letting "Installer ss install: 'Foo'" use the local cache >>> repository if possible. >>> >>> If you run "Installer ss3 install: 'CoolWidget-xyz.1.mcz', load it from >>> the cache repository if possible. Otherwise, use the canonical >>> repository. >>> >>> This lets you still use SqueakMap Installer scripts even when you're not >>> connected to the Internet. >>> >>> =============== Diff against Installer-Core-bp.360 =============== >> >> Ultimately I'd like to see "this package is made up of these parts" >> and "this package's parts can be found at these locations" to be >> completely separated. >> >> Providing a canonical location is great, but there are many situations >> where being able to specify the location of the parts is extremely >> useful. Not having an internet connection, for instance, or someone >> using a cache on the LAN. >> >> This change makes a tiny step in that direction by permitting the >> loading of fully specified Monticello artifacts to use the local cache >> in preference to always downloading things. >> >> (One nit: you can already say "install: 'Foo-fbs.1" which does not do >> what you might think: it will load the most recent version whose >> prefix matches - "Foo-fbs.19.mcz", say. If you want a particular >> version, you MUST give the ".mcz" suffix. This change does not alter >> this behaviour: it will simply try load the latest match from the >> union of local and remote versions.) > > I think the idea can be generalised slightly. As an example: > SqueakSource is vital to our community. It is also rather unreliable. > There's a Latin American mirror. Wouldn't it be nice if "Installer ss > install: 'Foo'" meant "try install from SqueakSource and, if you > can't, try the LatAm mirror instead.". > > So while you look at this and hopefully think it's not too rubbish, > I'll go off and think about an InstallerWithFailover. I think this is a necessity in case the LatAm mirror is really maintained, i.e. if it mirrors once a day. Who is responsible for it? --Hannes > > frank > > |
On 19 January 2013 22:42, H. Hirzel <[hidden email]> wrote:
> On 1/19/13, Frank Shearar <[hidden email]> wrote: >> On 17 January 2013 22:20, Frank Shearar <[hidden email]> wrote: >>> On 17 January 2013 22:14, <[hidden email]> wrote: >>>> Frank Shearar uploaded a new version of Installer-Core to project The >>>> Inbox: >>>> http://source.squeak.org/inbox/Installer-Core-fbs.361.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: Installer-Core-fbs.361 >>>> Author: fbs >>>> Time: 17 January 2013, 10:14:55.106 pm >>>> UUID: 6b44c4f2-631a-46e9-82a1-29df951936b9 >>>> Ancestors: Installer-Core-bp.360 >>>> >>>> #3 of 3 letting "Installer ss install: 'Foo'" use the local cache >>>> repository if possible. >>>> >>>> If you run "Installer ss3 install: 'CoolWidget-xyz.1.mcz', load it from >>>> the cache repository if possible. Otherwise, use the canonical >>>> repository. >>>> >>>> This lets you still use SqueakMap Installer scripts even when you're not >>>> connected to the Internet. >>>> >>>> =============== Diff against Installer-Core-bp.360 =============== >>> >>> Ultimately I'd like to see "this package is made up of these parts" >>> and "this package's parts can be found at these locations" to be >>> completely separated. >>> >>> Providing a canonical location is great, but there are many situations >>> where being able to specify the location of the parts is extremely >>> useful. Not having an internet connection, for instance, or someone >>> using a cache on the LAN. >>> >>> This change makes a tiny step in that direction by permitting the >>> loading of fully specified Monticello artifacts to use the local cache >>> in preference to always downloading things. >>> >>> (One nit: you can already say "install: 'Foo-fbs.1" which does not do >>> what you might think: it will load the most recent version whose >>> prefix matches - "Foo-fbs.19.mcz", say. If you want a particular >>> version, you MUST give the ".mcz" suffix. This change does not alter >>> this behaviour: it will simply try load the latest match from the >>> union of local and remote versions.) >> >> I think the idea can be generalised slightly. As an example: >> SqueakSource is vital to our community. It is also rather unreliable. >> There's a Latin American mirror. Wouldn't it be nice if "Installer ss >> install: 'Foo'" meant "try install from SqueakSource and, if you >> can't, try the LatAm mirror instead.". >> >> So while you look at this and hopefully think it's not too rubbish, >> I'll go off and think about an InstallerWithFailover. > > I think this is a necessity in case the LatAm mirror is really > maintained, i.e. if it mirrors once a day. > > Who is responsible for it? Johan Fabry, I think (judging by the context of the mirror front page: http://dsal.cl/squeaksource/) IIRC, Johan also donated a very neat hack to the builderCI stuff, so one could inject the LatAm mirror URL into the guts of Metacello during a load. Written correctly, an InstallerWithFailover could nest, allowing "get it locally, or from here or from there" in a uniform manner. I'll see what I can come up with tonight or the next few days. frank > --Hannes > >> >> frank >> >> > |
Free forum by Nabble | Edit this page |