[Seaside-dev] Detecting installed Seaside versions?

Andreas Raab andreas.raab at gmx.de
Wed Nov 25 02:27:27 UTC 2009


Hi Dale -

Dale Henrichs wrote:
> _If_ Metacello were being used to load/manage Seaside, then it could be used to provide the answer to your question. I _have_ built a "general use" configuration for managing Seaside3.0, but I have not built one for Seaside 2.8. You are correct that one would need to build a "general use" configuration to take advantage of Metacello for Seasdie 2.8.

I see. Of course the problem is that I'd like to detect the Seaside 
version regardless of the method of installation used. I don't know if 
this version was installed via builder.seaside.st, Installer, Universes, 
SqueakMap or Metacello (if I did, the problem would be much easier :-)

> There is no WAVersion so that answer is not an option. Metacello is intended to manage versions of projects which is why it is mentioned at all. Metacello was mentioned in the context of "if you are going to build something to solve Andreas' problem, you might consider Metacello as an option."

I guess that just goes to show how little I know about Metacello :-) 
OTOH, if you're trying to address this issue may I ask that you *don't* 
make it dependent on a particular method of installation used? The 
problem is that the method of installation can and will change but that 
generally doesn't change the version of Seaside. Having something like 
WAVersion or equivalent would be a much more reliable way to detect an 
installed version.

> The best you can do right now is use the Seaside2.8 package number to divine what version of Seaisde2.8 is installed (2.8.4 -> Seaside2.8a1-lr.591, 2.8.3 -> Seaside2.8a1-pmm.573, 2.8.2 -> Seaside2.8a1-lr.563, 2.8.1 -> Seaside2.8a1-lr.541).

That looks like a pretty reasonable approximation, thanks. Since there 
ain't much 2.8 development going on (any?) this should work well enough 
for my purposes.

> For Seaside 3.0 there are a number of packages involved so the "version signature" is not as simple ... Metacello would be a better option in that case...

Assuming that the method of choice for installation doesn't allow 
installing inconsistent sets of packages a simple WAVersion should be 
quite sufficient. I'm not trying to cover all the corner cases - I'm 
trying to answer the big picture question of "Does this image have 
Seaside installed, and if so, which version".

BTW, I feel like I'm not expressing myself well here. I'm not asking for 
something complex, I'm asking for something simple. This whole "oh, we 
need to figure out which combination of packages is installed" is not 
what I'm after since I'm not trying to detect this for Seaside framework 
developers, but rather for the Seaside users which means that the set of 
package versions will generally be strictly bounded by what the 
out-of-the-box installers provide which generally is restricted to a 
subset of the released versions. As a consequence, I don't expect to 
have to discriminate more than four of five versions and I can't imagine 
that this is such a difficult job to do.

Cheers,
   - Andreas


