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

 
 
LinkBack Thread Tools
 
Old 12-04-2010, 12:48 AM
"Brian C. Lane"
 
Default If baseurl is none don't start network (#659781)

In getTreeinfo if the baseurl is None don't try to check for http/ftp
and start network.

Resolves: rhbz#659781
---
yuminstall.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index c936553..24aef16 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -708,7 +708,7 @@ class AnacondaYum(YumSorter):
Try to get .treeinfo file from baseurl, optionally using proxy_url
Saves the file into /tmp/.treeinfo
"""
- if baseurl.startswith("http") or baseurl.startswith("ftp"):
+ if baseurl and (baseurl.startswith("http") or baseurl.startswith("ftp")):
if not network.hasActiveNetDev():
if not self.anaconda.intf.enableNetwork():
log.error("Error downloading %s/.treeinfo: network enablement failed" % (baseurl))
--
1.7.3.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-06-2010, 06:43 AM
Ales Kozumplik
 
Default If baseurl is none don't start network (#659781)

On 12/04/2010 02:48 AM, Brian C. Lane wrote:

In getTreeinfo if the baseurl is None don't try to check for http/ftp
and start network.

Resolves: rhbz#659781
---
yuminstall.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index c936553..24aef16 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -708,7 +708,7 @@ class AnacondaYum(YumSorter):
Try to get .treeinfo file from baseurl, optionally using proxy_url
Saves the file into /tmp/.treeinfo
"""
- if baseurl.startswith("http") or baseurl.startswith("ftp"):
+ if baseurl and (baseurl.startswith("http") or baseurl.startswith("ftp")):
if not network.hasActiveNetDev():
if not self.anaconda.intf.enableNetwork():
log.error("Error downloading %s/.treeinfo: network enablement failed" % (baseurl))


Brian,

Not sure if I get this.

I was thinking about doing what you did just there, but if you look
below in the function if baseurl is None and we fall through, it tries
to construct strings using baseurl. We get URLs like "None/.treeinfo"
and an error in the log file.


Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-06-2010, 04:15 PM
"Brian C. Lane"
 
Default If baseurl is none don't start network (#659781)

On Mon, Dec 06, 2010 at 08:43:01AM +0100, Ales Kozumplik wrote:
> On 12/04/2010 02:48 AM, Brian C. Lane wrote:
> >In getTreeinfo if the baseurl is None don't try to check for http/ftp
> >and start network.
> >
> >Resolves: rhbz#659781
> >---
> > yuminstall.py | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> >diff --git a/yuminstall.py b/yuminstall.py
> >index c936553..24aef16 100644
> >--- a/yuminstall.py
> >+++ b/yuminstall.py
> >@@ -708,7 +708,7 @@ class AnacondaYum(YumSorter):
> > Try to get .treeinfo file from baseurl, optionally using proxy_url
> > Saves the file into /tmp/.treeinfo
> > """
> >- if baseurl.startswith("http") or baseurl.startswith("ftp"):
> >+ if baseurl and (baseurl.startswith("http") or baseurl.startswith("ftp")):
> > if not network.hasActiveNetDev():
> > if not self.anaconda.intf.enableNetwork():
> > log.error("Error downloading %s/.treeinfo: network enablement failed" % (baseurl))
>
> Brian,
>
> Not sure if I get this.
>
> I was thinking about doing what you did just there, but if you look
> below in the function if baseurl is None and we fall through, it
> tries to construct strings using baseurl. We get URLs like
> "None/.treeinfo" and an error in the log file.

You're right! I retract this part of my patch and defer to your
solution to just return None when no baseurl is passed.

--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-07-2010, 07:33 AM
Ales Kozumplik
 
Default If baseurl is none don't start network (#659781)

On 12/06/2010 06:15 PM, Brian C. Lane wrote:

On Mon, Dec 06, 2010 at 08:43:01AM +0100, Ales Kozumplik wrote:

On 12/04/2010 02:48 AM, Brian C. Lane wrote:

In getTreeinfo if the baseurl is None don't try to check for http/ftp
and start network.

Resolves: rhbz#659781
---
yuminstall.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index c936553..24aef16 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -708,7 +708,7 @@ class AnacondaYum(YumSorter):
Try to get .treeinfo file from baseurl, optionally using proxy_url
Saves the file into /tmp/.treeinfo
"""
- if baseurl.startswith("http") or baseurl.startswith("ftp"):
+ if baseurl and (baseurl.startswith("http") or baseurl.startswith("ftp")):
if not network.hasActiveNetDev():
if not self.anaconda.intf.enableNetwork():
log.error("Error downloading %s/.treeinfo: network enablement failed" % (baseurl))


Brian,

Not sure if I get this.

I was thinking about doing what you did just there, but if you look
below in the function if baseurl is None and we fall through, it
tries to construct strings using baseurl. We get URLs like
"None/.treeinfo" and an error in the log file.


You're right! I retract this part of my patch and defer to your
solution to just return None when no baseurl is passed.



Thanks, pushed.

Ales

_______________________________________________
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 04:37 AM.

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