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 > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 04-29-2010, 02:44 PM
Chris Lumens
 
Default Add a method that fetches and returns the .treeinfo file.

---
yuminstall.py | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 858fe0a..05a3b69 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -589,6 +589,18 @@ class AnacondaYum(YumSorter):

return repo

+ def _getTreeinfo(self):
+ if os.access("%s/.treeinfo" % self.anaconda.methodstr, os.R_OK):
+ return "%s/.treeinfo" % self.anaconda.methodstr
+ else:
+ try:
+ ug = URLGrabber()
+ ug.urlgrab("%s/.treeinfo" % self.anaconda.methodstr,
+ "/tmp/.treeinfo", copy_local=1)
+ return "/tmp/.treeinfo"
+ except:
+ return None
+
# We need to make sure $releasever gets set up before .repo files are
# read. Since there's no redhat-release package in /mnt/sysimage (and
# won't be for quite a while), we need to do our own substutition.
@@ -596,15 +608,12 @@ class AnacondaYum(YumSorter):
from ConfigParser import ConfigParser
c = ConfigParser()

- try:
- if os.access("%s/.treeinfo" % self.anaconda.methodstr, os.R_OK):
- ConfigParser.read(c, "%s/.treeinfo" % self.anaconda.methodstr)
- else:
- ug = URLGrabber()
- ug.urlgrab("%s/.treeinfo" % self.anaconda.methodstr,
- "/tmp/.treeinfo", copy_local=1)
- ConfigParser.read(c, "/tmp/.treeinfo")
+ treeinfo = self._getTreeinfo()
+ if not treeinfo:
+ return productVersion

+ ConfigParser.read(c, treeinfo)
+ try:
return c.get("general", "version")
except:
return productVersion
--
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 10-14-2010, 12:08 AM
"Brian C. Lane"
 
Default Add a method that fetches and returns the .treeinfo file.

From: Chris Lumens <clumens@redhat.com>

Related: rhbz#580697
---
pyanaconda/yuminstall.py | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index 6c0ddda..4420d9f 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -661,6 +661,18 @@ class AnacondaYum(YumSorter):

return repo

+ def _getTreeinfo(self):
+ if os.access("%s/.treeinfo" % self.anaconda.methodstr, os.R_OK):
+ return "%s/.treeinfo" % self.anaconda.methodstr
+ else:
+ try:
+ ug = URLGrabber()
+ ug.urlgrab("%s/.treeinfo" % self.anaconda.methodstr,
+ "/tmp/.treeinfo", copy_local=1)
+ return "/tmp/.treeinfo"
+ except:
+ return None
+
# We need to make sure $releasever gets set up before .repo files are
# read. Since there's no redhat-release package in /mnt/sysimage (and
# won't be for quite a while), we need to do our own substutition.
@@ -668,15 +680,12 @@ class AnacondaYum(YumSorter):
from ConfigParser import ConfigParser
c = ConfigParser()

- try:
- if os.access("%s/.treeinfo" % self.anaconda.methodstr, os.R_OK):
- ConfigParser.read(c, "%s/.treeinfo" % self.anaconda.methodstr)
- else:
- ug = URLGrabber()
- ug.urlgrab("%s/.treeinfo" % self.anaconda.methodstr,
- "/tmp/.treeinfo", copy_local=1)
- ConfigParser.read(c, "/tmp/.treeinfo")
+ treeinfo = self._getTreeinfo()
+ if not treeinfo:
+ return productVersion

+ ConfigParser.read(c, treeinfo)
+ try:
return c.get("general", "version")
except:
return productVersion
--
1.7.2.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 10-14-2010, 11:50 AM
Radek Vykydal
 
Default Add a method that fetches and returns the .treeinfo file.

All six look good to me with one nitpick for 6/6.

And thanks for taking the proxy bug from me.

Radek


_______________________________________________
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 12:31 PM.

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