[paketler-commits] r69603 - in 2009/devel/system/base/mudur: . comar
paketler-commits at pardus.org.tr
paketler-commits at pardus.org.tr
4 Haz 2009 Per 11:18:16 EEST
Author: bahadir.kandemir
Date: Thu Jun 4 11:18:15 2009
New Revision: 69603
Modified:
2009/devel/system/base/mudur/comar/disk.py
2009/devel/system/base/mudur/pspec.xml
Log:
Remove extended partitions from Disk.Manager.getDeviceParts() output
Modified: 2009/devel/system/base/mudur/comar/disk.py
=================================================================
--- 2009/devel/system/base/mudur/comar/disk.py (original)
+++ 2009/devel/system/base/mudur/comar/disk.py Thu Jun 4 11:18:15 2009
@@ -55,6 +55,11 @@
return True
return False
+def getFSType(device):
+ cmd = "/sbin/blkid -s TYPE -o value %s" % device
+ proc = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
+ return proc.communicate()[0].strip()
+
# Disk.Manager methods
def getDevices():
@@ -72,7 +77,11 @@
def getDeviceParts(device):
if not os.path.exists(device):
return []
- return [x for x in glob.glob("%s*" % device) if x != device]
+ parts = []
+ for part in glob.glob("%s*" % device):
+ if part != device and getFSType(part) != "":
+ parts.append(part)
+ return parts
def getMounted():
parts = []
Modified: 2009/devel/system/base/mudur/pspec.xml
=================================================================
--- 2009/devel/system/base/mudur/pspec.xml (original)
+++ 2009/devel/system/base/mudur/pspec.xml Thu Jun 4 11:18:15 2009
@@ -38,6 +38,13 @@
</Package>
<History>
+ <Update release="87">
+ <Date>2009-06-04</Date>
+ <Version>3.0.3</Version>
+ <Comment>Remove extended partitions from Disk.Manager.getDeviceParts() output</Comment>
+ <Name>Bahadır Kandemir</Name>
+ <Email>bahadir at pardus.org.tr</Email>
+ </Update>
<Update release="86">
<Date>2009-05-25</Date>
<Version>3.0.3</Version>
Paketler-commits mesaj listesiyle ilgili
daha fazla bilgi