cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl and apt-get update

From: Alan Ezust <alan.ezust_at_gmail.com>
Date: Fri, 6 Jul 2007 11:29:08 -0700

I am looking at the location where that error is being reported, and
it is in the middle of a 1200 line function, with so many nested loops
and if/thens that both emacs and jedit are unable to parse it properly
and match the curly brackets.
I haven't yet figured out why it compiles but two editors can't figure
out where the close curly bracket of the do { on line 340 of
transfer.c is (I can see it is on 1517, but my editor can't).

Functions shouldn't be this huge. So many of these loops and blocks of
code would read better as separate functions.

On 7/6/07, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> On Fri, Jul 06, 2007 at 09:22:36AM -0700, Alan Ezust wrote:
> > On 7/5/07, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> >> Could it be that apt-get is actually always ignoring your certificates,
> >> but is setting CURLOPT_SSL_VERIFYHOST in one case but clearing it in
> >> another so that the transfer works in that one case regardless?
> >
> > I'm not sure I understand what you mean here. But that brings me to
> > another question: Since libcurl is being used by apt, how do I change
> > the curl runtime options used by apt?
>
> The application has total control over how it uses and configures libcurl.
> It can allow a few environment variables (e.g. to control proxies) to be
> passed through to the library for it to use, as well as a ~/.netrc file.
> But whether the app allows these, and what the exact file names it allows
> is up to it. So you'll need to read the apt documentation to figure out
> how and if it allows configuring of libcurl.
>
> What I'm suggesting is that the apt code that uses libcurl might not be
> setting exactly the same options when it downloads different types of files,
> which could affect the behaviour in the way which you observe. If you
> wanted to get fancy, you could use ltrace to see what apt is doing, or
> just read the source code.
>
> > I see mention of a .curlrc file that is used by the command line tool.
> > But is that used by libcurl (i.e. all software built on top of
> > libcurl) or just the command line tool?
>
> That used by the curl front-end only.
>
> >>> Dan
> --
> http://www.MoveAnnouncer.com The web change of address service
> Let webmasters know that your web site has moved
>
Received on 2007-07-06