FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 03-05-2009, 10:29 AM
Hans de Goede
 
Default : More syntax errors / traceback fixes

---
installclasses/fedora.py | 3 +++
storage/__init__.py | 10 +++++-----
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/installclasses/fedora.py b/installclasses/fedora.py
index bfd9a55..087e2d3 100644
--- a/installclasses/fedora.py
+++ b/installclasses/fedora.py
@@ -79,6 +79,9 @@ class InstallClass(BaseInstallClass):
return yuminstall.YumBackend

def productMatches(self, oldprod):
+ if oldprod is None:
+ return False
+
if oldprod.startswith(productName):
return True

diff --git a/storage/__init__.py b/storage/__init__.py
index 06a9213..2775824 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -963,7 +963,7 @@ class BlkidTab(object):

class CryptTab(object):
""" Dictionary-like interface to crypttab entries with map name keys """
- def __init__(self, devicetree, blkidTab=None):
+ def __init__(self, devicetree, blkidTab=None, chroot=""):
self.devicetree = devicetree
self.blkidTab = blkidTab
self.chroot = chroot
@@ -1117,7 +1117,7 @@ class FSSet(object):
log.info("error parsing blkid.tab: %s" % e)
blkidTab = None

- cryptTab = CryptTab(self.devicetree, blkidTab=blkidTab)
+ cryptTab = CryptTab(self.devicetree, blkidTab=blkidTab, chroot=chroot)
try:
cryptTab.parse(chroot=chroot)
log.debug("crypttab maps: %s" % cryptTab.mappings.keys())
@@ -1472,17 +1472,17 @@ class FSSet(object):
def write(self, instPath):
""" write out all config files based on the set of filesystems """
# /etc/fstab
- fstab_path = os.normpath("%s/etc/fstab" % instPath)
+ fstab_path = os.path.normpath("%s/etc/fstab" % instPath)
fstab = self.fstab()
open(fstab_path, "w").write(fstab)

# /etc/crypttab
- crypttab_path = os.normpath("%s/etc/crypttab" % instPath)
+ crypttab_path = os.path.normpath("%s/etc/crypttab" % instPath)
crypttab = self.crypttab()
open(crypttab_path, "w").write(crypttab)

# /etc/mdadm.conf
- mdadm_path = os.normpath("%s/etc/mdadm.conf" % instPath)
+ mdadm_path = os.path.normpath("%s/etc/mdadm.conf" % instPath)
mdadm_conf = self.mdadmConf()
open(mdadm_path, "w").write(mdadm_conf)

--
1.6.1.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-05-2009, 10:35 AM
Radek Vykydal
 
Default : More syntax errors / traceback fixes

Hans de Goede wrote:

---
installclasses/fedora.py | 3 +++
storage/__init__.py | 10 +++++-----
2 files changed, 8 insertions(+), 5 deletions(-)

Looks good to me.



diff --git a/installclasses/fedora.py b/installclasses/fedora.py
index bfd9a55..087e2d3 100644
--- a/installclasses/fedora.py
+++ b/installclasses/fedora.py
@@ -79,6 +79,9 @@ class InstallClass(BaseInstallClass):
return yuminstall.YumBackend

def productMatches(self, oldprod):
+ if oldprod is None:
+ return False
+
if oldprod.startswith(productName):
return True

diff --git a/storage/__init__.py b/storage/__init__.py
index 06a9213..2775824 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -963,7 +963,7 @@ class BlkidTab(object):

class CryptTab(object):
""" Dictionary-like interface to crypttab entries with map name
keys """

- def __init__(self, devicetree, blkidTab=None):
+ def __init__(self, devicetree, blkidTab=None, chroot=""):
self.devicetree = devicetree
self.blkidTab = blkidTab
self.chroot = chroot
@@ -1117,7 +1117,7 @@ class FSSet(object):
log.info("error parsing blkid.tab: %s" % e)
blkidTab = None

