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 > Redhat > Fedora Directory

 
 
LinkBack Thread Tools
 
Old 04-02-2012, 06:00 PM
"Brian C. Lane"
 
Default use /sys/class/dmi instead of dmidecode

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

removes dmidecode binary requirement from specfile and
changes isMactel to read the information directly.
---
anaconda.spec.in | 6 ------
pyanaconda/iutil.py | 5 ++---
pyanaconda/platform.py | 1 +
3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/anaconda.spec.in b/anaconda.spec.in
index fcd787d..19deec5 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -110,9 +110,6 @@ Requires: dosfstools
Requires: e2fsprogs >= %{e2fsver}
Requires: gzip
Requires: libarchive
-%ifarch %{ix86} x86_64 ia64
-Requires: dmidecode
-%endif
Requires: python-pyblock >= %{pythonpyblockver}
Requires: libuser-python
Requires: newt-python
@@ -176,9 +173,6 @@ Requires: dracut >= 16
Requires: dracut-network
Requires: xz
Requires: pykickstart
-%ifarch %{ix86} x86_64
-Requires: dmidecode
-%endif

%description dracut
The 'anaconda' dracut module handles installer-specific boot tasks and
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index e3b6c84..5c68e02 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -688,11 +688,10 @@ def isMactel():

if not isX86():
mactel = False
- elif not os.path.exists("/usr/sbin/dmidecode"):
+ elif not os.path.isfile(DMI_CHASSIS_VENDOR):
mactel = False
else:
- buf = execWithCapture("/usr/sbin/dmidecode",
- ["dmidecode", "-s", "system-manufacturer"])
+ buf = open(DMI_CHASSIS_VENDOR).read()
if buf.lower().find("apple") != -1:
mactel = True
else:
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index 43c0574..e5875e3 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -19,6 +19,7 @@
#
# Authors: Chris Lumens <clumens@redhat.com>
#
+import os
import logging
log = logging.getLogger("anaconda")

--
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-03-2012, 11:35 PM
Will Woods
 
Default use /sys/class/dmi instead of dmidecode

Not sure if this hunk is supposed to be here, but ACK either way.

-w

> diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
> index 43c0574..e5875e3 100644
> --- a/pyanaconda/platform.py
> +++ b/pyanaconda/platform.py
> @@ -19,6 +19,7 @@
> #
> # Authors: Chris Lumens <clumens@redhat.com>
> #
> +import os
> import logging
> log = logging.getLogger("anaconda")
>



_______________________________________________
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 03:34 AM.

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