clean up the directory layout of the uci shell api
[openwrt.git] / package / busybox / patches / 521-ipkg_upgrade_env.patch
1 Index: busybox-1.7.2/archival/libipkg/ipkg_install.c
2 ===================================================================
3 --- busybox-1.7.2.orig/archival/libipkg/ipkg_install.c 2007-10-30 17:15:31.000000000 -0500
4 +++ busybox-1.7.2/archival/libipkg/ipkg_install.c 2007-10-30 17:15:33.000000000 -0500
5 @@ -136,6 +136,7 @@
6 ipkg_error_t ipkg_install_by_name(ipkg_conf_t *conf, const char *pkg_name)
7 {
8 int cmp;
9 + int u = 0;
10 pkg_t *old, *new;
11 char *old_version, *new_version;
12
13 @@ -201,6 +202,7 @@
14 } else if (cmp < 0) {
15 new->dest = old->dest;
16 old->state_want = SW_DEINSTALL; /* Here probably the problem for bug 1277 */
17 + u = 1;
18 }
19 }
20
21 @@ -211,7 +213,7 @@
22 anyone ever wants to make a nice libipkg. */
23
24 ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__);
25 - return ipkg_install_pkg(conf, new,0);
26 + return ipkg_install_pkg(conf, new,u);
27 }
28
29 ipkg_error_t ipkg_install_multi_by_name(ipkg_conf_t *conf, const char *pkg_name)
30 @@ -750,8 +752,10 @@
31 char* file_md5;
32
33
34 - if ( from_upgrade )
35 + if ( from_upgrade ) {
36 message = 1; /* Coming from an upgrade, and should change the output message */
37 + setenv("IPKG_UPGRADE", "yes", 1);
38 + }
39
40 if (!pkg) {
41 ipkg_message(conf, IPKG_ERROR,
This page took 0.046461 seconds and 5 git commands to generate.