[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Metalink support

From: Ander Juaristi
Subject: Re: [Bug-wget] Metalink support
Date: Fri, 24 Jul 2015 19:21:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


I don't know if I should awake this thread, but anyway.

Wget fails to build (at least for me) when using OpenSSL as the backend:

$ ./configure --with-ssl=openssl
$ make
<output trimmed>
In file included from openssl.c:49:0:
utils.h:160:6: error: conflicting types for 'hex_to_string'
 void hex_to_string (char *str_buffer, const char *hex_buffer, size_t hex_len);
In file included from openssl.c:40:0:
/usr/include/openssl/x509v3.h:666:7: note: previous declaration of 
'hex_to_string' was here
 char *hex_to_string(const unsigned char *buffer, long len);
make[3]: *** [openssl.o] Error 1
make[3]: Leaving directory `/home/strunk/codebase/c/wget/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/strunk/codebase/c/wget/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/strunk/codebase/c/wget'
make: *** [all] Error 2

The problem arises from a conflict between two functions named the same: 'hex_to_string'. 
Hubert introduced a new function called 'hex_to_string' in commit 
37b58e3976c02acc90f86e0f65e19b14e2ea9269 ("Metalink support"). But there's already a 
function with the same name declared in <openssl/x509v3.h>:

    char *hex_to_string(const unsigned char *buffer, long len);

I haven't seen anyone discussed anything similar in this thread, and hence I 
decided to report it. How about renaming the function to 'hex2string', or 

On 07/20/2015 05:13 PM, Giuseppe Scrivano wrote:
Hubert Tarasiuk <address@hidden> writes:

W dniu 04.07.2015 o 00:15, Anthony Bryan pisze:

Of course it works for me, but we are not talking about me :-)

The main question is: what does the typical wget user expect ?
I would thinks (s)he expects the download of the file described by the
.metalink file. Of course a few users really want to have only the .metalink
file (for testing/inspection). So there should be a possibility to do exactly
that (e.g. --keep-metalink).

Before making any decision/action we should wait for some other voices.

I'm not sure what the typical wget user expects, but here are some examples.

if you keep the current behavior, it might be helpful to print to the
user that they've downloaded a metalink, and how to make wget use it.

aria2 (another command line metalink downloader) uses these commands
to download the metalink and process it (download the file described
by it & do a hash check) by default. you have to specify
'--follow-metalink=false' to only download the metalink XML file.
I like that option.

Also, I am including the amended patches. There was an issue with
freeing memory when the Metalink parsing failed (I have moved the
metalink_delete call from outside to inside of the 'else' block in



- AJ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]