Bug 176521 - [PATCH] Allow spectool to retry after timeout
[PATCH] Allow spectool to retry after timeout
Product: Fedora
Classification: Fedora
Component: fedora-rpmdevtools (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2005-12-23 22:38 EST by Ignacio Vazquez-Abrams
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version: 1.4-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-12-30 13:17:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
spectool retry patch (485 bytes, patch)
2005-12-23 22:38 EST, Ignacio Vazquez-Abrams
no flags Details | Diff
Allow spectool specific wget configuration (445 bytes, patch)
2005-12-26 18:16 EST, Ville Skyttä
no flags Details | Diff
Allow spectool specific wget configuration (3.50 KB, patch)
2005-12-29 14:05 EST, Ville Skyttä
no flags Details | Diff

  None (edit)
Description Ignacio Vazquez-Abrams 2005-12-23 22:38:38 EST
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-23 22:38:38 EST
Created attachment 122569 [details]
spectool retry patch
Comment 2 Ville Skyttä 2005-12-25 14:23:24 EST
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 16:19:42 EST
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 18:16:40 EST
Created attachment 122589 [details]
Allow spectool specific wget configuration

Sure.  How about something like the attached patch?
Comment 5 Ignacio Vazquez-Abrams 2005-12-26 22:11:54 EST
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 02:32:57 EST
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 02:47:53 EST
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 11:50:33 EST
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 17:00:39 EST
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 14:05:21 EST
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 14:50:49 EST
If it works then it works for me.
Comment 12 Nils Philippsen 2005-12-30 04:47:38 EST
OK with me. I've applied the patch to upstream, it's in spectool-1.0.6.
Comment 13 Ville Skyttä 2005-12-30 13:17:02 EST
Included in 1.4-1, thanks.

Note You need to log in before you can comment on or make changes to this bug.