- cryptTab = CryptTab(self.devicetree, blkidTab=blkidTab)
+ cryptTab = CryptTab(self.devicetree, blkidTab=blkidTab,
chroot=chroot)

try:
cryptTab.parse(chroot=chroot)
log.debug("crypttab maps: %s" % cryptTab.mappings.keys())
@@ -1472,17 +1472,17 @@ class FSSet(object):
def write(self, instPath):
""" write out all config files based on the set of
filesystems """

# /etc/fstab
- fstab_path = os.normpath("%s/etc/fstab" % instPath)
+ fstab_path = os.path.normpath("%s/etc/fstab" % instPath)
fstab = self.fstab()
open(fstab_path, "w").write(fstab)

# /etc/crypttab
- crypttab_path = os.normpath("%s/etc/crypttab" % instPath)
+ crypttab_path = os.path.normpath("%s/etc/crypttab" % instPath)
crypttab = self.crypttab()
open(crypttab_path, "w").write(crypttab)

# /etc/mdadm.conf
- mdadm_path = os.normpath("%s/etc/mdadm.conf" % instPath)
+ mdadm_path = os.path.normpath("%s/etc/mdadm.conf" % instPath)
mdadm_conf = self.mdadmConf()
open(mdadm_path, "w").write(mdadm_conf)



_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-05-2009, 11:02 AM
Hans de Goede
 
Default : More syntax errors / traceback fixes

Radek Vykydal wrote:

Hans de Goede wrote:

---
installclasses/fedora.py | 3 +++
storage/__init__.py | 10 +++++-----
2 files changed, 8 insertions(+), 5 deletions(-)

Looks good to me.



Thanks applied.

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-05-2009, 12:54 PM
Chris Lumens
 
Default : More syntax errors / traceback fixes

> diff --git a/installclasses/fedora.py b/installclasses/fedora.py
> index bfd9a55..087e2d3 100644
> --- a/installclasses/fedora.py
> +++ b/installclasses/fedora.py
> @@ -79,6 +79,9 @@ class InstallClass(BaseInstallClass):
> return yuminstall.YumBackend
>
> def productMatches(self, oldprod):
> + if oldprod is None:
> + return False
> +
> if oldprod.startswith(productName):
> return True

The one thing that concerns me here is why oldprod is None. I wonder if
we are failing to read the installed system correctly, or if we just
pass in None if there's no product file.

Anyway this also solves an actual bug in bugzilla, so we should commit
this to master as well and close that bug out.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-05-2009, 05:11 PM
Hans de Goede
 
Default : More syntax errors / traceback fixes

Chris Lumens wrote:

diff --git a/installclasses/fedora.py b/installclasses/fedora.py
index bfd9a55..087e2d3 100644
--- a/installclasses/fedora.py
+++ b/installclasses/fedora.py
@@ -79,6 +79,9 @@ class InstallClass(BaseInstallClass):
return yuminstall.YumBackend

def productMatches(self, oldprod):
+ if oldprod is None:
+ return False
+
if oldprod.startswith(productName):
return True


The one thing that concerns me here is why oldprod is None. I wonder if
we are failing to read the installed system correctly, or if we just
pass in None if there's no product file.



I *think* it is the latter, this happened to me after an incomplete (crashed)
install.


Anyway this also solves an actual bug in bugzilla, so we should commit
this to master as well and close that bug out.


Bug nr?

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-05-2009, 06:12 PM
Chris Lumens
 
Default : More syntax errors / traceback fixes

>> The one thing that concerns me here is why oldprod is None. I wonder if
>> we are failing to read the installed system correctly, or if we just
>> pass in None if there's no product file.
>>
>
> I *think* it is the latter, this happened to me after an incomplete (crashed)
> install.

Okay, that's fine then.

>> Anyway this also solves an actual bug in bugzilla, so we should commit
>> this to master as well and close that bug out.
>
> Bug nr?

487661, which I will close out right now.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org