diff options
author | Alejandro del Castillo <alejandro.delcastillo@ni.com> | 2015-09-01 09:17:53 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-03 12:43:14 +0100 |
commit | d6b1171131656907d6bdbb9ce3115c444f06817e (patch) | |
tree | d9764b40ac128da99f79c2e45cfd7c370f5179e2 /meta | |
parent | ab50b1d11c28394b20b49242cc3481582a055bc8 (diff) | |
download | poky-d6b1171131656907d6bdbb9ce3115c444f06817e.tar.gz |
opkg: upgrade to v0.3.0
Changes required:
- Rename opkg-cl to opkg
- Add libarchive dependency
- Drop backport patches
- Drop obsolete directory options
- Add patch to handle empty index files
Based on initial work by Paul Barker.
(From OE-Core rev: 1dd2a9ea54f5a5497e23814f144f35ff15430d71)
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
CC: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/package_manager.py | 6 | ||||
-rwxr-xr-x | meta/recipes-devtools/installer/adt-installer/adt_installer | 2 | ||||
-rwxr-xr-x | meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal | 4 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch | 78 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/0001-opkg_archive-add-support-for-empty-compressed-files.patch | 64 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/add-exclude.patch | 131 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/no-install-recommends.patch | 91 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/opkg-configure.service | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch | 32 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_0.3.0.bb (renamed from meta/recipes-devtools/opkg/opkg_0.2.4.bb) | 26 | ||||
-rwxr-xr-x | meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 2 |
11 files changed, 79 insertions, 359 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index ef917f15b2..f5a22abca7 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -376,7 +376,7 @@ class OpkgPkgsList(PkgsList): | |||
376 | def __init__(self, d, rootfs_dir, config_file): | 376 | def __init__(self, d, rootfs_dir, config_file): |
377 | super(OpkgPkgsList, self).__init__(d, rootfs_dir) | 377 | super(OpkgPkgsList, self).__init__(d, rootfs_dir) |
378 | 378 | ||
379 | self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg-cl") | 379 | self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg") |
380 | self.opkg_args = "-f %s -o %s " % (config_file, rootfs_dir) | 380 | self.opkg_args = "-f %s -o %s " % (config_file, rootfs_dir) |
381 | self.opkg_args += self.d.getVar("OPKG_ARGS", True) | 381 | self.opkg_args += self.d.getVar("OPKG_ARGS", True) |
382 | 382 | ||
@@ -1229,8 +1229,8 @@ class OpkgPM(PackageManager): | |||
1229 | 1229 | ||
1230 | self.deploy_dir = self.d.getVar("DEPLOY_DIR_IPK", True) | 1230 | self.deploy_dir = self.d.getVar("DEPLOY_DIR_IPK", True) |
1231 | self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock") | 1231 | self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock") |
1232 | self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg-cl") | 1232 | self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg") |
1233 | self.opkg_args = "-f %s -o %s " % (self.config_file, target_rootfs) | 1233 | self.opkg_args = "--volatile-cache -f %s -o %s " % (self.config_file, target_rootfs) |
1234 | self.opkg_args += self.d.getVar("OPKG_ARGS", True) | 1234 | self.opkg_args += self.d.getVar("OPKG_ARGS", True) |
1235 | 1235 | ||
1236 | opkg_lib_dir = self.d.getVar('OPKGLIBDIR', True) | 1236 | opkg_lib_dir = self.d.getVar('OPKGLIBDIR', True) |
diff --git a/meta/recipes-devtools/installer/adt-installer/adt_installer b/meta/recipes-devtools/installer/adt-installer/adt_installer index 24db247910..3172de7bca 100755 --- a/meta/recipes-devtools/installer/adt-installer/adt_installer +++ b/meta/recipes-devtools/installer/adt-installer/adt_installer | |||
@@ -156,7 +156,7 @@ validate_config() | |||
156 | #this installed local opkg | 156 | #this installed local opkg |
157 | install_opkg() | 157 | install_opkg() |
158 | { | 158 | { |
159 | if [ ! -x "$LOCAL_OPKG_LOC/bin/opkg-cl" ]; then | 159 | if [ ! -x "$LOCAL_OPKG_LOC/bin/opkg" ]; then |
160 | echo_info "OPKG is not setup, setting up opkg in local, which is required for installing yocto ADT...\n" | 160 | echo_info "OPKG is not setup, setting up opkg in local, which is required for installing yocto ADT...\n" |
161 | 161 | ||
162 | if [ -d $LOCAL_OPKG_LOC ]; then | 162 | if [ -d $LOCAL_OPKG_LOC ]; then |
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal index 2a8a30ccdc..6f5fb49990 100755 --- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal +++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal | |||
@@ -124,9 +124,9 @@ fi | |||
124 | 124 | ||
125 | #first update repository | 125 | #first update repository |
126 | if [ "x$SUDO" = "x" ]; then | 126 | if [ "x$SUDO" = "x" ]; then |
127 | OPKG_CMD="$LOCAL_OPKG_LOC/bin/opkg-cl" | 127 | OPKG_CMD="$LOCAL_OPKG_LOC/bin/opkg" |
128 | else | 128 | else |
129 | OPKG_CMD="sudo -E $LOCAL_OPKG_LOC/bin/opkg-cl" | 129 | OPKG_CMD="sudo -E $LOCAL_OPKG_LOC/bin/opkg" |
130 | fi | 130 | fi |
131 | 131 | ||
132 | echo_info "Updating opkg..." | 132 | echo_info "Updating opkg..." |
diff --git a/meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch b/meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch deleted file mode 100644 index ae319ce2bb..0000000000 --- a/meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | From 87bec8300a1122829b2ed565db7da5bacfa88919 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Barker <paul@paulbarker.me.uk> | ||
3 | Date: Sun, 12 Oct 2014 09:59:53 +0000 | ||
4 | Subject: [PATCH] opkg-key: Backport improvements | ||
5 | |||
6 | The improvements to opkg-key made for v0.3.0 are backported. The rest of v0.3.0 | ||
7 | needs further testing and bugfixing prior to release, but the improvements to | ||
8 | opkg-key have been tested and work well. | ||
9 | |||
10 | 1) opkg-key: Add 'reset' option | ||
11 | |||
12 | This option removes the keyrings used to verify package signatures, | ||
13 | effectively resetting opkg to the initial state where it recognises no | ||
14 | keys. | ||
15 | |||
16 | 2) opkg-key: Add 'populate' option | ||
17 | |||
18 | This option causes all keyrings in /usr/share/opkg/keyrings to be | ||
19 | imported. Thus distributions may install their keys into this directory | ||
20 | and use 'opkg-key populate' to ensure the correct keys are loaded. | ||
21 | |||
22 | 3) opkg-key: Improve usage output | ||
23 | |||
24 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> | ||
25 | Upstream-status: Backport | ||
26 | --- | ||
27 | utils/opkg-key | 26 ++++++++++++++++++++++---- | ||
28 | 1 file changed, 22 insertions(+), 4 deletions(-) | ||
29 | |||
30 | diff --git a/utils/opkg-key b/utils/opkg-key | ||
31 | index 266bb66..085f1e8 100755 | ||
32 | --- a/utils/opkg-key | ||
33 | +++ b/utils/opkg-key | ||
34 | @@ -10,12 +10,17 @@ usage() { | ||
35 | echo | ||
36 | echo "Manage opkg's list of trusted keys" | ||
37 | echo | ||
38 | - echo " opkg-key add <file> - add the key contained in <file> ('-' for stdin)" | ||
39 | - echo " opkg-key del <keyid> - remove the key <keyid>" | ||
40 | - echo " opkg-key list - list keys" | ||
41 | + echo "Commands and arguments:" | ||
42 | + echo " add <file> - Add the key contained in <file> ('-' for stdin)" | ||
43 | + echo " del <keyid> - Remove the key <keyid>" | ||
44 | + echo " list - List keys" | ||
45 | + echo " fingerprint - List keys with fingerprints" | ||
46 | + echo " reset - Remove all keys, resetting the keyring" | ||
47 | + echo " populate - Import keys from /usr/share/opkg/keyrings" | ||
48 | + echo " help - Print this usage message and exit" | ||
49 | echo | ||
50 | echo "Options:" | ||
51 | - echo " -o <root> Use <root> as the offline root directory" | ||
52 | + echo " -o <root> - Use <root> as the offline root directory" | ||
53 | echo | ||
54 | } | ||
55 | |||
56 | @@ -64,6 +69,19 @@ case "$command" in | ||
57 | echo "Executing: $GPG $*" | ||
58 | $GPG $* | ||
59 | ;; | ||
60 | + reset) | ||
61 | + rm -f $ROOT/etc/opkg/trusted.gpg $ROOT/etc/opkg/trusted.gpg~ | ||
62 | + rm -f $ROOT/etc/opkg/secring.gpg $ROOT/etc/opkg/secring.gpg~ | ||
63 | + rm -f $ROOT/etc/opkg/trustdb.gpg $ROOT/etc/opkg/trustdb.gpg~ | ||
64 | + echo "OK" | ||
65 | + ;; | ||
66 | + populate) | ||
67 | + for f in $ROOT/usr/share/opkg/keyrings/*.gpg; do | ||
68 | + echo "Importing keys from '`basename $f`'..." | ||
69 | + $GPG --quiet --batch --import "$f" | ||
70 | + done | ||
71 | + echo "OK" | ||
72 | + ;; | ||
73 | help) | ||
74 | usage | ||
75 | ;; | ||
76 | -- | ||
77 | 1.9.1 | ||
78 | |||
diff --git a/meta/recipes-devtools/opkg/opkg/0001-opkg_archive-add-support-for-empty-compressed-files.patch b/meta/recipes-devtools/opkg/opkg/0001-opkg_archive-add-support-for-empty-compressed-files.patch new file mode 100644 index 0000000000..dabd196d2c --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg/0001-opkg_archive-add-support-for-empty-compressed-files.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From bd32bb8646459508bb0b0ce54a14bd6fe0e19b75 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
3 | Date: Thu, 27 Aug 2015 15:52:16 -0500 | ||
4 | Subject: [PATCH] opkg_archive: add support for empty compressed files | ||
5 | |||
6 | Regression from 0.2.x: opkg used to support empty Package.gz files. | ||
7 | |||
8 | Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
9 | |||
10 | Upstream-Status: Accepted | ||
11 | --- | ||
12 | libopkg/opkg_archive.c | 15 +++++++++++++-- | ||
13 | 1 file changed, 13 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c | ||
16 | index be903e4..7e91e48 100644 | ||
17 | --- a/libopkg/opkg_archive.c | ||
18 | +++ b/libopkg/opkg_archive.c | ||
19 | @@ -121,6 +121,9 @@ static int copy_to_stream(struct archive *a, FILE * stream) | ||
20 | int eof; | ||
21 | size_t len = EXTRACT_BUFFER_LEN; | ||
22 | |||
23 | + if (archive_format(a) == ARCHIVE_FORMAT_EMPTY) | ||
24 | + return 0; | ||
25 | + | ||
26 | buffer = xmalloc(len); | ||
27 | |||
28 | while (1) { | ||
29 | @@ -654,6 +657,13 @@ static struct archive *open_compressed_file(const char *filename) | ||
30 | goto err_cleanup; | ||
31 | } | ||
32 | |||
33 | + r = archive_read_support_format_empty(ar); | ||
34 | + if (r != ARCHIVE_OK) { | ||
35 | + opkg_msg(ERROR, "Empty format not supported: %s\n", | ||
36 | + archive_error_string(ar)); | ||
37 | + goto err_cleanup; | ||
38 | + } | ||
39 | + | ||
40 | /* Open input file and prepare for reading. */ | ||
41 | r = archive_read_open_filename(ar, filename, EXTRACT_BUFFER_LEN); | ||
42 | if (r != ARCHIVE_OK) { | ||
43 | @@ -723,6 +733,7 @@ struct opkg_ar *ar_open_compressed_file(const char *filename) | ||
44 | { | ||
45 | struct opkg_ar *ar; | ||
46 | struct archive_entry *entry; | ||
47 | + int eof; | ||
48 | |||
49 | ar = (struct opkg_ar *)xmalloc(sizeof(struct opkg_ar)); | ||
50 | |||
51 | @@ -737,8 +748,8 @@ struct opkg_ar *ar_open_compressed_file(const char *filename) | ||
52 | * header. We skip over this header here so that the caller doesn't need | ||
53 | * to know about it. | ||
54 | */ | ||
55 | - entry = read_header(ar->ar, NULL); | ||
56 | - if (!entry) | ||
57 | + entry = read_header(ar->ar, &eof); | ||
58 | + if (!entry && !eof) | ||
59 | goto err_cleanup; | ||
60 | |||
61 | return ar; | ||
62 | -- | ||
63 | 1.9.1 | ||
64 | |||
diff --git a/meta/recipes-devtools/opkg/opkg/add-exclude.patch b/meta/recipes-devtools/opkg/opkg/add-exclude.patch deleted file mode 100644 index 48de923590..0000000000 --- a/meta/recipes-devtools/opkg/opkg/add-exclude.patch +++ /dev/null | |||
@@ -1,131 +0,0 @@ | |||
1 | From 60c3f93e95a3ca54ef0a7eebc5ef29a5d92d3110 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Barker <paul@paulbarker.me.uk> | ||
3 | Date: Fri, 28 Mar 2014 15:20:22 +0000 | ||
4 | Subject: [PATCH 2/2] opkg-0.2.x: add-exclude | ||
5 | |||
6 | Add a way to exclude specific packages from the install | ||
7 | |||
8 | When an excluded package is required by another package an error | ||
9 | will be generated. If the excluded package is only recommended, | ||
10 | no error will be generated. | ||
11 | |||
12 | The lifespan of the exclude_list covers the execution of the process, | ||
13 | so there is no need to free the data. | ||
14 | |||
15 | v2: Use xmalloc instead of malloc and xrealloc instead of realloc. In opkg, | ||
16 | these functions are guaranteed not to return NULL. | ||
17 | |||
18 | Upstream-Status: Accepted for v0.3.0 release with modifications | ||
19 | |||
20 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
21 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
22 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> | ||
23 | --- | ||
24 | libopkg/opkg_conf.c | 1 + | ||
25 | libopkg/opkg_conf.h | 2 ++ | ||
26 | libopkg/pkg_depends.c | 16 ++++++++++++++++ | ||
27 | src/opkg-cl.c | 15 +++++++++++++++ | ||
28 | 4 files changed, 34 insertions(+) | ||
29 | |||
30 | diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c | ||
31 | index 4eee37b..1ab63fb 100644 | ||
32 | --- a/libopkg/opkg_conf.c | ||
33 | +++ b/libopkg/opkg_conf.c | ||
34 | @@ -447,6 +447,7 @@ opkg_conf_init(void) | ||
35 | pkg_dest_list_init(&conf->pkg_dest_list); | ||
36 | pkg_dest_list_init(&conf->tmp_dest_list); | ||
37 | nv_pair_list_init(&conf->arch_list); | ||
38 | + conf->exclude_list = NULL; | ||
39 | |||
40 | return 0; | ||
41 | } | ||
42 | diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h | ||
43 | index 2f189e0..6d6e613 100644 | ||
44 | --- a/libopkg/opkg_conf.h | ||
45 | +++ b/libopkg/opkg_conf.h | ||
46 | @@ -51,6 +51,8 @@ struct opkg_conf | ||
47 | pkg_dest_list_t pkg_dest_list; | ||
48 | pkg_dest_list_t tmp_dest_list; | ||
49 | nv_pair_list_t arch_list; | ||
50 | + size_t exclude_count; | ||
51 | + char ** exclude_list; | ||
52 | |||
53 | int restrict_to_default_dest; | ||
54 | pkg_dest_t *default_dest; | ||
55 | diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c | ||
56 | index 41bf206..eb630d1 100644 | ||
57 | --- a/libopkg/pkg_depends.c | ||
58 | +++ b/libopkg/pkg_depends.c | ||
59 | @@ -204,6 +204,22 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied, | ||
60 | continue; | ||
61 | } | ||
62 | |||
63 | + /* Check for excluded packages */ | ||
64 | + if (satisfying_pkg != NULL && conf->exclude_list) { | ||
65 | + int i, exclude = 0; | ||
66 | + for (i = 0; i < conf->exclude_count; i++) { | ||
67 | + if (!strcmp(satisfying_pkg->name, conf->exclude_list[i])) { | ||
68 | + opkg_msg(NOTICE, "%s: exclude required package %s" | ||
69 | + "at users request\n", | ||
70 | + pkg->name, satisfying_pkg->name); | ||
71 | + exclude = 1; | ||
72 | + break; | ||
73 | + } | ||
74 | + } | ||
75 | + if (exclude) | ||
76 | + continue; | ||
77 | + } | ||
78 | + | ||
79 | opkg_msg(DEBUG, "satisfying_pkg=%p\n", satisfying_pkg); | ||
80 | if (satisfying_pkg != NULL) { | ||
81 | satisfier_entry_pkg = satisfying_pkg; | ||
82 | diff --git a/src/opkg-cl.c b/src/opkg-cl.c | ||
83 | index 6378380..f10d10b 100644 | ||
84 | --- a/src/opkg-cl.c | ||
85 | +++ b/src/opkg-cl.c | ||
86 | @@ -45,6 +45,7 @@ enum { | ||
87 | ARGS_OPT_PREFER_ARCH_TO_VERSION, | ||
88 | ARGS_OPT_ADD_ARCH, | ||
89 | ARGS_OPT_ADD_DEST, | ||
90 | + ARGS_OPT_ADD_EXCLUDE, | ||
91 | ARGS_OPT_NOACTION, | ||
92 | ARGS_OPT_DOWNLOAD_ONLY, | ||
93 | ARGS_OPT_NODEPS, | ||
94 | @@ -97,6 +98,7 @@ static struct option long_options[] = { | ||
95 | {"offline-root", 1, 0, 'o'}, | ||
96 | {"add-arch", 1, 0, ARGS_OPT_ADD_ARCH}, | ||
97 | {"add-dest", 1, 0, ARGS_OPT_ADD_DEST}, | ||
98 | + {"add-exclude", 1, 0, ARGS_OPT_ADD_EXCLUDE}, | ||
99 | {"test", 0, 0, ARGS_OPT_NOACTION}, | ||
100 | {"tmp-dir", 1, 0, 't'}, | ||
101 | {"tmp_dir", 1, 0, 't'}, | ||
102 | @@ -200,6 +202,18 @@ args_parse(int argc, char *argv[]) | ||
103 | } | ||
104 | free(tuple); | ||
105 | break; | ||
106 | + case ARGS_OPT_ADD_EXCLUDE: | ||
107 | + tuple = xstrdup(optarg); | ||
108 | + if (!conf->exclude_list) { | ||
109 | + conf->exclude_count = 1; | ||
110 | + conf->exclude_list = xmalloc(sizeof(char *) * conf->exclude_count); | ||
111 | + conf->exclude_list[conf->exclude_count - 1] = tuple; | ||
112 | + } else { | ||
113 | + conf->exclude_count++; | ||
114 | + conf->exclude_list = xrealloc(conf->exclude_list, sizeof(char *) * conf->exclude_count); | ||
115 | + conf->exclude_list[conf->exclude_count - 1] = tuple; | ||
116 | + } | ||
117 | + break; | ||
118 | case ARGS_OPT_NOACTION: | ||
119 | conf->noaction = 1; | ||
120 | break; | ||
121 | @@ -287,6 +301,7 @@ usage() | ||
122 | printf("\t--offline-root <dir> offline installation of packages.\n"); | ||
123 | printf("\t--add-arch <arch>:<prio> Register architecture with given priority\n"); | ||
124 | printf("\t--add-dest <name>:<path> Register destination with given path\n"); | ||
125 | + printf("\t--add-exclude <name> Register package to be excluded from install\n"); | ||
126 | printf("\t--prefer-arch-to-version Use the architecture priority package rather\n"); | ||
127 | printf("\t than the higher version one if more\n"); | ||
128 | printf("\t than one candidate is found.\n"); | ||
129 | -- | ||
130 | 2.1.3 | ||
131 | |||
diff --git a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch deleted file mode 100644 index c2d244d26e..0000000000 --- a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | From 2e2ccc7e7fc81a7eee2d004d3644efbc1be1ad73 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Barker <paul@paulbarker.me.uk> | ||
3 | Date: Fri, 28 Mar 2014 15:19:08 +0000 | ||
4 | Subject: [PATCH 1/2] opkg-0.2.x: no-install-recommends | ||
5 | |||
6 | Add the ability to not install ANY recommended packages. | ||
7 | |||
8 | Upstream-Status: Accepted for v0.3.0 release with modifications | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
11 | --- | ||
12 | libopkg/opkg_conf.h | 1 + | ||
13 | libopkg/pkg_depends.c | 3 ++- | ||
14 | src/opkg-cl.c | 7 +++++++ | ||
15 | 3 files changed, 10 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h | ||
18 | index e0e045a..2f189e0 100644 | ||
19 | --- a/libopkg/opkg_conf.h | ||
20 | +++ b/libopkg/opkg_conf.h | ||
21 | @@ -82,6 +82,7 @@ struct opkg_conf | ||
22 | int prefer_arch_to_version; | ||
23 | int check_signature; | ||
24 | int nodeps; /* do not follow dependencies */ | ||
25 | + int noinstall_recommends; | ||
26 | char *offline_root; | ||
27 | char *overlay_root; | ||
28 | int query_all; | ||
29 | diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c | ||
30 | index 8ab6508..41bf206 100644 | ||
31 | --- a/libopkg/pkg_depends.c | ||
32 | +++ b/libopkg/pkg_depends.c | ||
33 | @@ -21,6 +21,7 @@ | ||
34 | #include <ctype.h> | ||
35 | |||
36 | #include "pkg.h" | ||
37 | +#include "opkg_conf.h" | ||
38 | #include "opkg_utils.h" | ||
39 | #include "pkg_hash.h" | ||
40 | #include "opkg_message.h" | ||
41 | @@ -196,7 +197,7 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied, | ||
42 | /* user request overrides package recommendation */ | ||
43 | if (satisfying_pkg != NULL | ||
44 | && (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST) | ||
45 | - && (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE)) { | ||
46 | + && (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE || conf->noinstall_recommends)) { | ||
47 | opkg_msg(NOTICE, "%s: ignoring recommendation for " | ||
48 | "%s at user request\n", | ||
49 | pkg->name, satisfying_pkg->name); | ||
50 | diff --git a/src/opkg-cl.c b/src/opkg-cl.c | ||
51 | index a1d121f..6378380 100644 | ||
52 | --- a/src/opkg-cl.c | ||
53 | +++ b/src/opkg-cl.c | ||
54 | @@ -51,6 +51,7 @@ enum { | ||
55 | ARGS_OPT_AUTOREMOVE, | ||
56 | ARGS_OPT_CACHE, | ||
57 | ARGS_OPT_COMBINE, | ||
58 | + ARGS_OPT_NOINSTALL_RECOMMENDS, | ||
59 | }; | ||
60 | |||
61 | static struct option long_options[] = { | ||
62 | @@ -91,6 +92,7 @@ static struct option long_options[] = { | ||
63 | {"noaction", 0, 0, ARGS_OPT_NOACTION}, | ||
64 | {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY}, | ||
65 | {"nodeps", 0, 0, ARGS_OPT_NODEPS}, | ||
66 | + {"no-install-recommends", 0, 0, ARGS_OPT_NOINSTALL_RECOMMENDS}, | ||
67 | {"offline", 1, 0, 'o'}, | ||
68 | {"offline-root", 1, 0, 'o'}, | ||
69 | {"add-arch", 1, 0, ARGS_OPT_ADD_ARCH}, | ||
70 | @@ -201,6 +203,9 @@ args_parse(int argc, char *argv[]) | ||
71 | case ARGS_OPT_NOACTION: | ||
72 | conf->noaction = 1; | ||
73 | break; | ||
74 | + case ARGS_OPT_NOINSTALL_RECOMMENDS: | ||
75 | + conf->noinstall_recommends = 1; | ||
76 | + break; | ||
77 | case ARGS_OPT_DOWNLOAD_ONLY: | ||
78 | conf->download_only = 1; | ||
79 | break; | ||
80 | @@ -300,6 +305,8 @@ usage() | ||
81 | printf("\t--noaction No action -- test only\n"); | ||
82 | printf("\t--download-only No action -- download only\n"); | ||
83 | printf("\t--nodeps Do not follow dependencies\n"); | ||
84 | + printf("\t--no-install-recommends\n"); | ||
85 | + printf("\t Do not install any recommended packages\n"); | ||
86 | printf("\t--force-removal-of-dependent-packages\n"); | ||
87 | printf("\t Remove package and all dependencies\n"); | ||
88 | printf("\t--autoremove Remove packages that were installed\n"); | ||
89 | -- | ||
90 | 2.1.3 | ||
91 | |||
diff --git a/meta/recipes-devtools/opkg/opkg/opkg-configure.service b/meta/recipes-devtools/opkg/opkg/opkg-configure.service index b18295b45e..8e74026ec2 100644 --- a/meta/recipes-devtools/opkg/opkg/opkg-configure.service +++ b/meta/recipes-devtools/opkg/opkg/opkg-configure.service | |||
@@ -7,7 +7,7 @@ Before=sysinit.target | |||
7 | [Service] | 7 | [Service] |
8 | Type=oneshot | 8 | Type=oneshot |
9 | EnvironmentFile=-@SYSCONFDIR@/default/postinst | 9 | EnvironmentFile=-@SYSCONFDIR@/default/postinst |
10 | ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/opkg-cl configure > $LOGFILE 2>&1; else @BINDIR@/opkg-cl configure; fi" | 10 | ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/opkg configure > $LOGFILE 2>&1; else @BINDIR@/opkg configure; fi" |
11 | ExecStartPost=@BASE_BINDIR@/systemctl disable opkg-configure.service | 11 | ExecStartPost=@BASE_BINDIR@/systemctl disable opkg-configure.service |
12 | StandardOutput=syslog | 12 | StandardOutput=syslog |
13 | RemainAfterExit=No | 13 | RemainAfterExit=No |
diff --git a/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch b/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch deleted file mode 100644 index 8bde02af0d..0000000000 --- a/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From d480d837ff57e855d1cf0b63054d6b1ad7aaf2ee Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Tue, 6 Jan 2015 17:54:43 -0800 | ||
4 | Subject: [PATCH] Makefile.am: remove ACLOCAL_AMFLAGS = -I shave -I m4 | ||
5 | |||
6 | Fixed: | ||
7 | libtoolize: error: AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL_AMFLAGS=-I shave. | ||
8 | |||
9 | They are already included by configure.ac: | ||
10 | AC_CONFIG_MACRO_DIR([m4]) | ||
11 | AC_CONFIG_MACRO_DIR([shave]) | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
16 | --- | ||
17 | Makefile.am | 2 -- | ||
18 | 1 file changed, 2 deletions(-) | ||
19 | |||
20 | diff --git a/Makefile.am b/Makefile.am | ||
21 | index 8baa62c..6679f77 100644 | ||
22 | --- a/Makefile.am | ||
23 | +++ b/Makefile.am | ||
24 | @@ -1,5 +1,3 @@ | ||
25 | -ACLOCAL_AMFLAGS = -I shave -I m4 | ||
26 | - | ||
27 | SUBDIRS = libbb libopkg src tests utils man | ||
28 | |||
29 | |||
30 | -- | ||
31 | 1.7.9.5 | ||
32 | |||
diff --git a/meta/recipes-devtools/opkg/opkg_0.2.4.bb b/meta/recipes-devtools/opkg/opkg_0.3.0.bb index b7574e538e..f4dbb2dd4d 100644 --- a/meta/recipes-devtools/opkg/opkg_0.2.4.bb +++ b/meta/recipes-devtools/opkg/opkg_0.3.0.bb | |||
@@ -5,21 +5,20 @@ HOMEPAGE = "http://code.google.com/p/opkg/" | |||
5 | BUGTRACKER = "http://code.google.com/p/opkg/issues/list" | 5 | BUGTRACKER = "http://code.google.com/p/opkg/issues/list" |
6 | LICENSE = "GPLv2+" | 6 | LICENSE = "GPLv2+" |
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ |
8 | file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba" | 8 | file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0" |
9 | |||
10 | DEPENDS = "libarchive" | ||
9 | 11 | ||
10 | PE = "1" | 12 | PE = "1" |
11 | 13 | ||
12 | SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ | 14 | SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ |
13 | file://no-install-recommends.patch \ | ||
14 | file://add-exclude.patch \ | ||
15 | file://remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch \ | ||
16 | file://opkg-configure.service \ | 15 | file://opkg-configure.service \ |
17 | file://opkg.conf \ | 16 | file://opkg.conf \ |
18 | file://0001-opkg-key-Backport-improvements.patch \ | 17 | file://0001-opkg_archive-add-support-for-empty-compressed-files.patch \ |
19 | " | 18 | " |
20 | 19 | ||
21 | SRC_URI[md5sum] = "40ed2aee15abc8d550539449630091bd" | 20 | SRC_URI[md5sum] = "3412cdc71d78b98facc84b19331ec64e" |
22 | SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015453086" | 21 | SRC_URI[sha256sum] = "7f735d1cdb8ef3718fb0f9fba44ca0d9a5c90d3a7f014f37a6d2f9474f54988f" |
23 | 22 | ||
24 | inherit autotools pkgconfig systemd | 23 | inherit autotools pkgconfig systemd |
25 | 24 | ||
@@ -37,11 +36,6 @@ PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | |||
37 | PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" | 36 | PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" |
38 | PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder" | 37 | PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder" |
39 | 38 | ||
40 | EXTRA_OECONF = "\ | ||
41 | --with-opkgetcdir=${sysconfdir} \ | ||
42 | --with-opkglibdir=${OPKGLIBDIR} \ | ||
43 | " | ||
44 | |||
45 | do_install_append () { | 39 | do_install_append () { |
46 | install -d ${D}${sysconfdir}/opkg | 40 | install -d ${D}${sysconfdir}/opkg |
47 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf | 41 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf |
@@ -59,15 +53,9 @@ do_install_append () { | |||
59 | -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \ | 53 | -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \ |
60 | ${D}${systemd_unitdir}/system/opkg-configure.service | 54 | ${D}${systemd_unitdir}/system/opkg-configure.service |
61 | fi | 55 | fi |
62 | |||
63 | # The installed binary is 'opkg-cl' but people and scripts often expect | ||
64 | # it to just be 'opkg' | ||
65 | ln -sf opkg-cl ${D}${bindir}/opkg | ||
66 | |||
67 | rm ${D}${bindir}/update-alternatives | ||
68 | } | 56 | } |
69 | 57 | ||
70 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts" | 58 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive" |
71 | RDEPENDS_${PN}_class-native = "" | 59 | RDEPENDS_${PN}_class-native = "" |
72 | RDEPENDS_${PN}_class-nativesdk = "" | 60 | RDEPENDS_${PN}_class-nativesdk = "" |
73 | RREPLACES_${PN} = "opkg-nogpg opkg-collateral" | 61 | RREPLACES_${PN} = "opkg-nogpg opkg-collateral" |
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts index 58ea85e114..53a8e1db0a 100755 --- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | |||
@@ -73,7 +73,7 @@ remove_pi_dir=1 | |||
73 | if $pm_installed; then | 73 | if $pm_installed; then |
74 | case $pm in | 74 | case $pm in |
75 | "ipk") | 75 | "ipk") |
76 | eval opkg-cl configure $append_log | 76 | eval opkg configure $append_log |
77 | ;; | 77 | ;; |
78 | 78 | ||
79 | "deb") | 79 | "deb") |