Mailinglist Archive: yast-devel (36 mails)

< Previous Next >
Re: [yast-devel] Yast webservice - sharing .rake files
  • From: Ladislav Slezak <lslezak@xxxxxxx>
  • Date: Fri, 22 May 2009 12:27:24 +0200
  • Message-id: <4A167E0C.6080801@xxxxxxx>
Stefan Schubert wrote:
I think it is an good idea. But before we are splitting the rakefiles we
should
check if there is an "overloading mechanism" available. E.G. "rake package".
Is it
possible to overload the "rake package" call defined in webservice by a "rake
package" call defined in the plugin ?

Well, by default rake joins the same tasks together, if

desc "FOO"
task :foo do
puts "FOO"
end

is defined twice

'rake -T' prints:
rake foo # FOO / FOO

and 'rake foo' prints:
FOO
FOO

'rake package' should not behave this way.

It's possible to redefine a task, but it's not simple,
see e.g. http://blog.jayfields.com/2008/02/rake-task-overwriting.html
or http://snippets.dzone.com/posts/show/2032

But IMO this should not be a problem, majority of modules should use the
predefined
targets, redefining should be very rare.

--

Best Regards

Ladislav Slez√°k
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups