diff options
Diffstat (limited to 'package/busybox/patches')
-rw-r--r-- | package/busybox/patches/001-ipkg.patch | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/package/busybox/patches/001-ipkg.patch b/package/busybox/patches/001-ipkg.patch index 4e9d451a5..fb740df91 100644 --- a/package/busybox/patches/001-ipkg.patch +++ b/package/busybox/patches/001-ipkg.patch @@ -6628,8 +6628,8 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/Kbuild busybox-1.16.1/archival/li +CFLAGS += -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\"" diff -Nur busybox-1.16.1.orig/archival/libipkg/libipkg.c busybox-1.16.1/archival/libipkg/libipkg.c --- busybox-1.16.1.orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.16.1/archival/libipkg/libipkg.c 2010-06-29 17:35:49.219617937 +0200 -@@ -0,0 +1,532 @@ ++++ busybox-1.16.1/archival/libipkg/libipkg.c 2010-06-29 19:58:50.069617923 +0200 +@@ -0,0 +1,550 @@ +/* ipkglib.c - the itsy package management system + + Florina Boor @@ -7083,9 +7083,6 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/libipkg.c busybox-1.16.1/archival + ipkg_conf_t ipkg_conf; + const char *message = "ipkg must have one sub-command argument"; + -+ /* mount rootfs read-write */ -+ if (mount("","/",0,MS_REMOUNT,0)<0) -+ fprintf (stderr, "Mounting rootfs read-write failed\n"); + + args_init (&args); + @@ -7121,6 +7118,18 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/libipkg.c busybox-1.16.1/archival + args.noreadfeedsfile = 1; + + ++ if ( !strcmp(cmd_name,"install") || ++ !strcmp(cmd_name,"update") || ++ !strcmp(cmd_name,"upgrade") || ++ !strcmp(cmd_name,"flag") || ++ !strcmp(cmd_name,"configure") || ++ !strcmp(cmd_name,"remove") ) { ++ /* mount rootfs read-write */ ++ if (mount("","/",0,MS_REMOUNT,0)<0) ++ fprintf (stderr, "Mounting rootfs read-write failed\n"); ++ } ++ ++ + err = ipkg_conf_init (&ipkg_conf, &args); + if (err) + { @@ -7156,9 +7165,18 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/libipkg.c busybox-1.16.1/archival + err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - optind_, (const char **) (argv + optind_), NULL); + + ipkg_conf_deinit (&ipkg_conf); -+ /* mount rootfs read-only */ -+ if (mount("","/",0,MS_REMOUNT|MS_RDONLY,0)<0) -+ fprintf (stderr, "Mounting rootfs read-only failed\n"); ++ ++ if ( !strcmp(cmd_name,"install") || ++ !strcmp(cmd_name,"update") || ++ !strcmp(cmd_name,"upgrade") || ++ !strcmp(cmd_name,"flag") || ++ !strcmp(cmd_name,"configure") || ++ !strcmp(cmd_name,"remove") ) { ++ sync(); ++ /* mount rootfs read-only */ ++ if (mount("","/",0,MS_REMOUNT|MS_RDONLY,0)<0) ++ fprintf (stderr, "Mounting rootfs read-only failed\n"); ++ } + + return err; +} |