In article 20021212051843.GA5879@rysa.inetz.com,
It does and it doesn’t. It requires either zlib or gnu tar. As the
windows distribution comes with zlib, and most modern unixy platforms
will have gnu tar it covers most people.
I think my vote is to standardize on tar.gz. Any other opinions?
Raa-install is in kind of in a funny place that needs defining, don’t
you think? I mean its mission is to use the existing RAA resources to
perform an installation. By that definition, raa-install is at the
mercy of the data. To fully achieve its task, it needs to workaround
every idiosyncracy of the data. Fixing bad URLs, searching FTP
directories.
Quite true, I find that I can’t use raa-install with many sourceforge
hosted packages as there is no direct link to the package.
If an author checks in a RAR file, then
Raa-install must look at supporting RAR?
what’s RAR?
I’d truly like to see authors use the fields in RAA to contain data
which is useful to a program such as Raa-install. The notes section can
be used for excess data. If we can decide to place direct links to a
tar.gz in the download field, then links to other compressed formats can
be contained in the notes field. Personally, tarballs are the natural
choice simply because they’re in the majority and raa-install already
supports gzip and tar.
true…
So if we can take some steps as a community to provide RAA with more
specific and useful data, then a bit of software like Raa-install won’t
be some incredible wizardry. I’m saying we standardize on [1] a
compression format, [2] our install.rb/setup.rb process, [3] a technique
for identifying package dependancies. Once decided, this information
must become pervasive, such that popular Ruby site have the information
readily accessible.
Anyways, I’m way off-topic now, but still sort of on… My vote is
[1] tar.gz, [2] Minero Aoki’s install.rb/setup.rb, [3] integration of
install.rb and RAAInstall to provide installation of dependancies.
I would tend to agree… In addition to what you’ve said, I think we
should also have some sort of tool that makes it easy for package creators
to create these package files - something like the tool that Andy Hunt
showed at RubyConf.
As for #2 above (install.rb/setup.rb) it seems a bit awkward since this
isn’t built-in to Ruby. I guess what I mean is that I have to keep
setup.rb and install.rb somewhere (and remember where and copy them
over to my package everytime I make a new one. Maybe that could be done
automatically by the packaging tool. Or perhaps we could have an Install
module in Ruby that is used to easily build our install.rb scripts.
Something along the lines of how we create extentions:
-
create an inst_conf.rb:
require ‘mkinst’ #Or perhaps: include Install if it’s built-in module
#hash of dependencies and versions:
depends_on = {‘rexml’ => 0.5.0, ‘jabber4r’ => 0.1.0, ‘ruby_foo’ =>‘*’ }
#NOTE: perhaps this depends_on hash could be built automatically…
create_install_script(packageName, depends_on, …other useful stuff…)
-
run inst_conf.rb:
It creates the install.rb file for you and makes sure you have the
correct directory structure. It also would build a dependency list and it
would be up to the install.rb script to handle fetching dependencies via
raa-install. Running inst_conf.rb could even create the .tar.gz file for
the package (could be useful for Windows folks who don’t have tar).
A few more ideas: Now that Nahi has enforced a canonical naming scheme on
the RAA (Why, that’s why I was asking you about this earlier) it would
seem to be fairly easy to create something that redefines the
Kernel#require method so that it catches the ‘LoadError’ exception (I
think that’s what the exception is called when it can’t find the file to
be required) and tries to use raa-install to download and install the
package. Or perhaps an raa-exec script could be added to the raa-install
tool suite that does something like:
#raa-exec
alias old_require require
def require(file)
old_require file
rescue LoadError
puts “go fish!”
#try to load the required package with raa-install here#
end
load ARGV[0]
···
why the lucky stiff ruby-talk@whytheluckystiff.net wrote:
Tom Clarke (tom@u2i.com) wrote:
If you weren’t sure you had all the dependencies for a particular package
then you could run:
$raa-exec some.rb
Would this be a way of ‘automatically’ dealing with dependencies?
Maybe this won’t work by itself since a particular package might have
several Ruby files that might get required, so there would have to be some
kind of mapping available somewhere that specifies which .rb files are
available in each package… on second thought maybe it’s easier just to
have a dependency list for each package and have he package installer get
the dependent packages…
Phil
“Or perhaps the truth is less interesting than the facts?”
Amy Weiss (accusing theregister.co.uk of engaging in ‘tabloid journalism’)
Senior VP, Communications
Recording Industry Association of America