Package Universes and Squeakmap

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Package Universes

Philippe Marschall
23 Aug 2007 17:39:48 -0400, Lex Spoon <[hidden email]>:

> "Ralph Johnson" <[hidden email]> writes:
>
> > On 17 Aug 2007 17:33:15 -0400, Lex Spoon <[hidden email]> wrote:
> >
> > > Anyway, I plan to add a link to the SqueakMap entry.  SqueakMap seems
> > > like a more appropriate place to add all the bits of meta-data you
> > > might ever want, including authorship and time stamps.
> >
> > Would it be possible to use the SqueakMap entry as a pointer to the
> > source?  Some package maintainers have stopped updating their SM entry
> > and just use PU.  This is a shame, since SM is the nearest thing we
> > have to a catalog of the entire Squeak universe.  But I can see that
> > people don't want to keep two systems in synch.  If PU could refer to
> > the SM entry then perhaps they could just update their SM entry and
> > get the PU entry updated for free.
>
> I would like there to be an easy way to post to both indexes in
> addition to others.  That's why I emailed the SqueakSource maintainer
> with code that posts a release to a package universe, in the same way
> SqueakSource used to do this to SqueakMap.

Exactly whom did you mail this code? Neither Adrian nor Lukas nor me
did receive any mails.

> I got no reply, and last I
> heard the SqueakMap button didn't work any longer.

It doesn't work because HTTPSocket is broken a bit more than it was before.

Cheers
Philippe

> Bummer.  The code
> is on the wiki, for people interested in setting up a "post update"
> code snippet for their own personal use.
>
> For your concrete suggestion, I do not see how it would help.  You
> still have to explicitly post to two services, only now instead of
> posting a simple URL to the package universe -- the same URL you'd
> paste to SqueakMap -- you'd post a SqueakMap version number.  Isn't it
> just as easy to paste the URL into both tools?
>
>
> Anyway, there is a better way to get SqueakMap holding more content:
> have it pull package versions from popular package universes.  At one
> swoop this would make SqueakMap hold strictly more content than
> package universes.  Plus, the presense of a package in particular
> package universes could cause the SqueakMap version to have tags
> added.
>
>
>
> > > > > 1. Packages should have information such as purpose and maintainer.
> > > > >    At the moment there seems to be no such information. Instead it is
> > > > > repeated for every version of the package.
> > >
> > > The maintainer and description can and do change asn time goes on, so
> > > it seems better to relist them for each version.
> >
> > But people tend to not bother copying the description, so it can be
> > hard to find.
>
> That should not be an issue in practice.  Can you point me to a
> package where this happened?
>
> Maybe the UI needs improving, but there is already a "new package
> version" button in the universe editor.  If you use it, the tool will
> automatically copy forward all the fields from the previous release of
> the package.
>
>
>
> > > Most of the time, anyway, you are only interested in the most recent
> > > version of a package.
> >
> > One thing that is annoying about PU is all the old versions.  I wish
> > maintainers would delete the old versions when they put in the new.
>
> Well, whenever you release 3.10, it will get cleaned out in the
> process of releasing the 3.10 stable universe.  :)
>
> I am not sure it is a worthwhile expendature of time for individual
> contributors to delete old versions.  They can do so, if they like,
> however.  The only potential problem is the one mentioned by the
> Viking, that users sometimes *want* to use an old version.  So if it
> is really a problem, I believe it would be more helpful to have a
> weekly cleaner script that removes all but the most recent two
> versions.
>
> Given Damien's new UI, though, it seems like less of an issue
> nowadays.
>
>
> Thanks for the comments everyone,
>
> Lex Spoon
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

linking SM packages from PU

Lex Spoon-3
In reply to this post by Lex Spoon-3
I've added a SqueakMap link to the package model for package
universes.  Using this, you can now add a link to a SqueakMap package
UUID if there is one for your package.  SqueakMap supports more
information about a package than package universes does, so
maintaining a SqueakMap entry is a nice thing to do.

Here is what you need to do to add a SqueakMap UUID to a package
universes package.

Update your universes installation to at least version 36.  Open a
universes editor and do "new package version" on the package you want
to update.  It is not good practice to overwrite a package entry that
has already been published and in use, so add a "-2" or similar to the
end of the version number.  Change it to -3, etc., if you need to do
any other updates before the next up-stream version of the package
comes out.

