opkg: some fixes/changes for handling packet recommends
[vuplus_openvuplus] / meta-openvuplus / recipes-devtools / opkg / opkg / 0011-opkg-allow-package-move-from-depends-to-recommends.patch
1 diff -Naur trunk.org/libopkg/opkg_install.c trunk/libopkg/opkg_install.c
2 --- trunk.org/libopkg/opkg_install.c    2013-02-17 12:40:51.000000000 +0100
3 +++ trunk/libopkg/opkg_install.c        2013-02-17 01:17:37.000000000 +0100
4 @@ -366,11 +366,12 @@
5  
6                         for (k=0; k<count1; k++) {
7                                 cd1 = &pkg->depends[k];
8 -                               if (cd1->type != DEPEND)
9 +                               if (cd1->type != DEPEND && cd1->type != RECOMMEND)
10                                         continue;
11                                 for (l=0; l<cd1->possibility_count; l++) {
12 -                                       if (cd0->possibilities[j]
13 -                                        == cd1->possibilities[l]) {
14 +                                       if ( (cd0->type == cd1->type && cd0->possibilities[j] == cd1->possibilities[l]) ||
15 +                                            (cd0->type != cd1->type && !strcmp(cd0->possibilities[j]->pkg->name, cd1->possibilities[l]->pkg->name) )
16 +                                          ) {
17                                                 found = 1;
18                                                 break;
19                                         }