[yast-devel] Re: [yast-commit] <rest-service> master : fixing packaging ...
Martin Kudlvasr write:
ref: refs/heads/master commit 30333bdb0b24db7bfdc11fa7cecbf2341d8d880e Author: Martin Kudlvasr <mkudlvasr@suse.cz> Date: Thu Oct 8 16:47:53 2009 +0200
fixing packaging ... --- plugins/eulas/app/controllers/eulas_controller.rb | 8 ++- plugins/eulas/app/models/license.rb | 4 +- plugins/eulas/package/eula.yml | 3 - plugins/eulas/package/eulas.yml | 3 + .../eulas/package/yast2-webservice-eula.changes | 5 - plugins/eulas/package/yast2-webservice-eula.spec | 84 -------------------- .../eulas/package/yast2-webservice-eulas.changes | 5 + plugins/eulas/package/yast2-webservice-eulas.spec | 84 ++++++++++++++++++++ 8 files changed, 100 insertions(+), 96 deletions(-)
diff --git a/plugins/eulas/app/models/license.rb b/plugins/eulas/app/models/license.rb index 6024eb8..b5c2dea 100644 --- a/plugins/eulas/app/models/license.rb +++ b/plugins/eulas/app/models/license.rb @@ -13,8 +13,8 @@ class License
attr_accessor :name, :langs_hash, :langs_list, :accepted, :text, :text_lang, :only_show
- RESOURCES_DIR = File.join(File.dirname(__FILE__),"..","..","config","resources") - VAR_DIR = File.join(File.dirname(__FILE__),"..","..","var") + VAR_DIR = File.join(File.dirname(__FILE__),"/var","lib","yastws","eulas") + RESOURCES_DIR = File.join(File.dirname(__FILE__),"/usr","share","yastws","eulas")
^^^ Hi, I think you don't want this path. you join directory of current exucuted file with absolute path. so it should be (no __FILE__) File.join("/usr","share","yastws","eulas")
def dig_lang(line) r = Regexp.new('license(?:\.(\w+))?\.txt')
-- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast modules language and time -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Josef Reidinger <jreidinger@suse.cz> [Oct 09. 2009 08:24]:
File.join(File.dirname(__FILE__),"..","..","config","resources") - VAR_DIR = File.join(File.dirname(__FILE__),"..","..","var") + VAR_DIR = File.join(File.dirname(__FILE__),"/var","lib","yastws","eulas") + RESOURCES_DIR = File.join(File.dirname(__FILE__),"/usr","share","yastws","eulas")
^^^ Hi, I think you don't want this path. you join directory of current exucuted file with absolute path. so it should be (no __FILE__) File.join("/usr","share","yastws","eulas")
And, while we're at it, we must generally refrain from hard-coding fixed pathes into the application. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Klaus Kaempf write:
* Josef Reidinger <jreidinger@suse.cz> [Oct 09. 2009 08:24]:
File.join(File.dirname(__FILE__),"..","..","config","resources") - VAR_DIR = File.join(File.dirname(__FILE__),"..","..","var") + VAR_DIR = File.join(File.dirname(__FILE__),"/var","lib","yastws","eulas") + RESOURCES_DIR = File.join(File.dirname(__FILE__),"/usr","share","yastws","eulas")
^^^ Hi, I think you don't want this path. you join directory of current exucuted file with absolute path. so it should be (no __FILE__) File.join("/usr","share","yastws","eulas")
And, while we're at it, we must generally refrain from hard-coding fixed pathes into the application.
Yes, I agree. It should be in some module where is defined prefix constants. If you want I can look at it and create it.
Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
-- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast modules language and time -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Josef Reidinger <jreidinger@suse.cz> [Oct 09. 2009 09:02]:
Klaus Kaempf write:
And, while we're at it, we must generally refrain from hard-coding fixed pathes into the application.
Yes, I agree. It should be in some module where is defined prefix constants. If you want I can look at it and create it.
bnc#545626 ;-) Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Josef Reidinger
-
Klaus Kaempf