FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 06-18-2011, 06:16 AM
Hans de Graaff
 
Default gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild

Stanislav asked me to review. I'm also including the list since other
people may also be interested how to handle ruby ebuilds.

On Wed, 2011-06-15 at 22:04 +0000, Stanislav Ochotnicky (sochotnicky)
wrote:
> sochotnicky 11/06/15 22:04:56
>
> Added: metadata.xml ChangeLog fromcvs-0_pre132.ebuild
> Log:
> New ebuild for fromcvs added to the tree. Fixes #173341
>

> EAPI=2
>
> USE_RUBY="ruby18 ree18"
>
> #mercurial after ruby!
> inherit ruby-ng mercurial
>
> MY_PV="${PV#0_pre}"
>
> DESCRIPTION="fromcvs converts cvs to git and hg"
> HOMEPAGE="http://ww2.fs.ei.tum.de/~corecode/hg/fromcvs"
> SRC_URI=""
> EHG_REPO_URI="http://ww2.fs.ei.tum.de/~corecode/hg/fromcvs"
> EHG_REVISION="${MY_PV}"
>
> LICENSE="BSD-4"
> SLOT="0"
> KEYWORDS="~amd64"
> IUSE="test"
>
> RUBY_S="${PN}-${PV}"

RUBY_S is only supported in EAPI=4. You are getting away with this
because you are using a custom unpack method.

> RDEPEND="dev-ruby/rcsparse >=dev-ruby/rbtree-0.3.0-r2 dev-vcs/git"

The ruby-ng eclasses frob RDEPEND, so you should always add to it, e.g.

RDEPEND="${RDEPEND} dev-vcs/git"

Also, all ruby dependencies should be handled via ruby_add_rdepend to
ensure that your list in USE_RUBY is properly passed down to the
dependencies:

ruby_add_rdepend "dev-ruby/rcsparse >=dev-ruby/rb-tree-0.3.0-r2"

