mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
bfff3d6e23
This fixes the usage for stdenv bootstrap. Additionally, dezgeg ported the patch from 1.25.1 to 1.26.1
23 lines
880 B
Diff
23 lines
880 B
Diff
Allow BusyBox to be invoked as "<something>-busybox". This is
|
|
necessary when it's run from the Nix store as <hash>-busybox during
|
|
stdenv bootstrap.
|
|
--- busybox-1.26.1-orig/libbb/appletlib.orig 2016-10-26 19:54:20.510957575 -0400
|
|
+++ busybox-1.26.1/libbb/appletlib.c 2016-10-26 19:48:31.590862853 -0400
|
|
@@ -887,7 +887,7 @@
|
|
static NORETURN void run_applet_and_exit(const char *name, char **argv)
|
|
{
|
|
# if ENABLE_BUSYBOX
|
|
- if (is_prefixed_with(name, "busybox"))
|
|
+ if (strstr(name, "busybox") != 0)
|
|
exit(busybox_main(argv));
|
|
# endif
|
|
# if NUM_APPLETS > 0
|
|
@@ -981,7 +981,7 @@ int main(int argc UNUSED_PARAM, char **argv)
|
|
|
|
lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
|
|
# if !ENABLE_BUSYBOX
|
|
- if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
|
|
+ if (argv[1] && strstr(bb_basename(argv[0]), "busybox") != 0)
|
|
argv++;
|
|
# endif
|
|
applet_name = argv[0];
|