Loading Monticello Packages Programmatically

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

Loading Monticello Packages Programmatically

Jon Hylands

Hi,

So, in my latest robot Roz:

http://www.huv.com/blog/2009/12/roz-walking-fast-and-smooth.html

I'm going to be replacing the current embedded board with a gumstix
Overo, running Squeak. I do development on a laptop, and then push the
code changes to the Overo.

The Overo will have wifi, and thus be on my local network. I want to
push code to it by sending a command (over a socket) to a running
headless image, and have it load a specific version of code from
Monticello from a network drive, into the live running image.

Is MczInstaller the proper way to do that?

I can see running something like this on the Overo:

MczInstaller
  installFileNamed: '/mnt/dns323/monticello/package-name.XXX.mcz'

to do it. Is there a better (or more appropriate) way to do this?

Thanks,
Jon


Reply | Threaded
Open this post in threaded view
|

Re: Loading Monticello Packages Programmatically

Colin Putney

On 2009-12-13, at 8:55 AM, Jon Hylands wrote:

> The Overo will have wifi, and thus be on my local network. I want to
> push code to it by sending a command (over a socket) to a running
> headless image, and have it load a specific version of code from
> Monticello from a network drive, into the live running image.
>
> Is MczInstaller the proper way to do that?

MczInstaller is meant to load the chunk-format code inside an mcz archive without using the normal Monticello machinery. This is useful for bootstrapping Monticello its self or for loading code inside an mcz archive without having to dig around inside the zip manually.

It sounds like you want to update existing code and not just load a package from scratch, right? If so, it would better to use Monticello rather than just MczInstaller. In that case, you'd do:

MCVersionReader loadVersionFile: '/mnt/dns323/monticello/package-name.XXX.mcz'

Colin
Reply | Threaded
Open this post in threaded view
|

Re: Loading Monticello Packages Programmatically

Edgar J. De Cleene
In reply to this post by Jon Hylands



On 12/13/09 2:55 PM, "Jon Hylands" <[hidden email]> wrote:

>
> Hi,
>
> So, in my latest robot Roz:
>
> http://www.huv.com/blog/2009/12/roz-walking-fast-and-smooth.html
>
> I'm going to be replacing the current embedded board with a gumstix
> Overo, running Squeak. I do development on a laptop, and then push the
> code changes to the Overo.
>
> The Overo will have wifi, and thus be on my local network. I want to
> push code to it by sending a command (over a socket) to a running
> headless image, and have it load a specific version of code from
> Monticello from a network drive, into the live running image.
>
> Is MczInstaller the proper way to do that?
>
> I can see running something like this on the Overo:
>
> MczInstaller
>   installFileNamed: '/mnt/dns323/monticello/package-name.XXX.mcz'
>
> to do it. Is there a better (or more appropriate) way to do this?
>
> Thanks,
> Jon


You should download
http://ftp.squeak.org/various_images/SqueakLight/MinimalMorphic.7246.zip as
the image have the logic for deal with monticello, .sar and more.
See examples of this in http://wiki.squeak.org/squeak/6056
Now MinimalMorphic have the same logic and is 7.3 mb
It's full 3.10 compatible and with help of all I hope in the future become
3.11 compatible.

Edgar




Reply | Threaded
Open this post in threaded view
|

Re: Loading Monticello Packages Programmatically

Jon Hylands
In reply to this post by Colin Putney
On Sun, 13 Dec 2009 09:16:54 -0800, Colin Putney <[hidden email]>
wrote:

>MczInstaller is meant to load the chunk-format code inside an mcz archive without using the normal Monticello machinery. This is useful for bootstrapping Monticello its self or for loading code inside an mcz archive without having to dig around inside the zip manually.
>
>It sounds like you want to update existing code and not just load a package from scratch, right? If so, it would better to use Monticello rather than just MczInstaller. In that case, you'd do:
>
>MCVersionReader loadVersionFile: '/mnt/dns323/monticello/package-name.XXX.mcz'

Perfect - thanks...

So I need to have full Monticello loaded into my headless image,
right?

(Which is no trouble - the machine has 256 MB of RAM and 256 MB of
FLASH, and I'm booting off a 2 GB uSD card)

Later,
Jon


Reply | Threaded
Open this post in threaded view
|

Re: Loading Monticello Packages Programmatically

Jon Hylands
In reply to this post by Colin Putney
On Sun, 13 Dec 2009 09:16:54 -0800, Colin Putney <[hidden email]>
wrote:

>MCVersionReader loadVersionFile: '/mnt/dns323/monticello/package-name.XXX.mcz'

Sorry, one other question.

After looking into it, it appears that it is difficult to enable NFS
on my net drive. They do however, provide an FTP server, and I know
Monticello can read from FTP-based repositories.

Programatically, what is the simplest way to do that?

Thanks,
Jon


Reply | Threaded
Open this post in threaded view
|

Re: Loading Monticello Packages Programmatically

Igor Stasenko
2009/12/13 Jon Hylands <[hidden email]>:

> On Sun, 13 Dec 2009 09:16:54 -0800, Colin Putney <[hidden email]>
> wrote:
>
>>MCVersionReader loadVersionFile: '/mnt/dns323/monticello/package-name.XXX.mcz'
>
> Sorry, one other question.
>
> After looking into it, it appears that it is difficult to enable NFS
> on my net drive. They do however, provide an FTP server, and I know
> Monticello can read from FTP-based repositories.
>
> Programatically, what is the simplest way to do that?
>

Try something like this:

MczInstaller installStream: (ReadStream on: ('ftp://google.com' asUrl
retrieveContents))

> Thanks,
> Jon
>
>
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: Loading Monticello Packages Programmatically

Colin Putney
In reply to this post by Jon Hylands

On 2009-12-13, at 10:29 AM, Jon Hylands wrote:

> On Sun, 13 Dec 2009 09:16:54 -0800, Colin Putney <[hidden email]>
> wrote:
>
>> MCVersionReader loadVersionFile: '/mnt/dns323/monticello/package-name.XXX.mcz'
>
> Sorry, one other question.
>
> After looking into it, it appears that it is difficult to enable NFS
> on my net drive. They do however, provide an FTP server, and I know
> Monticello can read from FTP-based repositories.
>
> Programatically, what is the simplest way to do that?

Yes, you'll need the Monticello loaded. It would be nice to have a no-UI programmatic core-library version of MC, but there's no such beast right now.

To load from an FTP server, you'll want something like this:

| repository |
repository := MCFtpRepository
        host: 'dns323.local'
        directory: 'monticello'
        user: 'roz'
        password: 'roz'.

(repository versionFromFileNamed: 'package-name.XXX.mcz') load.

Colin
Reply | Threaded
Open this post in threaded view
|

Re: Loading Monticello Packages Programmatically

Jon Hylands
On Sun, 13 Dec 2009 11:21:47 -0800, Colin Putney <[hidden email]>
wrote:

>Yes, you'll need the Monticello loaded. It would be nice to have a no-UI programmatic core-library version of MC, but there's no such beast right now.
>
>To load from an FTP server, you'll want something like this:
>
>| repository |
>repository := MCFtpRepository
> host: 'dns323.local'
> directory: 'monticello'
> user: 'roz'
> password: 'roz'.
>
>(repository versionFromFileNamed: 'package-name.XXX.mcz') load.

That's great - exactly what I needed.

Thanks!

Later,
Jon