This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] build-many-glibcs: Install kernel headers separately.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 10 Jul 2017 10:41:58 +0000
- Subject: Re: [PATCH 1/2] build-many-glibcs: Install kernel headers separately.
- Authentication-results: sourceware.org; auth=none
- References: <20170709141348.16337-1-zackw@panix.com>
On Sun, 9 Jul 2017, Zack Weinberg wrote:
> build of GCC to work correctly. The way it is created is a little
> kludgey and exposed a bug in the shell quotation logic, but it works.
This code, using python with exec, seems much more convoluted than
necessary. I'd expect something more like:
(run in directory SYSROOT/usr/include, using add_command_dir)
sh -c 'ln -s ../share/linux/* .'
rm -f SYSROOT/usr/include/scsi
mkdir SYSROOT/usr/include/scsi
(run in directory SYSROOT/usr/include/scsi, using add_command_dir)
sh -c 'ln -s ../../share/linux/scsi/* .'
where the use of sh -c is so that the * gets expanded by the shell rather
than quoted to prevent expansion.
> Note that $(sysroot)/usr/share/linux/include is made read-only to all
> after it is created, in order to catch cases where glibc's "make
I'm concerned that this would (a) mean the existing shutil.rmtree use
fails to remove the whole installation directory as it's meant to, and (b)
any rm -rf done externally on an install tree also fails to do so. I
don't think a build script should leave around read-only directories;
that's unfriendly to users who expect to be able to rm -rf the resulting
directories.
To make a directory read-only like that I think you'd need to (a) add a
cleanup task (one running even if previous tasks failed) that makes the
directories writable again, and (b) change remove_dirs so it tries to make
directories writable before removing them (so it works properly if a
previous build was interrupted while the directories were read-only).
--
Joseph S. Myers
joseph@codesourcery.com