summaryrefslogtreecommitdiff
path: root/src/cmdline/cmdline_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmdline/cmdline_util.h')
-rw-r--r--src/cmdline/cmdline_util.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cmdline/cmdline_util.h b/src/cmdline/cmdline_util.h
index 9b88c393..b87daa1d 100644
--- a/src/cmdline/cmdline_util.h
+++ b/src/cmdline/cmdline_util.h
@@ -431,6 +431,26 @@ namespace aptitude
return std::wstring();
}
};
+
+ /** \brief Fill a pkgset using the given matching pattern.
+ *
+ * This does not try any string as a search pattern, only those
+ * which contain explicit search terms or regex characters.
+ */
+ bool pkgset_from_pattern(pkgset *packages, const string &pattern,
+ GlobalError::MsgType error_type = GlobalError::ERROR);
+
+ /** \brief Fill a pkgset using the given string. If the
+ * string names exactly a package then insert that package,
+ * otherwise, if the string is a search pattern, add all matching
+ * packages.
+ *
+ * Based on cacheset.cc(PackageContainerInterface::FromString).
+ * TODO: Should be replaced with cacheset functions once we have
+ * become more compatible with them.
+ */
+ bool pkgset_from_string(pkgset *packages, const string &str,
+ GlobalError::MsgType error_type = GlobalError::ERROR);
}
}