
Duncan Mac-Vicar Prett wrote:
no but you can define a new task than uses Rake:: something to run another task, or aliasing it somehow?
def alias_task(new_name, old_name) Rake::Task::TASKS[new_name.to_s] = Rake::Task::TASKS.delete(old_name.to_s) end
I wish it was so easy... The task name is stored in Rake::Task class and there is Rake::TaskManager module which has 'task_name' -> Rake::Task mapping Hash. The module is mixed in Rake::Application class which is used in Rake::Task class... It took me quite long time to figure it out. Moreover the tasks are specified as Symbols (like :package), but the internal hash stores them as Strings. I missed a single ".to_s" and it behaved very strangely, like 'rake -T' displayed all tasks including package task, but calling 'rake package' failed with "Don't know how to build task 'package'" error message... Very nice task for debugging rake.rb... Anyway, I managed to rename 'package' task to 'package-local' task. If you ever had to rename a rake task then look at webservice-tasks/lib/tasks/rake_rename_task.rb and package-local.rake files. Now we finally have 'package' and 'package-local' tasks which work as expected! -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz 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@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org