diff options
author | pixdamix@gmail.com <pixdamix@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2012-11-22 04:18:13 (EST) |
---|---|---|
committer | pixdamix@gmail.com <pixdamix@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2012-11-22 04:18:13 (EST) |
commit | 15f255915ce893750165c89af9d1ebbbc571a8dc (patch) | |
tree | 6b2a4e8bf8572fab6e57a6f9062638c3dbb83168 /src | |
parent | 2ba1bc82c6dd55d6ad3903d7b9f25861f1b42ef8 (diff) |
Add the --prefer-arch-to-version option
If there were more than one candidate which had the same pkg name in the
candidate list, for example, the same pkg with different versions, then
it would use the last one which was the highest version one in the past,
but it will use the higher arch priority when this option is specified.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
git-svn-id: http://opkg.googlecode.com/svn/trunk@643 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'src')
-rw-r--r-- | src/opkg-cl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/opkg-cl.c b/src/opkg-cl.c index 1b927e5..0073847 100644 --- a/src/opkg-cl.c +++ b/src/opkg-cl.c @@ -42,6 +42,7 @@ enum { ARGS_OPT_FORCE_SPACE, ARGS_OPT_FORCE_POSTINSTALL, ARGS_OPT_FORCE_REMOVE, + ARGS_OPT_PREFER_ARCH_TO_VERSION, ARGS_OPT_ADD_ARCH, ARGS_OPT_ADD_DEST, ARGS_OPT_NOACTION, @@ -83,6 +84,8 @@ static struct option long_options[] = { {"force_postinstall", 0, 0, ARGS_OPT_FORCE_POSTINSTALL}, {"force-remove", 0, 0, ARGS_OPT_FORCE_REMOVE}, {"force_remove", 0, 0, ARGS_OPT_FORCE_REMOVE}, + {"prefer-arch-to-version", 0, 0, ARGS_OPT_PREFER_ARCH_TO_VERSION}, + {"prefer-arch-to-version", 0, 0, ARGS_OPT_PREFER_ARCH_TO_VERSION}, {"noaction", 0, 0, ARGS_OPT_NOACTION}, {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY}, {"nodeps", 0, 0, ARGS_OPT_NODEPS}, @@ -173,6 +176,9 @@ args_parse(int argc, char *argv[]) case ARGS_OPT_FORCE_REMOVE: conf->force_remove = 1; break; + case ARGS_OPT_PREFER_ARCH_TO_VERSION: + conf->prefer_arch_to_version = 1; + break; case ARGS_OPT_NODEPS: conf->nodeps = 1; break; @@ -271,6 +277,9 @@ usage() printf("\t--offline-root <dir> offline installation of packages.\n"); printf("\t--add-arch <arch>:<prio> Register architecture with given priority\n"); printf("\t--add-dest <name>:<path> Register destination with given path\n"); + printf("\t--prefer-arch-to-version\t Use the architecture priority package rather\n"); + printf("\t than the higher version one if more\n"); + printf("\t than one candidate is found.\n"); printf("\nForce Options:\n"); printf("\t--force-depends Install/remove despite failed dependencies\n"); |