> # this is a workaround because combination of ruby-ng and mercurial is
> # not working correctly for unpacking
> src_prepare() {
> for rubyv in ${USE_RUBY};do

Missing "all" target.

> mkdir "${WORKDIR}/${rubyv}"

|| die

> cp -prl "${S}" "${WORKDIR}/${rubyv}/${RUBY_S}"

|| die

> done
> }
>
> each_ruby_install() {
> siteruby=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
> insinto ${siteruby}

insinto ruby_rbconfig("sitedir")

> doins *.rb || die "Installation of rb files failes"

Typo.

>
> make_script togit
> make_script tohg
> }
>
> make_script() {
> echo "ruby /usr/$(get_libdir)/ruby/site_ruby/$1.rb $@" > $1

I'm not sure how this should work? Perhaps you mean something like:

echo "#!/usr/bin/ruby ..."

> dobin $1

|| die, (or use EAPI=4)
 
Old 06-18-2011, 10:34 AM
Stanislav Ochotnicky
 
Default gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild

Excerpts from Hans de Graaff's message of Sat Jun 18 08:16:25 +0200 2011:
> Stanislav asked me to review. I'm also including the list since other
> people may also be interested how to handle ruby ebuilds.
>
> On Wed, 2011-06-15 at 22:04 +0000, Stanislav Ochotnicky (sochotnicky)
> wrote:
> > sochotnicky 11/06/15 22:04:56
> >
> > Added: metadata.xml ChangeLog fromcvs-0_pre132.ebuild
> > Log:
> > New ebuild for fromcvs added to the tree. Fixes #173341
> >
>
> > EAPI=2
> >
> > USE_RUBY="ruby18 ree18"
> >
> > #mercurial after ruby!
> > inherit ruby-ng mercurial
> >
> > MY_PV="${PV#0_pre}"
> >
> > DESCRIPTION="fromcvs converts cvs to git and hg"
> > HOMEPAGE="http://ww2.fs.ei.tum.de/~corecode/hg/fromcvs"
> > SRC_URI=""
> > EHG_REPO_URI="http://ww2.fs.ei.tum.de/~corecode/hg/fromcvs"
> > EHG_REVISION="${MY_PV}"
> >
> > LICENSE="BSD-4"
> > SLOT="0"
> > KEYWORDS="~amd64"
> > IUSE="test"
> >
> > RUBY_S="${PN}-${PV}"
>
> RUBY_S is only supported in EAPI=4. You are getting away with this
> because you are using a custom unpack method.
>

Good to know. Moved to EAPI4, with it few "|| die" things went away.

> > RDEPEND="dev-ruby/rcsparse >=dev-ruby/rbtree-0.3.0-r2 dev-vcs/git"
>
> The ruby-ng eclasses frob RDEPEND, so you should always add to it, e.g.
>
> RDEPEND="${RDEPEND} dev-vcs/git"
>
> Also, all ruby dependencies should be handled via ruby_add_rdepend to
> ensure that your list in USE_RUBY is properly passed down to the
> dependencies:
>
> ruby_add_rdepend "dev-ruby/rcsparse >=dev-ruby/rb-tree-0.3.0-r2"

Fixed

> > # this is a workaround because combination of ruby-ng and mercurial is
> > # not working correctly for unpacking
> > src_prepare() {
> > for rubyv in ${USE_RUBY};do
>
> Missing "all" target.
>

Fixed.

> > mkdir "${WORKDIR}/${rubyv}"
>
> || die
>
> > cp -prl "${S}" "${WORKDIR}/${rubyv}/${RUBY_S}"
>
> || die
>

Fixed on second iteration :-)

> > done
> > }
> >
> > each_ruby_install() {
> > siteruby=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
> > insinto ${siteruby}
>
> insinto ruby_rbconfig("sitedir")
This didn't really work so I used
insinto $(ruby_rbconfig_value 'sitedir')

> > doins *.rb || die "Installation of rb files failes"
>
> Typo.

Fixed

>
> >
> > make_script togit
> > make_script tohg
> > }
> >
> > make_script() {
> > echo "ruby /usr/$(get_libdir)/ruby/site_ruby/$1.rb $@" > $1
>
> I'm not sure how this should work? Perhaps you mean something like:
>
> echo "#!/usr/bin/ruby ..."
>

In the end I fixed up upstream scripts because they had no shebangs and
isntalled them directly without any wrappers. They still use
/usr/bin/ruby where it would be nicer to have specific script for each
ruby version.

> > dobin $1
>
> || die, (or use EAPI=4)

EAPI4 it is

--
Stanislav Ochotnicky

PGP: 7B087241
jabber: stanislav@ochotnicky.com
 
Old 06-18-2011, 11:14 AM
Petteri Ršty
 
Default gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild

On 18.06.2011 09:16, Hans de Graaff wrote:
>
>> RDEPEND="dev-ruby/rcsparse >=dev-ruby/rbtree-0.3.0-r2 dev-vcs/git"
>
> The ruby-ng eclasses frob RDEPEND, so you should always add to it, e.g.
>
> RDEPEND="${RDEPEND} dev-vcs/git"
>

This stacking is automatically handled by the package manager.

Regards,
Petteri
 
Old 06-19-2011, 08:06 AM
Hans de Graaff
 
Default gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild

On Sat, 2011-06-18 at 14:14 +0300, Petteri Ršty wrote:
> On 18.06.2011 09:16, Hans de Graaff wrote:
> >
> >> RDEPEND="dev-ruby/rcsparse >=dev-ruby/rbtree-0.3.0-r2 dev-vcs/git"
> >
> > The ruby-ng eclasses frob RDEPEND, so you should always add to it, e.g.
> >
> > RDEPEND="${RDEPEND} dev-vcs/git"
> >
>
> This stacking is automatically handled by the package manager.

We also add dependencies to RDEPEND in the eclass and I seem to remember
from previous bug hunting that just setting RDEPEND and/or DEPEND caused
problems with these dependencies disappearing. It's been too long ago so
I don't have details, but if that is considered a bug then I can
probably try to track that down again.

Kind regards,

Hans
 
Old 06-19-2011, 08:57 AM
Petteri Ršty
 
Default gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild

On 19.06.2011 11:06, Hans de Graaff wrote:
> On Sat, 2011-06-18 at 14:14 +0300, Petteri Ršty wrote:
>> On 18.06.2011 09:16, Hans de Graaff wrote:
>>>
>>>> RDEPEND="dev-ruby/rcsparse >=dev-ruby/rbtree-0.3.0-r2 dev-vcs/git"
>>>
>>> The ruby-ng eclasses frob RDEPEND, so you should always add to it, e.g.
>>>
>>> RDEPEND="${RDEPEND} dev-vcs/git"
>>>
>>
>> This stacking is automatically handled by the package manager.
>
> We also add dependencies to RDEPEND in the eclass and I seem to remember
> from previous bug hunting that just setting RDEPEND and/or DEPEND caused
> problems with these dependencies disappearing. It's been too long ago so
> I don't have details, but if that is considered a bug then I can
> probably try to track that down again.
>
> Kind regards,
>
> Hans

Yes it would be a bug. The rules are here:
http://dev.gentoo.org/~ulm/pms/head/pms.html#x1-11600011.2

Regards,
Petteri
 
Old 06-19-2011, 01:38 PM
Diego Elio Pettenò
 
Default gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild

Il giorno sab, 18/06/2011 alle 14.14 +0300, Petteri Räty ha scritto:
>
> This stacking is automatically handled by the package manager.

No it isn't because the calls to ruby_add_bdepend/ruby_add_rdepend work
on the EBUILD values not the ECLASS ones.
--
Diego Elio Petten√≤ ‚ÄĒ Flameeyes
http://blog.flameeyes.eu/
 

Thread Tools




All times are GMT. The time now is 11:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org