Rt-2-1-78: mess with the site config

Hi,

What is the reason that in rt-2-1-78 the site config is
loaded BEFORE the core config and gets overwritten?
Now all my site settings are lost…

In 2-1-76, lib/RT.pm:

sub LoadConfig {
require $CORE_CONFIG_FILE
|| die (“Couldn’t load RT config file ‘$CORE_CONFIG_FILE’\n$@”);
if ( -f “$SITE_CONFIG_FILE” ) {
require $SITE_CONFIG_FILE
|| die (“Couldn’t load RT config file ‘$SITE_CONFIG_FILE’\n$@”);
}
RT::I18N->Init;
}

In 2-1-78:

sub LoadConfig {
if ( -f “$SITE_CONFIG_FILE” ) {
require $SITE_CONFIG_FILE
|| die (“Couldn’t load RT config file ‘$SITE_CONFIG_FILE’\n$@”);
}
require $CORE_CONFIG_FILE
|| die (“Couldn’t load RT config file ‘$CORE_CONFIG_FILE’\n$@”);
RT::I18N->Init;
}

Stanislav Sinyagin wrote:

What is the reason that in rt-2-1-78 the site config is
loaded BEFORE the core config and gets overwritten?
Now all my site settings are lost…

So that values in RT_Config.pm can inherit values defined in
RT_SiteConfig.pm.

Variables shouldn’t get overwritten, as long as you’ve upgraded
your RT_Config.pm to the 2-1-78 version. If they do, I believe
it’s a bug.
�|� http://www.bestpractical.com/rt – Trouble Ticketing. Free.

Stanislav Sinyagin wrote:

What is the reason that in rt-2-1-78 the site config is
loaded BEFORE the core config and gets overwritten?
Now all my site settings are lost…

So that values in RT_Config.pm can inherit values defined in
RT_SiteConfig.pm.

But RT_Config.pm test for truth not definedness – I just found
out about it the hard way yesterday. That is, when I set some
value to ‘’ explicitly, _Config.pm comes in and overrides it.

Thanks,
/Autrijus/

Stanislav Sinyagin wrote:

What is the reason that in rt-2-1-78 the site config is
loaded BEFORE the core config and gets overwritten?
Now all my site settings are lost…

So that values in RT_Config.pm can inherit values defined in
RT_SiteConfig.pm.

But RT_Config.pm test for truth not definedness – I just found
out about it the hard way yesterday. That is, when I set some
value to ‘’ explicitly, _Config.pm comes in and overrides it.

Point. Pity we don’t have an //= operator in perl5.

Thanks,
/Autrijus/

http://www.bestpractical.com/rt – Trouble Ticketing. Free.

But RT_Config.pm test for truth not definedness – I just found
out about it the hard way yesterday. That is, when I set some
value to ‘’ explicitly, _Config.pm comes in and overrides it.

Point. Pity we don’t have an //= operator in perl5.

local *Set = sub { $[0] = $[1] unless defined $_[0] };

Thanks,
/Autrijus/

Stanislav Sinyagin wrote:

What is the reason that in rt-2-1-78 the site config is
loaded BEFORE the core config and gets overwritten?
Now all my site settings are lost…

So that values in RT_Config.pm can inherit values defined in
RT_SiteConfig.pm.

Variables shouldn’t get overwritten, as long as you’ve upgraded
your RT_Config.pm to the 2-1-78 version. If they do, I believe
it’s a bug.

That’s another bug then: “make upgrade” did not update etc/RC_Config.pm
I upgraded from 2-1-76 to 2-1-78.

Stan

hi fellows,

how can i change/delete/add the default scrip templates for a queue ?

the reason why i’m asking, because i added in the global section
some new templates and unfortunately i can’t see any templates in the
queue section !?

everytime i need to create new template from scratch :frowning:
(also when i create a new auto-reply scrip, i receive 2 emails, one
from the default assigned scrip and one from the queue scrip itself)

thanks,
geri

That’s another bug then: “make upgrade” did not update etc/RC_Config.pm
I upgraded from 2-1-76 to 2-1-78.

I think Jesse omitted adding it to the upgrade target either on purpose
or by accident. (Actually, even an install is careful not to clobber
your config file.)

See attached diff.

Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / a capoeirista
PGP fingerprint: 2D92 980E 45FE 2C28 9DB7 9D88 97E6 839B 2EAC 625B
http://www.tendra.org/ | http://www.in-nomine.org/~asmodai/diary/
Rome was not built in a day…

Makefile.in.diff (387 Bytes)

The lack of such an update dates from before RT_SiteConfig.pm It’ll get
cleaned up for the next release.On Tue, Mar 04, 2003 at 10:19:03PM +0100, Jeroen Ruigrok/asmodai wrote:

-On [20030304 13:32], Stanislav Sinyagin (ssinyagin@yahoo.com) wrote:

That’s another bug then: “make upgrade” did not update etc/RC_Config.pm
I upgraded from 2-1-76 to 2-1-78.

I think Jesse omitted adding it to the upgrade target either on purpose
or by accident. (Actually, even an install is careful not to clobber
your config file.)

See attached diff.


Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / a capoeirista
PGP fingerprint: 2D92 980E 45FE 2C28 9DB7 9D88 97E6 839B 2EAC 625B
http://www.tendra.org/ | http://www.in-nomine.org/~asmodai/diary/
Rome was not built in a day…

— Makefile.in.orig Tue Mar 4 22:16:56 2003
+++ Makefile.in Tue Mar 4 22:17:13 2003
@@ -210,7 +210,7 @@

upgrade: dirs upgrade-noclobber upgrade-instruct

-upgrade-noclobber: libs-install html-install bin-install local-install doc-install fixperms
+upgrade-noclobber: config-install libs-install html-install bin-install local-install doc-install fixperms

{{{ dependencies

http://www.bestpractical.com/rt – Trouble Ticketing. Free.