[ccan] CCAN: code upload with name ogg_to_pcm.tar.gz

Tim Post echo at echoreply.us
Thu Apr 9 14:47:00 EST 2009


On Thu, 2009-04-09 at 13:06 +1000, Adam Kennedy wrote:
> 2009/4/9 Rusty Russell <rusty at rustcorp.com.au>:
> > On Thursday 09 April 2009 09:50:54 Rusty Russell wrote:
> >> Yes, but it was a nice topical point (we'd been discussing this recently
> >> on IRC).  And seeing the games people play lets us improve ccanlint :)
> >
> > Actually, your uploads (got wwviadio too, thanks!) raise a new question:
> > how to list non-ccan dependencies.
> 
> NOBODY has a good solution for that problem yet.

I was looking at pulling bits out of glibc that made it easy for _info.c
to search through /etc/ld.so.cache for that kind of thing.

For instance, we have this:

        if (strcmp(argv[1], "libs") == 0) {
                printf("vorbisfile\n"
                       "portaudio\n");
                return 0;
        }


Where we could have

    static struct ccan_lib_deps const libdeps[] = {
      { "foo", greater_or_equal, "1.2" },
      { "bar", equal_to, "2.1" },
    .....

Checking for the "libs" argument can print them as it does, but could
return 1 if no such love exists in the linker's cache, via:

 if (! ccan_check_ldconfig(deps))
   return 1;

 return 0;

Where ccan_check_ldconfig() prints each one as it does now, but breaks
if something isn't found (causing it to be skipped and not tested).


Not sure if that's the best way, also not sure how much we can trust the
so cache, if some library isn't installed system wide (for instance, foo
is present, but in /home/user/lib).

Cheers,
--Tim





More information about the ccan mailing list