Next enter a SqueakMap UUID for the package.  Usually you can just
click the "guess" button beside the SqueakMap field.  This will look
for a SqueakMap package with the same name as your package-universes
package.  If that does not work, you could try browsing to the
SqueakMap web page for your package in any browser.  The URL will
include the UUID.  If neither of these works, feel free to email me so
we can try and figure out what the package's UUID is.

That's it -- post the new package and it should work.  Open a universe
browse--without updating!--and you can see and test your new package
entry.  The SqueakMap links appear in the package description field,
right beside the hompage link and maintainer email address.


The tool support for this link, as you will see, is limited right now.
At least, though, there is now a link within the model.  This link is
available to any future tools that want to reason about publicly
shared Squeak packages.


Lex



Reply | Threaded
Open this post in threaded view
|

Re: Package Universes

Lex Spoon-3
In reply to this post by Philippe Marschall
"Philippe Marschall" <[hidden email]> writes:
> 23 Aug 2007 17:39:48 -0400, Lex Spoon <[hidden email]>:
> > I would like there to be an easy way to post to both indexes in
> > addition to others.  That's why I emailed the SqueakSource maintainer
> > with code that posts a release to a package universe, in the same way
> > SqueakSource used to do this to SqueakMap.
>
> Exactly whom did you mail this code? Neither Adrian nor Lukas nor me
> did receive any mails.

March of 2005.  :) There's nothing private in it, so I'll append it,
although really the best place to go is the wiki page that has been
made since then:

  http://wiki.squeak.org/squeak/5899


> > I got no reply, and last I
> > heard the SqueakMap button didn't work any longer.
>
> It doesn't work because HTTPSocket is broken a bit more than it was before.

Right, I didn't mean to point fingers anywhere.  It is simply
unfortunate that nobody has bothered to get this working again.  I
used it all the time when it worked.

I seem to recall some mailing-list discussion on this issue, and what
I recall is that it has something to do with redirects in response to
a POST.  I'm not sure, though.  A little googling over the mailing
list would probably turn it up.


-Lex


X-Mailer: Celeste 2.0..6599
Date: Wed, 9 Mar 2005 21:19:11 -0400
Subject: posting packages to a Universes server
To: [hidden email]
From: "Lex Spoon" <[hidden email]>

Hey, Lukas,

SqueakSource rocks!  One of the niceties about it is that you have added
a button for publishing to SqueakMap.  If you would like to do the same
for Universes, I have appended the code.  Just load YAXO and Universes
from SqueakMap, and the below code should work.

Ideally, the code should not have this hack about "m class ==
UMAddPackage".  Instead, you should ideally add a #applyToSqueakSource:
method to appropriate classes in the UMessage hierarchy, and then use
polymorphism on the resulting classes.  However, this simple hack should
show how to get started.

The basic outline of the code is:

        1. create the package object
        2. create a universes client
        3. send an "add package" message using the client
        4. wait for a response from the server

The client will handle all of the networking for you.


Regards,

Lex Spoon

========
newPackage _ UPackage new.
newPackage name: 'BBBPackage'.
newPackage depends: #('dependency1' 'dependency2').
newPackage description: 'here''s an example package'.
newPackage homepage: 'http://www.squeak.org' asUrl.
newPackage url: 'http://www.squeaksource.com/whatever' asUrl.
newPackage version: (UVersion readFromString: '1.0').
newPackage maintainer: 'Joe Blow <[hidden email]>'.

client _ UUniverseClient forUniverse: UUniverse developmentUniverse.
client sendMessage: (UMAddPackage username: 'USERNAME' password: 'PASSWORD' package: newPackage).

[true] whileTrue: [ client receivedMessagesDo: [ :m | m inspect.  m class == UMPackageAdded ifTrue: [ ^self ] ]. (Delay forSeconds: 1) wait. ].


Reply | Threaded
Open this post in threaded view
|

Re: linking SM packages from PU

Edgar J. De Cleene
In reply to this post by Lex Spoon-3



El 8/31/07 1:44 PM, "Lex Spoon" <[hidden email]> escribió:

> Update your universes installation to at least version 36.


I do for 3.10 this week end.

