[Bug 37] Fix the kernel header situation (again)

Gerard Beekmans gerard at linuxfromscratch.org
Sat May 12 11:13:27 PDT 2001


On Sat, May 12, 2001 at 01:45:08PM -0400, Gerard Beekmans wrote:
> > I've changed this to "cp -a"
> > 
> > -a is the same as -dpR, which preserves file attributes and also leaves
> > symlinks intact in case there are any (or if not yet, they could always
> > appear in the future).
> 
> I forgot that asm was a symlink. Let's see what can be done about, while
> still using cp -a (i'd just feel better if permissions and symlinks
> inside linux/ and asm/ were preserved)

Not sure what happened to that previous email.

Here's a repeat.

The command I could quickly find was as follows:
cp -a ../src/linux/include/`ls -l --color=none \
../src/linux/include/asm|cut -f 28 -d " "` asm

Pretty ugly if you ask me. It can be done with awk much
simpler, but I forgot to write down the command and I forgot what i
exactly had. Bottom line is that i don't think it's worth it using a
complex command like that just to copy a directory over. There are no
symlinks in the kernel include directories so not a big deal now. It
would be nice, though, if we can change it.

An alternative could be:
cd $LFS/usr/include &&
mkdir asm && cp -a ../src/linux/include/asm/* asm

Sigh, ok I think I like that better than cp -R that I just changed it
too.

Normally I'd just wait before changing things and discuss it first. But
I thought this was such a trivial thing it wouldn't really need
discussing. Seems that even the smallest thing can be a pain to figure
out. Or is it just me?

Anyways, I've tested the mkdir asm && cp -a ../src/linux/include/asm/*
asm thing and it works as expected. I've moved on to the next section in
chapter 5 so I won't be changing the kernel part anymore myself before I
really break something there ;)



-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-





More information about the lfs-book mailing list