summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg/opkg/0008-select_higher_version.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg/0008-select_higher_version.patch')
-rw-r--r--meta/recipes-devtools/opkg/opkg/0008-select_higher_version.patch25
1 files changed, 11 insertions, 14 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/0008-select_higher_version.patch b/meta/recipes-devtools/opkg/opkg/0008-select_higher_version.patch
index 46d11b0872..a9b039c5a0 100644
--- a/meta/recipes-devtools/opkg/opkg/0008-select_higher_version.patch
+++ b/meta/recipes-devtools/opkg/opkg/0008-select_higher_version.patch
@@ -1,12 +1,9 @@
1Add the --select-higher-version option 1Add the --prefer-arch-to-version option
2 2
3If there were more than one candidate which had the same pkg name in the 3If there were more than one candidate which had the same pkg name in the
4candidate list, for example, the same pkg with different versions, then 4candidate list, for example, the same pkg with different versions, then
5it would use the last one which was the highest version one in the past, 5it would use the last one which was the highest version one in the past,
6but it will use the higher arch priority one now. 6but it will use the higher arch priority when this option is specified.
7
8Add the "--select-higher-version" option to let it use the higher
9version package when enabled. the default is no.
10 7
11Upstream-Status: Pending 8Upstream-Status: Pending
12 9
@@ -24,7 +21,7 @@ diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
24 int force_removal_of_essential_packages; 21 int force_removal_of_essential_packages;
25 int force_postinstall; 22 int force_postinstall;
26 int force_remove; 23 int force_remove;
27+ int select_higher_version; 24+ int prefer_arch_to_version;
28 int check_signature; 25 int check_signature;
29 int nodeps; /* do not follow dependencies */ 26 int nodeps; /* do not follow dependencies */
30 char *offline_root; 27 char *offline_root;
@@ -44,7 +41,7 @@ diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
44+ break; 41+ break;
45+ } 42+ }
46+ /* Respect to the arch priorities when given alternatives */ 43+ /* Respect to the arch priorities when given alternatives */
47+ if (good_pkg_by_name && !conf->select_higher_version) { 44+ if (good_pkg_by_name && conf->prefer_arch_to_version) {
48+ if (matching->arch_priority >= good_pkg_by_name->arch_priority) { 45+ if (matching->arch_priority >= good_pkg_by_name->arch_priority) {
49+ good_pkg_by_name = matching; 46+ good_pkg_by_name = matching;
50+ opkg_msg(DEBUG, "%s %s wins by priority.\n", 47+ opkg_msg(DEBUG, "%s %s wins by priority.\n",
@@ -64,7 +61,7 @@ diff --git a/src/opkg-cl.c b/src/opkg-cl.c
64 ARGS_OPT_FORCE_SPACE, 61 ARGS_OPT_FORCE_SPACE,
65 ARGS_OPT_FORCE_POSTINSTALL, 62 ARGS_OPT_FORCE_POSTINSTALL,
66 ARGS_OPT_FORCE_REMOVE, 63 ARGS_OPT_FORCE_REMOVE,
67+ ARGS_OPT_SELECT_HIGHER_VERSION, 64+ ARGS_OPT_PREFER_ARCH_TO_VERSION,
68 ARGS_OPT_ADD_ARCH, 65 ARGS_OPT_ADD_ARCH,
69 ARGS_OPT_ADD_DEST, 66 ARGS_OPT_ADD_DEST,
70 ARGS_OPT_NOACTION, 67 ARGS_OPT_NOACTION,
@@ -72,8 +69,8 @@ diff --git a/src/opkg-cl.c b/src/opkg-cl.c
72 {"force_postinstall", 0, 0, ARGS_OPT_FORCE_POSTINSTALL}, 69 {"force_postinstall", 0, 0, ARGS_OPT_FORCE_POSTINSTALL},
73 {"force-remove", 0, 0, ARGS_OPT_FORCE_REMOVE}, 70 {"force-remove", 0, 0, ARGS_OPT_FORCE_REMOVE},
74 {"force_remove", 0, 0, ARGS_OPT_FORCE_REMOVE}, 71 {"force_remove", 0, 0, ARGS_OPT_FORCE_REMOVE},
75+ {"select-higher-version", 0, 0, ARGS_OPT_SELECT_HIGHER_VERSION}, 72+ {"prefer-arch-to-version", 0, 0, ARGS_OPT_PREFER_ARCH_TO_VERSION},
76+ {"select_higher_version", 0, 0, ARGS_OPT_SELECT_HIGHER_VERSION}, 73+ {"prefer-arch-to-version", 0, 0, ARGS_OPT_PREFER_ARCH_TO_VERSION},
77 {"noaction", 0, 0, ARGS_OPT_NOACTION}, 74 {"noaction", 0, 0, ARGS_OPT_NOACTION},
78 {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY}, 75 {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
79 {"nodeps", 0, 0, ARGS_OPT_NODEPS}, 76 {"nodeps", 0, 0, ARGS_OPT_NODEPS},
@@ -81,8 +78,8 @@ diff --git a/src/opkg-cl.c b/src/opkg-cl.c
81 case ARGS_OPT_FORCE_REMOVE: 78 case ARGS_OPT_FORCE_REMOVE:
82 conf->force_remove = 1; 79 conf->force_remove = 1;
83 break; 80 break;
84+ case ARGS_OPT_SELECT_HIGHER_VERSION: 81+ case ARGS_OPT_PREFER_ARCH_TO_VERSION:
85+ conf->select_higher_version = 1; 82+ conf->prefer_arch_to_version = 1;
86+ break; 83+ break;
87 case ARGS_OPT_NODEPS: 84 case ARGS_OPT_NODEPS:
88 conf->nodeps = 1; 85 conf->nodeps = 1;
@@ -91,8 +88,8 @@ diff --git a/src/opkg-cl.c b/src/opkg-cl.c
91 printf("\t--offline-root <dir> offline installation of packages.\n"); 88 printf("\t--offline-root <dir> offline installation of packages.\n");
92 printf("\t--add-arch <arch>:<prio> Register architecture with given priority\n"); 89 printf("\t--add-arch <arch>:<prio> Register architecture with given priority\n");
93 printf("\t--add-dest <name>:<path> Register destination with given path\n"); 90 printf("\t--add-dest <name>:<path> Register destination with given path\n");
94+ printf("\t--select-higher-version\t Use the higher version package rather\n"); 91+ printf("\t--prefer-arch-to-version\t Use the architecture priority package rather\n");
95+ printf("\t than the higher arch priority one if more\n"); 92+ printf("\t than the higher version one if more\n");
96+ printf("\t than one candidate is found.\n"); 93+ printf("\t than one candidate is found.\n");
97 94
98 printf("\nForce Options:\n"); 95 printf("\nForce Options:\n");