[haiku-development] Re: Friendlier Optional Package installation

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 8 Jun 2011 18:10:03 -0400

On Wed, Jun 8, 2011 at 5:18 PM,  <pete.goodeve@xxxxxxxxxxxx> wrote:
>
> This is all done by having a "micro-web-server" that uses the contents
> of /boot/common/data/optional-packages to build a page for WebPositive.
> The Desktop icon actually links to a short shell-script that launches
> the server and invokes W+ on it.  When W+ exits, it shuts down the
> server again.

That sounds pretty cool, and I think a similar approach could be used
for package management in the future. Let's face it, creating a web UI
is quite a bit easier than making one in C++, and for package
management it makes a lot of sense since many third party packages
will probably be on the web anyhow.

> A possible large obstacle to the scheme as-is is that the server is
> written in Ruby.  This was for a couple of reasons.  First, the slight
> ulterior motive that I'd like Ruby to be available by default (:-)).
> I think it's become a favourite of many people, and it could be a
> major attraction to see it on the basic system.

While I am probably known to be a Ruby guy and would normally applaud
this, I do think that for now given our space constraint concerns for
the alpha3 release we probably want to avoid adding anything else to
the default image.

Also I think once we have packages the idea of "default image" will
become much less important, as likely most of the somewhat popular
packages will be included with the install CD, or at least very easy
to install from the internet using the future package management tool
(which may be similar to this, as I said.)

> Secondly, it's the
> only medium that I find convenient for a quickie like this.  I can
> see no reason that it couldn't also be written in Python (which I
> understand needs to be there) but it's been awhile since I've done Python,
> and have no convenient crib sheet for a simple web server.

I imagine it wouldn't be too much harder to do this in Python, even
for us Ruby guys ;)

> It's definitely just a pilot in a number of ways.  One annoyance is
> that once the user clicks Install, there is a long painful period of
> silence while installoptionalpackage does its work.  Unfortunately
> -- unlike both NetPositive and Bezilla -- WebPositive won't display
> lines of text as they arrive; it wants to build the whole page first.

Hmmm, I suspect this is due to our use of the WebKit Curl HTTP
back-end, which has its share of problems. I hope to rectify these
problems by switching HTTP backends within the next few months after
updating our WebKit port.

> A bit of Ajaxing will almost certainly fix this, but I don't want to
> spend too much time before I know if it will be useful.

I think that would definitely be the way to go if we get a consensus
on using this tool.

> I'm afraid there's no README in the zip.  Just unpack it from /boot .
> It goes in /boot/apps at the moment.  Not sure that would be a final home.
> (I was slightly shocked that the 5K of total text expands to over 100K
> of file space!  A single large info file would presumably reduce that
> a lot, but would be a little less convenient.)

If the whole system is just 100K, that isn't so bad. Though obviously
needing Ruby adds whatever space that requires to the size needed for
this system.

> Let me know what you think.

I'll try it out when I get a chance, maybe tonight.

-- 
Regards,
Ryan

Other related posts: