Closed Bug 305466 Opened 19 years ago Closed 19 years ago

register-global doesn't work correctly

Categories

(Toolkit Graveyard :: XULRunner, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: wolfiR, Unassigned)

Details

I have upgraded to a newer snapshot of xulrunner and got the following behaviour
while trying to register the GRE:

Hygiea:~ # xulrunner --register-global
Warning: Configuration file '/etc/gre.d/1.8b4_2005073100.conf' already exists.
No action was performed.
Hygiea:~ # xulrunner --unregister-global
Hygiea:~ # ll /etc/gre.d
insgesamt 11
drwxr-xr-x   2 root root   88 2005-08-20 21:21 .
drwxr-xr-x  89 root root 7448 2005-08-19 09:56 ..
-rw-r--r--   1 root root  113 2005-08-01 11:53 1.8b4_2005073100.conf
Hygiea:~ # xulrunner --register-global
Hygiea:~ # ll /etc/gre.d
insgesamt 15
drwxr-xr-x   2 root root  128 2005-08-22 06:47 .
drwxr-xr-x  89 root root 7448 2005-08-19 09:56 ..
-rw-r--r--   1 root root  113 2005-08-01 11:53 1.8b4_2005073100.conf
-rw-r--r--   1 root root  113 2005-08-22 06:47 1.9a1_2005081900.conf

The first try was unsuccessful while the second after calling unregister-global
was called was successful. This is strange because nothing changed in /etc/gre.d/
When you call -register-global we store a file in the xulrunner directory called
"global.reginfo", which tells us what .conf file we wrote out. It sounds like
you did --register-global <upgrade> --register-global, and the install found the
existing global.reginfo file, and refused to register again.
what I do (within the RPM) for the upgrade case is:

1. call xulrunner --unregister-global from old xulrunner
2. install new xulrunner
3. call xulrunner --register-global

That fails. And after your explanation I know why:
global.reginfo is still there in the path (if it's the same path which is the
case for updating snapshots).
I can workaround this in the RPM scripts but I'm not sure if this is the correct
approach. As xulrunner knows its own version why does it need to read from
global.reginfo for this?
... or delete global.reginfo on unregistering (which isn't done as it seems)
We definitely should be deleting global.reginfo when we --unregister-global...
that's the bug.
yes, it seems it gets deleted. I have to dig deeper into what happens during the
RPM update phase.
sorry for the spam. --unregister-global wasn't called correctly.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.