Any ideas to auto look for new versions of loaded packages and nice to have
into base image ?

Edgar



Reply | Threaded
Open this post in threaded view
|

Re: Package Universes

Philippe Marschall
In reply to this post by Lex Spoon-3
31 Aug 2007 13:02:35 -0400, Lex Spoon <[hidden email]>:

> "Philippe Marschall" <[hidden email]> writes:
> > 23 Aug 2007 17:39:48 -0400, Lex Spoon <[hidden email]>:
> > > I would like there to be an easy way to post to both indexes in
> > > addition to others.  That's why I emailed the SqueakSource maintainer
> > > with code that posts a release to a package universe, in the same way
> > > SqueakSource used to do this to SqueakMap.
> >
> > Exactly whom did you mail this code? Neither Adrian nor Lukas nor me
> > did receive any mails.
>
> March of 2005.  :) There's nothing private in it, so I'll append it,
> although really the best place to go is the wiki page that has been
> made since then:

I can't make any promises but I'll have a look at it.

Cheers
Philippe

>   http://wiki.squeak.org/squeak/5899
>
>
> > > I got no reply, and last I
> > > heard the SqueakMap button didn't work any longer.
> >
> > It doesn't work because HTTPSocket is broken a bit more than it was before.
>
> Right, I didn't mean to point fingers anywhere.  It is simply
> unfortunate that nobody has bothered to get this working again.  I
> used it all the time when it worked.
>
> I seem to recall some mailing-list discussion on this issue, and what
> I recall is that it has something to do with redirects in response to
> a POST.  I'm not sure, though.  A little googling over the mailing
> list would probably turn it up.
>
>
> -Lex
>
>
> X-Mailer: Celeste 2.0..6599
> Date: Wed, 9 Mar 2005 21:19:11 -0400
> Subject: posting packages to a Universes server
> To: [hidden email]
> From: "Lex Spoon" <[hidden email]>
>
> Hey, Lukas,
>
> SqueakSource rocks!  One of the niceties about it is that you have added
> a button for publishing to SqueakMap.  If you would like to do the same
> for Universes, I have appended the code.  Just load YAXO and Universes
> from SqueakMap, and the below code should work.
>
> Ideally, the code should not have this hack about "m class ==
> UMAddPackage".  Instead, you should ideally add a #applyToSqueakSource:
> method to appropriate classes in the UMessage hierarchy, and then use
> polymorphism on the resulting classes.  However, this simple hack should
> show how to get started.
>
> The basic outline of the code is:
>
>         1. create the package object
>         2. create a universes client
>         3. send an "add package" message using the client
>         4. wait for a response from the server
>
> The client will handle all of the networking for you.
>
>
> Regards,
>
> Lex Spoon
>
> ========
> newPackage _ UPackage new.
> newPackage name: 'BBBPackage'.
> newPackage depends: #('dependency1' 'dependency2').
> newPackage description: 'here''s an example package'.
> newPackage homepage: 'http://www.squeak.org' asUrl.
> newPackage url: 'http://www.squeaksource.com/whatever' asUrl.
> newPackage version: (UVersion readFromString: '1.0').
> newPackage maintainer: 'Joe Blow <[hidden email]>'.
>
> client _ UUniverseClient forUniverse: UUniverse developmentUniverse.
> client sendMessage: (UMAddPackage username: 'USERNAME' password: 'PASSWORD' package: newPackage).
>
> [true] whileTrue: [ client receivedMessagesDo: [ :m | m inspect.  m class == UMPackageAdded ifTrue: [ ^self ] ]. (Delay forSeconds: 1) wait. ].
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: linking SM packages from PU

Lex Spoon-3
In reply to this post by Edgar J. De Cleene
"Edgar J. De Cleene" <[hidden email]> writes:
> El 8/31/07 1:44 PM, "Lex Spoon" <[hidden email]> escribió:
> > Update your universes installation to at least version 36.
>
> I do for 3.10 this week end.
>
> Any ideas to auto look for new versions of loaded packages and nice to have
> into base image ?

You can use the package universes tool for this.  Open it, click
"update", and then click "select upgrades".

It's not automated, but it is straightforward.  If you wanted to
automate it, somebody could write a little "update alerter morph" that
sat in a corner of your screen and watched for available Squeak
updates.



-Lex



12