Mailinglist Archive: yast-devel (36 mails)

< Previous Next >
Re: [yast-devel] Yast webservice - sharing .rake files
  • From: Stefan Schubert <schubi@xxxxxxx>
  • Date: Fri, 22 May 2009 11:34:35 +0200
  • Message-id: <4A1671AB.6040109@xxxxxxx>

Ladislav Slezak schrieb:
Hi all,

I started to implement an example WebYast package and I have a yast2-devtools
skeleton for REST API package ready.

But I found that many things are duplicated in all REST plugins. E.g. each
contains the same copied targets (e.g. 'package'). The common targets should be
shared instead of copying. If there is a bug or we want to add a new feature we
to fix a lot of packages...
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 ?

The other concern which I have is that we should take care that our product is
quite intuitive (especially for the programmer).
So we will have to find the balance between module/plugin dependencies and
and readability/understandability of the code.
I know that is quite subjective :-)

My personal aim is to give the programmer a mainframe with which we can say:
"Just begin !" without reading much documentation or having a deep insight
about the module dependencies.


Here is my proposal:

- Add include.rake file into rakelib[*] subdirectory in each plugin, see
the attachment. (It includes the files from the current directory if it's
inside the git repository otherwise it includes system files from

- Define the shared tasks in rest-service/webservice/lib/tasks/webservice
subdirectory. The tasks should use webservice: namespace prefix so it's
obvious that they are defined in the webservice not in the plugin or somewhere
else. (See syntax_check.rake example)

After that 'rake -T' in a plugin subdirectory will display the syntax check
from the shared directory, no need to copy&paste the code.

What do you think about it? Any comments? I'm not a Rakefile expert...

[*] I found that tasks defined in 'tasks' subdirectory in plugins are not found
rake, they must be in 'rakelib' subdirectory instead. We have to call 'git mv
rakelib' for all plugins and fix the .spec files...


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

Stefan Schubert
SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany
e-mail: schubi@xxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >