summaryrefslogtreecommitdiffstats
path: root/partedUtils.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove partedUtils.py.Chris Lumens2009-04-061-1086/+0
|
* Use booleans in isys.mount() and isys.umount()David Cantrell2009-03-181-2/+4
| | | | Use True/False over 1/0. It's the future.
* storage.disks never includes disks without media present.Chris Lumens2009-03-171-1/+1
|
* Make kickstart work against the new partitioning code.Chris Lumens2009-03-041-5/+1
| | | | | | This doesn't atually mean kickstart allows you to specify partitions and clearpart. However, you can leave out partitioning information from your kickstart file, specify it from the UI, and get an install to complete.
* protectedPartitions is a list, not a function.Chris Lumens2009-03-041-2/+2
|
* Get rid of partedUtils.getDefaultDiskType, since the platform knows that.Chris Lumens2009-02-271-29/+3
|
* Lots of minor fixes and cleanups. A non-exhaustive list follows.David Lehman2009-02-271-1/+0
| | | | | | | | | | | - Change minsize/maxsize to minSize/maxSize since that's the convention elsewhere throughout the code. - Redirect output from all external utilities to tty5, not /dev/null. - Don't waste calls to basename for debug log statements, especially when the device can be None. - Add lots of missing imports. - Fix lots of remnants of previous code usage.
* Remove obsolete imports.David Lehman2009-02-231-3/+0
|
* Remove getReleaseString from partedUtils.David Lehman2009-02-231-44/+0
| | | | It will soon reappear in storage.__init__.py.
* Fix the obvious typo.Chris Lumens2009-02-191-1/+1
|
* Take into account that a parted.Partition's _fileSystem can be None (#485644).Chris Lumens2009-02-191-3/+6
|
* Encode our upgrade policy in productMatches/versionMatches and enforce it.Chris Lumens2009-02-161-54/+21
| | | | | | | For Fedora, this means we will not allow upgrades of detected root filesystems more than two releases old, or "upgrading" a newer install with an older one. For RHEL, we don't yet know what to do so just allow things to continue as they always have. Using "upgradeany" still circumvents this check.
* Check for 'is None' not '== None'.David Cantrell2009-02-121-1/+1
|
* disk.type is already a string, so we don't have to check the name attr.Chris Lumens2009-02-121-5/+5
|
* Handle errors probing filesystems on RAID and LVM partitions.Chris Lumens2009-02-121-6/+12
|
* Iterate over partitions using disk.partitionsDavid Cantrell2009-02-121-4/+4
| | | | | | | Rather than calling disk.nextPartition() over and over, we can get a hash table of all partitions on a disk via disk.partitions. Iterate over the values() of this hash (the keys correspond to the partition number).
* Use correct attribute on FileSystem objects.David Cantrell2009-02-121-9/+9
| | | | | | The type of the filesystem is a string available via the 'type' attribute. Use the type as the key for the parted.fileSystemType hash.
* Syntax changes for the new pyparted.David Cantrell2009-02-121-10/+5
| | | | | | | | | | | | | | | 1) Iterate over partitions with a for loop over disk.partitions.values() rather than calling next_partition() 2) Call getFlag() rather than get_flag() 3) Call setFlag() to enable a flag, call unsetFlag() to disable a flag. 4) Reference the active property rather than calling the is_active() method. And other fixes.
* Syntax fixes for the new pyparted.David Cantrell2009-02-121-0/+1
| | | | | | | | | To get a parted.Device object, we call: parted.getDevice(path) To create a new parted.Disk object, we need a parted.Device and we call: parted.Disk(device=parted.Device)
* sector_size -> sectorSizeChris Lumens2009-02-121-1/+1
|
* There is no more parted.error, so just use Exception.Chris Lumens2009-02-121-3/+3
| | | | | | I kind of hate having to do this since Exception is so broad but it's the fastest way to get past this and on to the real bugs. We need to go back and add more fine-grained error handling later though.
* Don't use the native_type flag anymore.Chris Lumens2009-02-121-16/+12
| | | | | | | In the old pyparted, this flag was marked with all sorts of warnings about how it would go away once certain constants were supported. We now support all the constants libparted exposes, so we don't need to keep ancient hacks around anymore.
* Syntax fixes for disk_new_fresh() and probe_specific.David Cantrell2009-02-121-4/+4
|
* Syntax fixes for pyparted-2.0.0David Cantrell2009-02-121-106/+99
| | | | | | Lots of methods and attributes have changed in the new pyparted. This patch fixes up partedUtils.py and autopart.py to work with the new pyparted.
* Removed partedUtils.get_partition_by_name()David Cantrell2009-02-121-21/+0
| | | | Now provided by pyparted as parted.getPartitionByName()
* Remove partedUtils.getMaxAvailPartSizeMB()David Cantrell2009-02-121-18/+0
| | | | | This function is now provided as a method on parted.Partition objects.
* Removed partedUtils.getPartSize()David Cantrell2009-02-121-4/+0
| | | | | | | All this function did was return the length of the partition in sectors, which we already have on the object. It was called from one place in autopart.py. Removed the function and now just reference the length directly in autopart.py.
* Removed partedUtils.get_lvm_partitions()David Cantrell2009-02-121-7/+0
| | | | Now provided by parted.Disk.getLVMPartitions()
* Removed partedUtils.getRaidPartitions()David Cantrell2009-02-121-6/+0
| | | | Now provided by parted.Disk.getRaidPartitions()
* Removed partedUtils.get_primary_partitions()David Cantrell2009-02-121-5/+0
| | | | Now provided by parted.Disk.getPrimaryPartitions()
* Remove partedUtils.get_logical_partitions()David Cantrell2009-02-121-6/+0
| | | | Now provided by parted.Disk.getLogicalPartitions()
* Removed partedUtils.get_partition_name()David Cantrell2009-02-121-27/+6
| | | | Now provided by parted.Partition.getDeviceNodeName()
* Remove archLabels and partitionTypesDict that have been moved into pyparted.Chris Lumens2009-02-121-83/+3
|
* Remove partedUtils.get_max_logical_partitions()David Cantrell2009-02-121-26/+0
| | | | | The parted.Disk object now provides a getMaxLogicalPartitions() method.
* Removed sector<->cylinder conversion functions.David Cantrell2009-02-121-18/+0
| | | | | The parted.Device object now offers functions to translate between cylinders and sectors.
* Removed partedUtils.getPartSizeMB()David Cantrell2009-02-121-6/+1
| | | | | The parted.Partition object provides getSize() to return the size of the partition in a human-readable format.
* Removed partedUtils.getDeviceSizeMB(), functionality now in pyparted.David Cantrell2009-02-121-5/+0
| | | | | The parted.Device object now provides a getSize() method to return the size of the device in a human-readable format.
* Removed partedUtils.get_flags(), functionality now in pyparted.David Cantrell2009-02-121-18/+1
| | | | | This function was only used inside partedUtils.py, but it seemed reasonable to move it in to the new pyparted.
* Return device path with '/dev/' in partedUtils.get_partition_drive()David Cantrell2009-02-121-1/+1
|
* Remove partedUtils.sniffFilesystemType()David Cantrell2009-02-121-7/+0
| | | | This function is just a pass-through for isys.readFSType().
* Remove unused code in partedUtils.pyDavid Cantrell2009-02-121-18/+1
| | | | | | While going through partedUtils.py to see what can be pulled in to the new pyparted, I found some things were no longer used by anything in anaconda. This patch removes that code.
* Update partedUtils.py:findExistingRootPartitions to return UUID (atodorov).Chris Lumens2009-01-071-4/+7
| | | | | | | | The attached patch updates findExistingRootPartitions to return dev, fs, release string, label and uuid and fixes all callers to use the 5 tuple. This is required so that later changes to upgrades functionality can fit better in the code. For more background see: https://www.redhat.com/archives/anaconda-devel-list/2008-December/msg00210.html
* Use stacks instead of tracebacks in traceback handlers.David Lehman2008-12-081-2/+3
| | | | | | | | | | This allows us to generate traceback-like stacks on demand using inspect.stack(). stack() returns a list of tuples representing the stack frames at the time of invocation. A traceback object can be converted to a list of these tuples by calling inspect.getinnerframes(tb). NOTE: the stack() function returns the frames in the opposite order of a traceback's.
* Make sure fstype exists before we try to test it (#473498).Chris Lumens2008-12-021-0/+2
|
* Fix 2 issues in pyparted found by pycheckerHans de Goede2008-10-291-6/+7
|
* Fix various syntax errors caught by PyCheckerHans de Goede2008-10-291-1/+1
| | | | Fix various syntax errors caught by PyChecker
* Fix ext4 detection on existing partitions (#467047)Radek Vykydal2008-10-231-0/+4
| | | | | ext4 was detected only on lvm or raid or encrypted partitions. Fw port of rhel5's #466868 and #465248.
* Support installs to SD via MMC (#461884)Jeremy Katz2008-09-291-1/+2
| | | | | Add modules for sd/mmc subsystem and support the block device name where we need to do munging given the 'p' separator
* Fix test for allowing the installation source to be on the root fs (#462769).Chris Lumens2008-09-191-16/+8
| | | | | | | | | This goes back to how the stage2 stuff used to work. By this point in the upgrade process, the installation source would have already been mounted so trying to mount it again to test for /etc/redhat-release would result in an error from mount. However, we no longer have the source mounted when performing this test so we need to make sure to try mounting the protected partitions just like every other.
* Add an extra newline to the empty partition table message.Chris Lumens2008-09-161-1/+1
|