Re: [Spacewalk-devel] 1, y, true, yes, on etc

2011-09-30 Thread Jan Pazdziora
On Mon, Sep 26, 2011 at 09:05:00AM +0200, Jan Pazdziora wrote:
 On Fri, Sep 23, 2011 at 05:32:40PM +0200, Bo Maryniuk wrote:
  
  Besides, I would also argue about /etc/rhn/default/* existence that
  is *meant* to be edited according to FHS[1], while Spacewalk says
  Do not do this. Actually entire rhn is in the wrong place inside the
  /etc directory, because it should be /etc/opt/rhn/... actually. :)
 
 Patches were welcome for quite some time -- we track this as bug 621531.

It's now addressed in Spacewalk master and will be in Spacewalk
nightly repos by EOB today.

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] 1, y, true, yes, on etc

2011-09-12 Thread Miroslav Suchý
On 09/05/2011 04:08 PM, Bo Maryniuk wrote:
 Guys,
 should we support all of the list of valid true's for the config,
 listed in /spacewalk/java/code/src/com/redhat/rhn/common/conf/Config.java,
 or 1 is just enough for the next century?
 
 
 /**
  * List of values that are considered true, ignoring case.
  */
 private static final String[] TRUE_VALUES = {1, y, true,
 yes, on};
 
 This is a bit not synchronized, since *only* Java stack allows such
 odd choices, while the rest of the Spacewalk seems like understands
 only 1 or 0 (Python part, at least).
 
 I would suggest to put it to the common schema, because this is
 very confusing.
 
 So either:
 1. Teach the rest of the Spacewalk to understand all of the above,
 where seems like Esperanto and Swahili are still missing :-)
 
 2. Reduce it to just 1 or 0.
 
 
 What you think? I would go #2 personally...
 
 

Well it is always good to understand more languages. And I know from my
experience that people do not always know whether they should use
true/yes/1 as different projects use different constants.

So when I have time I try to write code which understood all possible
constants. When I'm lazy I just choose one.

Since our configuration files are well documented (hmm not documented,
but has all option and its default values) I will not object agains #2,
but I think #1 is better.

-- 
Miroslav Suchy
Red Hat Satellite Engineering

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] 1, y, true, yes, on etc

2011-09-06 Thread Bo Maryniuk

Anyone?...


--
Bo Maryniuk

SUSE LINUX Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 16746 (AG Nürnberg)



On 09/05/2011 04:08 PM, Bo Maryniuk wrote:

Guys,
should we support all of the list of valid true's for the config,
listed in /spacewalk/java/code/src/com/redhat/rhn/common/conf/Config.java,
or 1 is just enough for the next century?


/**
* List of values that are considered true, ignoring case.
*/
private static final String[] TRUE_VALUES = {1, y, true, yes,
on};

This is a bit not synchronized, since *only* Java stack allows such
odd choices, while the rest of the Spacewalk seems like understands
only 1 or 0 (Python part, at least).

I would suggest to put it to the common schema, because this is
very confusing.

So either:
1. Teach the rest of the Spacewalk to understand all of the above,
where seems like Esperanto and Swahili are still missing :-)

2. Reduce it to just 1 or 0.


What you think? I would go #2 personally...




___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] 1, y, true, yes, on etc

2011-09-05 Thread Bo Maryniuk

Guys,
should we support all of the list of valid true's for the config,
listed in /spacewalk/java/code/src/com/redhat/rhn/common/conf/Config.java,
or 1 is just enough for the next century?


/**
 * List of values that are considered true, ignoring case.
 */
private static final String[] TRUE_VALUES = {1, y, true, 
yes, on};


This is a bit not synchronized, since *only* Java stack allows such
odd choices, while the rest of the Spacewalk seems like understands
only 1 or 0 (Python part, at least).

I would suggest to put it to the common schema, because this is
very confusing.

So either:
1. Teach the rest of the Spacewalk to understand all of the above,
where seems like Esperanto and Swahili are still missing :-)

2. Reduce it to just 1 or 0.


What you think? I would go #2 personally...


--
Bo Maryniuk

SUSE LINUX Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 16746 (AG Nürnberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel