Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88841 - s/cp -L/cp/ in hb-install-system.xml. cp -L doesn't work with busybox.
Summary: s/cp -L/cp/ in hb-install-system.xml. cp -L doesn't work with busybox.
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Handbook (show other bugs)
Hardware: MIPS All
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-12 06:00 UTC by Stuart Longland (RETIRED)
Modified: 2005-04-16 00:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix bug #88841 (000.en_handbook_hb-install-system.xml.diff,1.22 KB, patch)
2005-04-12 06:01 UTC, Stuart Longland (RETIRED)
Details | Diff
busybox-cp-ignore-L.diff -- Patch to add -L to 'cp' (busybox-cp-ignore-L.diff,442 bytes, patch)
2005-04-13 16:03 UTC, Stuart Longland (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Longland (RETIRED) gentoo-dev 2005-04-12 06:00:20 UTC
Hi All,
  This is just a small patch.  In the guide, it says to copy the resolv.conf file to the chroot using 'cp -L'.  I personally have found this unneccesary in the past -- but, more importantly, this doesn't work on the Gentoo/MIPS netboot images, which rely on the coreutils commands provided by Busybox.

  As the 'cp' command in Busybox does not recognise -L, the user is greeted with an 'invalid option -- L' error message.

  The alternative command, which is failsafe, is:

  cat /etc/resolv.conf > /mnt/gentoo/resolv.conf

Could someone with CVS access either apply the attached patch (I'll attach it shortly), or make the appropriate edits?

Thanks,
Stuart Longland
Comment 1 Stuart Longland (RETIRED) gentoo-dev 2005-04-12 06:01:44 UTC
Created attachment 56080 [details, diff]
Patch to fix bug #88841
Comment 2 SpanKY gentoo-dev 2005-04-12 15:28:15 UTC
-L is POSIX so i could just add it to busybox
Comment 3 Xavier Neys (RETIRED) gentoo-dev 2005-04-13 07:17:04 UTC
-L cannot be removed.
It was added for a very good reason: dhcp users ended up with a wrong symlink instead of a valid resolv.conf after chroot'ing.

Best solution would be to have it supported by busybox. Otherwise, we need yet another "if".
Comment 4 SpanKY gentoo-dev 2005-04-13 07:52:41 UTC
ok, busybox's cp acts like -L by default so i'll just update it to ignore the -L option (which is a 1 line fix)
Comment 5 Stuart Longland (RETIRED) gentoo-dev 2005-04-13 16:03:52 UTC
Created attachment 56212 [details, diff]
busybox-cp-ignore-L.diff -- Patch to add -L to 'cp'

Hi,
  Fair enough -- that's another way around it.	I've already got a patch that
tells 'cp' to recognise -L, but at the moment it does nothing with it.	I was
going to wait until I had implemented -L properly. :-)
Comment 6 SpanKY gentoo-dev 2005-04-14 21:32:55 UTC
i already added this upstream ... just have to grab it and it to our portage tree ...
Comment 7 SpanKY gentoo-dev 2005-04-16 00:01:39 UTC
1.00-r2 has the updated cp now