summaryrefslogtreecommitdiff
path: root/src/cmdline/cmdline_util.h
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-06-08 01:22:03 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-06-16 13:48:54 +0800
commitd082e98fcf8d2809fd89d3bc2c3002f5e2e1f5a3 (patch)
treee2f728603afb6bc787e31c92b68d4cd3c5b63cef /src/cmdline/cmdline_util.h
parent6143ba98cf6c98a492e0fe9b247d42a2f95e4167 (diff)
downloadaptitude-d082e98fcf8d2809fd89d3bc2c3002f5e2e1f5a3.tar.gz
Use apt's CommandLine parser
Previously aptitude was using it's own command line parser implemented on top of getopt. Replacing this with the standard apt class means there are no longer subtle quirks with our parser (such as "-qq" not being valid, when it is fine for other apt programs). The parser is closely tied to the Configuration, and reads options directly in to the global apt config. Some options were tracked independently of the global config; this change is the first part rectifying that situation. The goal is to keep all program options, configuration state, etc. in the global config rather than passing state variables between functions. Many options which previously did not have an associated configuration item now do; some remain undocumented for now as they are transitional. * handle "-qq" like other apt-utils * properly process all -o command line options (Closes: #587671) * unknown command line options trigger an error (Closes: #434502) * --add-user-tag-to, --remove-user-tag-from are working; no bug reports suggests that noone has noticed they were broken New aliases for some command-line options: --yes, for --assume-yes (apt-get) --default-release, for --target-release (apt-utils) --install-on-startup, for -i --update-on-startup, for -u New configuration item: Aptitude::CmdLine::Sorting, equivalent to --sort Other new configuration items are for internal use only at this point. Closes: #587671 Closes: #434502
Diffstat (limited to 'src/cmdline/cmdline_util.h')
-rw-r--r--src/cmdline/cmdline_util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cmdline/cmdline_util.h b/src/cmdline/cmdline_util.h
index e11722a4..2e10b005 100644
--- a/src/cmdline/cmdline_util.h
+++ b/src/cmdline/cmdline_util.h
@@ -222,6 +222,17 @@ namespace aptitude
get_pattern() const { return pattern; }
};
+ /** \brief Read user-tag application requests from a configuration tree.
+ *
+ * \param user_tags The vector to which the applications will be added.
+ * \param config_item Name of the configuration item tree to read from.
+ * \param is_add \b true if these are add requests.
+ * \param implicit \b true if these are implicit requests.
+ */
+ bool read_user_tag_applications(std::vector<tag_application> &user_tags,
+ const char *config_item,
+ const bool is_add, const bool implicit);
+
/** \brief Apply explicit and implicit user-tags to packages.
*
* Explicit tags are applied where their associated pattern holds;