> ----- "Andreas Raab" <andreas.raab at gmx.de> wrote:
> 
> | Hi Dale -
> | 
> | I'm getting confused here. What I'm practically trying to do is along
> | 
> | the lines of giving a warning if a user asks to install Seaside 3.0 on
> | 
> | top of an earlier version of Seaside, and just allow the request to
> | pass 
> | if Seaside 3.0 is already installed. I expected to get some responses
> | 
> | along the lines "use WAVersion seasideMajor and WAVersion
> | seasideMinor" 
> | or somesuch or at worst something along the lines of "You can detect 
> | Seaside x.y by looking for WAFooBar and WAFrumbazzle because WAFooBar
> | 
> | first appeared in version x.y and WAFrumbazzle appeared in version
> | x.z".
> | 
> | I'm not sure how to interpret your comment about not having *built* a
> | 
> | Metacello configuration in this context. I must be misunderstanding
> | what 
> | Metacello is. I can't imagine that in order to detect an installed 
> | Seaside version one must first build a cross-platform Metacello 
> | configuration. Are we really talking about the same thing here? Could
> | 
> | you maybe explain from first principles what Metacello is and why it 
> | would be the Right Thing to use for detecting an installed Seaside
> | version?
> | 
> | Horribly confused,
> |    - Andreas
> | 
> | Dale Henrichs wrote:
> | > I haven't built a cross platform Metacello configuration for
> | Seaside2.8, but I have built one for GLASS. If you load the latest
> | version of the ConfigurationOfGsSeaside28 package from
> | http://seaside.gemstone.com/ss/seaside you can see what a
> | configuration would look like (a metacello config can be loaded since
> | the config has not dependencies).
> | > 
> | > If this configuration had been built for more than GLASS, you'd
> | execute the following expression to determine what version of
> | Seaside2.8 is loaded:
> | > 
> | >   ConfigurationOfGsSeaside28 project currentVersion
> | > 
> | > Executing that expression would cause Metacello itself to be loaded
> | (if it hadn't already been loaded).
> | > 
> | > The idea behind Metacello is that you'd use it to also load version
> | 2.8.4 of Seaside2.8 into your image, by executing something like the
> | following:
> | > 
> | >   (ConfigurationOfGsSeaside28 project version: '2.8.4') load
> | > 
> | > In the end the Metacello configuration is a map between a collection
> | of Monticello packages and a specific version number, that map can be
> | used to load a particular version of a project or to determine which
> | version is (probably) installed. Metacello doesn't store state...
> | > 
> | > Does this help?
> | > 
> | > Dale
> | > 
> | > ----- "Andreas Raab" <andreas.raab at gmx.de> wrote:
> | > 
> | > | I have zero experience with Metacello (I know hardly more about
> | it
> | > | then 
> | > | it's name) but let's try an example: Assume I'm downloading one of
> | the
> | > | 
> | > | older 2.8 images, what do I need to do to have Metacello tell me
> | "this
> | > | 
> | > | image has Seaside 2.8 installed"?
> | > | 
> | > | Cheers,
> | > |    - Andreas
> | > | 
> | > | Julian Fitzell wrote:
> | > | > Right... that could be a viable option...
> | > | > 
> | > | > On Tue, Nov 24, 2009 at 11:39 AM, Dale Henrichs
> | > | > <dale.henrichs at gemstone.com> wrote:
> | > | >> If you use Metacello, it has the ability to calculate the
> | current
> | > | version of a project (a MetacelloVersionNumber) ... so
> | > | >>
> | > | >>  ConfigurationOfSeaside30 project currentVersion
> | > | >>
> | > | >> would do the trick:)
> | > | >>
> | > | >> Dale
> | > | >>
> | > | >> ----- "Julian Fitzell" <jfitzell at gmail.com> wrote:
> | > | >>
> | > | >> | We don't really have a solution to that at the moment.
> | Obviously
> | > | the
> | > | >> | MC version for the Core package gives some indication but
> | > | clearly
> | > | >> | that's not really good enough.
> | > | >> |
> | > | >> | In Seaside 2.8, you can do "SeasidePlatformSupport
> | > | versionString",
> | > | >> | though it would probably be nice to have an array like {2. 8.
> | 1}
> | > | or
> | > | >> | something... maybe a WAVersion object would be better than
> | an
> | > | array
> | > | >> | since it could do comparisons and printing and so on.
> | "WAVersion
> | > | >> | current" could return an appropriate instance. Part of me
> | hates
> | > | >> | having
> | > | >> | to modify the code to specify the version number, but the
> | > | alternative
> | > | >> | is to have an install script do it, which is also kind of
> | lame.
> | > | >> |
> | > | >> | Ok, enough rambling; clearly I, at least, am open to
> | suggestions.
> | > | :)
> | > | >> |
> | > | >> | Julian
> | > | >> |
> | > | >> | On Tue, Nov 24, 2009 at 1:33 AM, Andreas Raab
> | > | <andreas.raab at gmx.de>
> | > | >> | wrote:
> | > | >> | > Hi -
> | > | >> | >
> | > | >> | > Curious: How does one detect an installed Seaside version?
> | > | I.e.,
> | > | >> | assuming
> | > | >> | > that one would want to detect that an image has Seaside
> | loaded
> | > | >> | already, how
> | > | >> | > would one determine its version?
> | > | >> | >
> | > | >> | > Cheers,
> | > | >> | >  - Andreas
> | > | >> | > _______________________________________________
> | > | >> | > seaside-dev mailing list
> | > | >> | > seaside-dev at lists.squeakfoundation.org
> | > | >> | >
> | http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> | > | >> | >
> | > | >> | _______________________________________________
> | > | >> | seaside-dev mailing list
> | > | >> | seaside-dev at lists.squeakfoundation.org
> | > | >> |
> | http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> | > | >> _______________________________________________
> | > | >> seaside-dev mailing list
> | > | >> seaside-dev at lists.squeakfoundation.org
> | > | >> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> | > | >>
> | > | > _______________________________________________
> | > | > seaside-dev mailing list
> | > | > seaside-dev at lists.squeakfoundation.org
> | > | > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> | > | >
> | >
> 


More information about the seaside-dev mailing list