This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: PATCH: "ldconfig ." issue
On Tue, Jul 22, 2003 at 01:54:33PM -0700, Roland McGrath wrote:
> > Here is the patch. It ignore relative path if cache will be built.
>
> I think it should be a fatal error. ldconfig warning and then ignoring
> what you asked it to do is not so useful IMHO.
Here is a new patch.
H.J.
---
2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
* elf/ldconfig.c (main): Issue a fatal error if relative path
is used to build cache.
--- elf/ldconfig.c.relpath 2003-07-22 08:55:23.000000000 -0700
+++ elf/ldconfig.c 2003-07-22 14:01:26.000000000 -0700
@@ -1009,13 +1009,18 @@ main (int argc, char **argv)
/* Parse and process arguments. */
argp_parse (&argp, argc, argv, 0, &remaining, NULL);
- /* Remaining arguments are additional libraries if opt_manual_link
+ /* Remaining arguments are additional directories if opt_manual_link
is not set. */
if (remaining != argc && !opt_manual_link)
{
int i;
for (i = remaining; i < argc; ++i)
- add_dir (argv[i]);
+ if (opt_build_cache && argv[i][0] != '/')
+ error (EXIT_FAILURE, 0,
+ _("relative path `%s' used to build cache"),
+ argv[i]);
+ else
+ add_dir (argv[i]);
}
set_hwcap ();