devnodes-minimal: new recipe to create /dev/console and /dev/null
[opendreambox.git] / meta-opendreambox / recipes-devtools / opkg / opkg / 0011-Keep-auto-installed-recommends-when-moved-from-depen.patch
1 From 910377538f51b84c0f9e7ed92582d6034b0e88dc Mon Sep 17 00:00:00 2001
2 From: Andreas Monzner <andreas.monzner@dream-property.net>
3 Date: Tue, 5 Mar 2013 22:23:21 +0100
4 Subject: [PATCH 11/17] Keep auto-installed recommends when moved from depends
5  to recommends
6
7 ---
8  libopkg/opkg_install.c | 7 ++++---
9  1 file changed, 4 insertions(+), 3 deletions(-)
10
11 diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
12 index be36a64..8cd5cbf 100644
13 --- a/libopkg/opkg_install.c
14 +++ b/libopkg/opkg_install.c
15 @@ -366,11 +366,12 @@ pkg_remove_orphan_dependent(pkg_t *pkg, pkg_t *old_pkg)
16  
17                         for (k=0; k<count1; k++) {
18                                 cd1 = &pkg->depends[k];
19 -                               if (cd1->type != DEPEND)
20 +                               if (cd1->type != DEPEND && cd1->type != RECOMMEND)
21                                         continue;
22                                 for (l=0; l<cd1->possibility_count; l++) {
23 -                                       if (cd0->possibilities[j]
24 -                                        == cd1->possibilities[l]) {
25 +                                       if ( (cd0->type == cd1->type && cd0->possibilities[j] == cd1->possibilities[l]) ||
26 +                                            (cd0->type != cd1->type && !strcmp(cd0->possibilities[j]->pkg->name, cd1->possibilities[l]->pkg->name) )
27 +                                          ) {
28                                                 found = 1;
29                                                 break;
30                                         }
31 -- 
32 1.8.1.2
33