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 > ArchLinux > ArchLinux User Repository

 
 
LinkBack Thread Tools
 
Old 08-12-2011, 04:54 PM
"Brian C. Lane"
 
Default Check before setting partition label (#729599)

From: "Brian C. Lane" <bcl@redhat.com>

Not all disk labels (eg. msdos) support names on partitions, so
you have to check before trying to set it.
---
pyanaconda/storage/__init__.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 33f7e96..c1c1fea 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -413,9 +413,10 @@ class Storage(object):
log.info("setting boot flag on %s" % dev.name)
dev.bootable = True

- # Set the boot partition's name
- ped_partition = dev.partedPartition.getPedPartition()
- ped_partition.set_name(dev.format.name)
+ # Set the boot partition's name on disk labels that support it
+ if dev.partedPartition.disk.supportsFeature(parted.DI SK_TYPE_PARTITION_NAME):
+ ped_partition = dev.partedPartition.getPedPartition()
+ ped_partition.set_name(dev.format.name)

dev.disk.setup()
dev.disk.format.commitToDisk()
--
1.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 08-12-2011, 06:01 PM
David Lehman
 
Default Check before setting partition label (#729599)

On Fri, 2011-08-12 at 09:54 -0700, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl@redhat.com>
>
> Not all disk labels (eg. msdos) support names on partitions, so
> you have to check before trying to set it.

Ack.

> ---
> pyanaconda/storage/__init__.py | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
> index 33f7e96..c1c1fea 100644
> --- a/pyanaconda/storage/__init__.py
> +++ b/pyanaconda/storage/__init__.py
> @@ -413,9 +413,10 @@ class Storage(object):
> log.info("setting boot flag on %s" % dev.name)
> dev.bootable = True
>
> - # Set the boot partition's name
> - ped_partition = dev.partedPartition.getPedPartition()
> - ped_partition.set_name(dev.format.name)
> + # Set the boot partition's name on disk labels that support it
> + if dev.partedPartition.disk.supportsFeature(parted.DI SK_TYPE_PARTITION_NAME):
> + ped_partition = dev.partedPartition.getPedPartition()
> + ped_partition.set_name(dev.format.name)
>
> dev.disk.setup()
> dev.disk.format.commitToDisk()


_______________________________________________
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 11:21 AM.

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