diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-02 14:07:36 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-02 17:10:33 +0100 |
commit | 34bd4e17437e275a2b466cfd2bafec5fb283797d (patch) | |
tree | bc6321cdf6b45a21b8bf0673b2dd8dbb036329ad /meta/recipes-devtools/opkg | |
parent | cbddb898c2dc6fe78780dfc337f9d3aad9205bc7 (diff) | |
download | poky-34bd4e17437e275a2b466cfd2bafec5fb283797d.tar.gz |
opkg: Convert select-higher-version option to prefer-arch-to-version
This converts the option to maintain the existing behaviour unless the option is
specified. We do specify the option during the builds themselves to ensure what
the users expects is built.
(From OE-Core rev: 0cc479699fe885049625d54c712b500c1b719e75)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/opkg')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/0008-select_higher_version.patch | 25 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_svn.bb | 2 |
2 files changed, 12 insertions, 15 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 @@ | |||
1 | Add the --select-higher-version option | 1 | Add the --prefer-arch-to-version option |
2 | 2 | ||
3 | If there were more than one candidate which had the same pkg name in the | 3 | If there were more than one candidate which had the same pkg name in the |
4 | candidate list, for example, the same pkg with different versions, then | 4 | candidate list, for example, the same pkg with different versions, then |
5 | it would use the last one which was the highest version one in the past, | 5 | it would use the last one which was the highest version one in the past, |
6 | but it will use the higher arch priority one now. | 6 | but it will use the higher arch priority when this option is specified. |
7 | |||
8 | Add the "--select-higher-version" option to let it use the higher | ||
9 | version package when enabled. the default is no. | ||
10 | 7 | ||
11 | Upstream-Status: Pending | 8 | Upstream-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" | |||
19 | SRCREV = "633" | 19 | SRCREV = "633" |
20 | PV = "0.1.8+svnr${SRCPV}" | 20 | PV = "0.1.8+svnr${SRCPV}" |
21 | 21 | ||
22 | PR = "${INC_PR}.6" | 22 | PR = "${INC_PR}.7" |