This sets the initial UTC setting when anaconda.timezone is initialized instead of every time the timezone UI is entered. --- anaconda | 9 ++++++++- iw/timezone_gui.py | 4 ---- 2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/anaconda b/anaconda index 0f54d65..d16abd8 100755 --- a/anaconda +++ b/anaconda @@ -588,8 +588,15 @@ class Anaconda(object): def timezone(self): if not self._timezone: import timezone + from bootloader import hasWindows + self._timezone = timezone.Timezone() - self._timezone.setTimezoneInfo(self.instLanguage.getDefaultTimeZone(self.rootPath)) + tz = self.instLanguage.getDefaultTimeZone(self.rootPath) + if not self.ksdata: + utc = not hasWindows(anaconda.bootloader) + else: + utc = 0 + self._timezone.setTimezoneInfo(tz, utc)
return self._timezone
diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py index c5ecd88..1a821b7 100644 --- a/iw/timezone_gui.py +++ b/iw/timezone_gui.py @@ -30,7 +30,6 @@ import sys from timezone_map_gui import TimezoneMap, Enum from iw_gui import * from booty.bootloaderInfo import dosFilesystems -from bootloader import hasWindows
from constants import * import gettext @@ -104,9 +103,6 @@ class TimezoneWindow(InstallWindow): self.tz.setCurrent(self.zonetab.findEntryByTZ(self.default)) self.utcCheckbox.set_active(asUTC)
- if not anaconda.ksdata: - self.utcCheckbox.set_active(not hasWindows(anaconda.bootloader)) - self.notebook.remove(self.vbox) return self.vbox
Ack.
On 05/22/2010 01:11 AM, Brian C. Lane wrote:
This sets the initial UTC setting when anaconda.timezone is initialized instead of every time the timezone UI is entered.
anaconda | 9 ++++++++- iw/timezone_gui.py | 4 ---- 2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/anaconda b/anaconda index 0f54d65..d16abd8 100755 --- a/anaconda +++ b/anaconda @@ -588,8 +588,15 @@ class Anaconda(object): def timezone(self): if not self._timezone: import timezone
from bootloader import hasWindowsself._timezone = timezone.Timezone()
self._timezone.setTimezoneInfo(self.instLanguage.getDefaultTimeZone(self.rootPath))
tz = self.instLanguage.getDefaultTimeZone(self.rootPath)if not self.ksdata:utc = not hasWindows(anaconda.bootloader)else:utc = 0self._timezone.setTimezoneInfo(tz, utc) return self._timezonediff --git a/iw/timezone_gui.py b/iw/timezone_gui.py index c5ecd88..1a821b7 100644 --- a/iw/timezone_gui.py +++ b/iw/timezone_gui.py @@ -30,7 +30,6 @@ import sys from timezone_map_gui import TimezoneMap, Enum from iw_gui import * from booty.bootloaderInfo import dosFilesystems -from bootloader import hasWindows
from constants import * import gettext @@ -104,9 +103,6 @@ class TimezoneWindow(InstallWindow): self.tz.setCurrent(self.zonetab.findEntryByTZ(self.default)) self.utcCheckbox.set_active(asUTC)
if not anaconda.ksdata:self.utcCheckbox.set_active(not hasWindows(anaconda.bootloader))self.notebook.remove(self.vbox) return self.vbox
It's too late to put anything new on f13-branch.
- Chris
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 05/24/2010 06:51 AM, Chris Lumens wrote:
It's too late to put anything new on f13-branch.
Right, I was only going to push to master, but included f13 since that's what it was reported against. But since master has changes so much I need to rework and retest so I'll submit again later.
- -- Brian C. Lane bcl@redhat.com Red Hat / Port Orchard, WA
On 05/22/2010 01:11 AM, Brian C. Lane wrote:
This sets the initial UTC setting when anaconda.timezone is initialized instead of every time the timezone UI is entered.
anaconda | 9 ++++++++- iw/timezone_gui.py | 4 ---- 2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/anaconda b/anaconda index 0f54d65..d16abd8 100755 --- a/anaconda +++ b/anaconda @@ -588,8 +588,15 @@ class Anaconda(object): def timezone(self): if not self._timezone: import timezone
from bootloader import hasWindowsself._timezone = timezone.Timezone()
self._timezone.setTimezoneInfo(self.instLanguage.getDefaultTimeZone(self.rootPath))
tz = self.instLanguage.getDefaultTimeZone(self.rootPath)if not self.ksdata:utc = not hasWindows(anaconda.bootloader)else:utc = 0self._timezone.setTimezoneInfo(tz, utc) return self._timezonediff --git a/iw/timezone_gui.py b/iw/timezone_gui.py index c5ecd88..1a821b7 100644 --- a/iw/timezone_gui.py +++ b/iw/timezone_gui.py @@ -30,7 +30,6 @@ import sys from timezone_map_gui import TimezoneMap, Enum from iw_gui import * from booty.bootloaderInfo import dosFilesystems -from bootloader import hasWindows
from constants import * import gettext @@ -104,9 +103,6 @@ class TimezoneWindow(InstallWindow): self.tz.setCurrent(self.zonetab.findEntryByTZ(self.default)) self.utcCheckbox.set_active(asUTC)
if not anaconda.ksdata:self.utcCheckbox.set_active(not hasWindows(anaconda.bootloader))self.notebook.remove(self.vbox) return self.vbox
Hi Brian,
you'll need to revert this patch and come up with another fix. The problem is that on rawhide the timezone property is referenced as early as anaconda:855, that is before the storage.storageInitialized() function was called (it is normally called as a dispatch step see dispatch.py). The hasWindows() method in bootloader.py that the property calls depends on the anconda.storage object to be initialized already so it can inspect the existing partitions in the system.
Hans and me thought it would be reasonable to do this instead: <hansg> timezone_gui.py needs to keep track if its called the first time or not and depepending on that re-use the old value or call hasWindows()
Contrary to what I originally thought, your patch doesn't cause the traceback in 592860. But that's a similar initialization order issue, I'll post a patch for that soon.
Thanks. Ales
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 06/11/2010 03:36 AM, Ales Kozumplik wrote:
Hi Brian,
you'll need to revert this patch and come up with another fix. The problem is that on rawhide the timezone property is referenced as early as anaconda:855, that is before the storage.storageInitialized() function was called (it is normally called as a dispatch step see dispatch.py). The hasWindows() method in bootloader.py that the property calls depends on the anconda.storage object to be initialized already so it can inspect the existing partitions in the system.
Thanks. I made the patch on f13 and cherry-picked over to rawhide since I wasn't able to get a boot.iso to run. I'll try again today.
Hans and me thought it would be reasonable to do this instead: <hansg> timezone_gui.py needs to keep track if its called the first time or not and depepending on that re-use the old value or call hasWindows()
I'm not sure I understand the suggestion, since that would still call hasWindows at the wrong point, and it is already checking to see if the object has been initialized.
Contrary to what I originally thought, your patch doesn't cause the traceback in 592860. But that's a similar initialization order issue, I'll post a patch for that soon.
Whew! ;)
I'll get a rawhide boot.iso working and then re-visit this.
- -- Brian C. Lane bcl@redhat.com Red Hat / Port Orchard, WA
Hi,
On 06/11/2010 05:46 PM, Brian C. Lane wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 06/11/2010 03:36 AM, Ales Kozumplik wrote:
Hi Brian,
you'll need to revert this patch and come up with another fix. The problem is that on rawhide the timezone property is referenced as early as anaconda:855, that is before the storage.storageInitialized() function was called (it is normally called as a dispatch step see dispatch.py). The hasWindows() method in bootloader.py that the property calls depends on the anconda.storage object to be initialized already so it can inspect the existing partitions in the system.
Thanks. I made the patch on f13 and cherry-picked over to rawhide since I wasn't able to get a boot.iso to run. I'll try again today.
Hans and me thought it would be reasonable to do this instead: <hansg> timezone_gui.py needs to keep track if its called the first time or not and depepending on that re-use the old value or call hasWindows()
I'm not sure I understand the suggestion, since that would still call hasWindows at the wrong point,
Not if you put the hasWindows call in the getScreen method which does not get called until the screen is shown, at which point the storage scanning is already done.
Regards,
Hans
anaconda-devel@lists.fedoraproject.org