Bug 176521

Summary: [PATCH] Allow spectool to retry after timeout
Product: [Fedora] Fedora Reporter: Ignacio Vazquez-Abrams <ivazqueznet>
Component: fedora-rpmdevtoolsAssignee: Ville Skyttä <scop>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: extras-qa, nphilipp
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.4-1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-12-30 18:17:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
spectool retry patch
none
Allow spectool specific wget configuration
none
Allow spectool specific wget configuration none

Description Ignacio Vazquez-Abrams 2005-12-24 03:38:38 UTC
The attached patch allows spectool to retry downloading a file once a timeout
has expired. This is useful for hosts such as dl.sf.net that seem to resolve to
a dead host for the first address, but subsequent addresses work.

Comment 1 Ignacio Vazquez-Abrams 2005-12-24 03:38:38 UTC
Created attachment 122569 [details]
spectool retry patch

Comment 2 Ville Skyttä 2005-12-25 19:23:24 UTC
Hm, I agree that this functionality is desired, but on the other hand, I'd like
some more flexibility.

This can be already achieved by customizing /etc/wgetrc or ~/.wgetrc or by
pointing the WGETRC environment variable to another one for all wget
invocations.  We could of course install another wgetrc somewhere for spectool
use and set the WGETRC environment variable in the script to point to that if
spectool requires something else than generic wgetrc's or if it's not desirable
to use the "global" one, and/or if/when wget's default options are not good
enough for spectool use.  Thoughts?

Comment 3 Ignacio Vazquez-Abrams 2005-12-26 21:19:42 UTC
I'm not averse to having a specific option set location for Fedora tools, but
enforcing it system-wide via /etc/wgetrc or ~/.wgetrc is the wrong idea.

Comment 4 Ville Skyttä 2005-12-26 23:16:40 UTC
Created attachment 122589 [details]
Allow spectool specific wget configuration

Sure.  How about something like the attached patch?

Comment 5 Ignacio Vazquez-Abrams 2005-12-27 03:11:54 UTC
I was thinking more along the lines of e.g. /etc/fedora-tools/wgetrc and
~/.fedora-tools/wgetrc, and then any Fedora tool could include that file and
benefit from any changes.

Comment 6 Ville Skyttä 2005-12-27 07:32:57 UTC
Works for me if it can be done in a sane backwards compatible way.  I wouldn't
want to configure the same settings in multiple wgetrc's, the normal /etc/wgetrc
and ~/.wgetrc work fine for me.  So some kind of a fallback needs to be
provided, for example like "if /etc/fedora/wgetrc exists, use it, otherwise use
the usual system ones".

Comment 7 Ignacio Vazquez-Abrams 2005-12-27 07:47:53 UTC
wget will fall back on the system defaults if $WGETRC isn't defined so I don't
see that as a problem.

Comment 8 Ville Skyttä 2005-12-27 16:50:33 UTC
The only "problem" would be the "if /etc/fedora/wgetrc exists" part.  In order
to preserve backwards compatibility and the possibility to just use the usual
system wgetrc's, I imagine we wouldn't be shipping that file.  Or if shipped, we
need to make sure that it can be just removed locally and future package
upgrades won't reinstall it.

Comment 9 Ignacio Vazquez-Abrams 2005-12-27 22:00:39 UTC
Agreed on not shipping it. Owning /etc/fedora ought to be enough, and the rest
can be in README.spectool. I don't know it should be %ghosted since it makes
little sense to futz with the user's configuration that way.

Comment 10 Ville Skyttä 2005-12-29 19:05:21 UTC
Created attachment 122631 [details]
Allow spectool specific wget configuration

Ok, what do you (both) think of this patch?  (Contains an unrelated update of
the GPL to the latest available from gnu.org.)

Comment 11 Ignacio Vazquez-Abrams 2005-12-29 19:50:49 UTC
If it works then it works for me.

Comment 12 Nils Philippsen 2005-12-30 09:47:38 UTC
OK with me. I've applied the patch to upstream, it's in spectool-1.0.6.

Comment 13 Ville Skyttä 2005-12-30 18:17:02 UTC
Included in 1.4-1, thanks.