Cheers,

I'm working on some Ruby ports. One of them (rubygems) is a package
management for ruby libraries and applications (similar to Perl/CPAN or
PHP/Pear).

These libs/apps/gems can be managed as:

# gem install NAME
# gem update NAME
# gem deinstall NAME
# gem list
...

Now when you install some gems a cache file may be created.

In pkg/PLIST for the rubygems-port I have:

@unexec rm %D/lib/ruby/gems/${REV}/source_cache

But this will be executed also if the file is not present and pkg_delete
will carp.

How do I delete this file only if present?

As all the gems installed by the user go to

%D/lib/ruby/gems/${REV}/*

Is it ok to do a 

@unexec rm -r %D/lib/ruby/gems/${REV}

In pkg/PLIST?


Apart from these problems I want to integrate rubygems with the ports tree
like done for pear or p5. This means that I want to be able to install gem
through doing:

# cd /usr/ports/devel/gem-rake && make install clean-depends

Or just add the package. I already have some code for this that wraps around
`gem install` like done for php pear. Is this wanted or should I stop
wasting my time?

Thanks,
Jonathan


--
Jonathan Weiss
http://blog.innerewut.de


Reply via email to