summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package_ipk.bbclass2
-rw-r--r--meta/classes/rootfs_ipk.bbclass4
-rw-r--r--meta/recipes-devtools/opkg/opkg/0008-select_higher_version.patch25
-rw-r--r--meta/recipes-devtools/opkg/opkg_svn.bb2
4 files changed, 15 insertions, 18 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 019bd7cc19..4bf1b10aae 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -139,7 +139,7 @@ package_install_internal_ipk() {
139 139
140 mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/ 140 mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/
141 141
142 local ipkg_args="-f ${conffile} -o ${target_rootfs} --force-overwrite --force_postinstall" 142 local ipkg_args="-f ${conffile} -o ${target_rootfs} --force-overwrite --force_postinstall --prefer-arch-to-version"
143 143
144 opkg-cl ${ipkg_args} update 144 opkg-cl ${ipkg_args} update
145 145
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 46e8d60918..9d716fbe10 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -14,9 +14,9 @@ do_rootfs[recrdeptask] += "do_package_write_ipk"
14 14
15do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock" 15do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
16 16
17IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force-overwrite" 17IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force-overwrite --prefer-arch-to-version"
18# The _POST version also works when constructing the matching SDK 18# The _POST version also works when constructing the matching SDK
19IPKG_ARGS_POST = "-f ${IPKGCONF_TARGET} -o $INSTALL_ROOTFS_IPK --force-overwrite" 19IPKG_ARGS_POST = "-f ${IPKGCONF_TARGET} -o $INSTALL_ROOTFS_IPK --force-overwrite --prefer-arch-to-version"
20 20
21OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf" 21OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf"
22 22
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");
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 59bb2d94e2..4e83cfb3c0 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -19,4 +19,4 @@ S = "${WORKDIR}/trunk"
19SRCREV = "633" 19SRCREV = "633"
20PV = "0.1.8+svnr${SRCPV}" 20PV = "0.1.8+svnr${SRCPV}"
21 21
22PR = "${INC_PR}.6" 22PR = "${INC_PR}.7"