diff options
-rw-r--r-- | misc/Makefile.am | 3 | ||||
-rwxr-xr-x | misc/make_se.bash | 132 | ||||
-rw-r--r-- | paludis/dep_list/Makefile.am | 25 | ||||
-rw-r--r-- | paludis/dep_list/options.cc | 463 | ||||
-rw-r--r-- | paludis/dep_list/options.hh | 324 | ||||
-rw-r--r-- | paludis/dep_list/options.se | 275 |
6 files changed, 429 insertions, 793 deletions
diff --git a/misc/Makefile.am b/misc/Makefile.am index 5da8fdaa0..b4fad58c9 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -1,6 +1,7 @@ CLEANFILES = *~ MAINTAINERCLEANFILES = Makefile.in svn-version-filter-data.bash -EXTRA_DIST = generated-file.txt svn-version-filter.bash svn-version-filter-data.bash.in do_m4.bash make_sr.bash +EXTRA_DIST = generated-file.txt svn-version-filter.bash svn-version-filter-data.bash.in \ + do_m4.bash make_sr.bash make_se.bash built-sources : $(BUILT_SOURCES) for s in $(SUBDIRS) ; do $(MAKE) -C $$s built-sources || exit 1 ; done diff --git a/misc/make_se.bash b/misc/make_se.bash new file mode 100755 index 000000000..753e9856f --- /dev/null +++ b/misc/make_se.bash @@ -0,0 +1,132 @@ +#!/bin/bash +# vim: set sw=4 sts=4 et tw=0 : + +echo -n "/* vim" +echo ": set ro : */" +echo +echo "/* ******************************************************** */" +echo "/* THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY */" +echo "/* ******************************************************** */" +echo + +what_to_make=${1} +shift + +for src in ${@} ; do + if ! source ${src} ; then + echo "source ${src} failed" 1>&2 + exit 7 + fi +done + +set | grep '^make_enum_.*() $' | sort -r | \ +while read a ; do + a=${a##make_enum_} + a=${a%% *} + + want_keys=( ) + want_key_descriptions=( ) + want_prefix_key= + want_namespace=paludis + + key() + { + want_keys=( "${want_keys[@]}" "$1" ) + want_key_descriptions=( "${want_key_descriptions[@]}" "$2" ) + } + + prefix() + { + want_prefix_key=$1 + } + + namespace() + { + want_namespace=$1 + } + + doxygen_comment() + { + : + } + + make_enum_${a} + if [[ -z "${want_prefix_key}" ]] ; then + echo "no prefix key set for ${a}" 1>&2 + exit 1 + fi + + key() + { + : + } + + prefix() + { + : + } + + namespace() + { + : + } + + if [[ "${what_to_make}" == "--header" ]] ; then + + doxygen_comment() + { + cat + } + + make_enum_${a} + + echo "enum ${a}" + echo "{" + + for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do + echo " ${want_keys[${k}]}, ///< ${want_key_descriptions[${k}]}" + done + + echo " last_${want_prefix_key}" + + echo "};" + + echo + echo "std::ostream &" + echo "operator<< (std::ostream &, const $a &);" + echo + + elif [[ "${what_to_make}" == "--source" ]] ; then + + echo "std::ostream &" + echo "${want_namespace}::operator<< (std::ostream & o, const ${a} & s)" + echo "{" + echo " do" + echo " {" + echo " switch (s)" + echo " {" + + for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do + echo " case ${want_keys[${k}]}:" + echo " o << \"${want_keys[${k}]#${want_prefix_key}_}\";"; + echo " continue;" + echo + done + + echo " case last_${want_prefix_key}:" + echo " ;" + echo " }" + echo " throw InternalError(PALUDIS_HERE, \"Bad ${a} value '\" + paludis::stringify(" + echo " static_cast<int>(s)));" + echo " } while (false);" + echo + echo " return o;" + echo "}" + echo + + else + echo "bad argument (expected --header or --source)" 1>&2 + exit 1 + fi +done + diff --git a/paludis/dep_list/Makefile.am b/paludis/dep_list/Makefile.am index 5fb8b023a..c20a8e2b1 100644 --- a/paludis/dep_list/Makefile.am +++ b/paludis/dep_list/Makefile.am @@ -1,5 +1,8 @@ CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda -DISTCLEANFILES = dep_list-sr.hh dep_list-sr.cc uninstall_list-sr.hh uninstall_list-sr.cc +DISTCLEANFILES = \ + dep_list-sr.hh dep_list-sr.cc \ + uninstall_list-sr.hh uninstall_list-sr.cc \ + options-se.hh options-se.cc BUILT_SOURCES = $(DISTCLEANFILES) MAINTAINERCLEANFILES = Makefile.in @@ -18,7 +21,8 @@ paludis_dep_list_include_HEADERS = \ options.hh \ dep_list-sr.hh \ uninstall_list-sr.hh \ - range_rewriter.hh + range_rewriter.hh \ + options-se.hh libpaludisdeplist_la_SOURCES = \ options.cc options.hh \ @@ -54,7 +58,8 @@ EXTRA_DIST = \ uninstall_list_TEST.cc \ range_rewriter_TEST.cc \ dep_list.sr dep_list-sr.hh dep_list-sr.cc \ - uninstall_list.sr uninstall_list-sr.hh uninstall_list-sr.cc + uninstall_list.sr uninstall_list-sr.hh uninstall_list-sr.cc \ + options.se options-se.hh options-se.cc TESTS = \ dep_list_TEST \ @@ -116,14 +121,20 @@ built-sources : $(BUILT_SOURCES) for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done dep_list-sr.hh : dep_list.sr $(top_srcdir)/misc/make_sr.bash - $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/dep_list.sr > $@ + if ! $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/dep_list.sr > $@ ; then rm -f $@ ; exit 1 ; fi dep_list-sr.cc : dep_list.sr $(top_srcdir)/misc/make_sr.bash - $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/dep_list.sr > $@ + if ! $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/dep_list.sr > $@ ; then rm -f $@ ; exit 1 ; fi uninstall_list-sr.hh : uninstall_list.sr $(top_srcdir)/misc/make_sr.bash - $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/uninstall_list.sr > $@ + if ! $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/uninstall_list.sr > $@ ; then rm -f $@ ; exit 1 ; fi uninstall_list-sr.cc : uninstall_list.sr $(top_srcdir)/misc/make_sr.bash - $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/uninstall_list.sr > $@ + if ! $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/uninstall_list.sr > $@ ; then rm -f $@ ; exit 1 ; fi + +options-se.hh : options.se $(top_srcdir)/misc/make_se.bash + if ! $(top_srcdir)/misc/make_se.bash --header $(srcdir)/options.se > $@ ; then rm -f $@ ; exit 1 ; fi + +options-se.cc : options.se $(top_srcdir)/misc/make_se.bash + if ! $(top_srcdir)/misc/make_se.bash --source $(srcdir)/options.se > $@ ; then rm -f $@ ; exit 1 ; fi diff --git a/paludis/dep_list/options.cc b/paludis/dep_list/options.cc index a7895a6b2..48354a845 100644 --- a/paludis/dep_list/options.cc +++ b/paludis/dep_list/options.cc @@ -23,466 +23,5 @@ using namespace paludis; -std::ostream & -paludis::operator<< (std::ostream & o, const DepListTargetType & s) -{ - do - { - switch (s) - { - case dl_target_package: - o << "package"; - continue; - - case dl_target_set: - o << "set"; - continue; - - case last_dl_target: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListTargetType"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListReinstallOption & s) -{ - do - { - switch (s) - { - case dl_reinstall_never: - o << "never"; - continue; - - case dl_reinstall_always: - o << "always"; - continue; - - case dl_reinstall_if_use_changed: - o << "if_use_changed"; - continue; - - case last_dl_reinstall: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListReinstallOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListFallBackOption & s) -{ - do - { - switch (s) - { - case dl_fall_back_as_needed_except_targets: - o << "as_needed_except_targets"; - continue; - - case dl_fall_back_as_needed: - o << "as_needed"; - continue; - - case dl_fall_back_never: - o << "never"; - continue; - - case last_dl_fall_back: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListFallBackOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListReinstallScmOption & s) -{ - do - { - switch (s) - { - case dl_reinstall_scm_never: - o << "never"; - continue; - - case dl_reinstall_scm_always: - o << "always"; - continue; - - case dl_reinstall_scm_daily: - o << "daily"; - continue; - - case dl_reinstall_scm_weekly: - o << "weekly"; - continue; - - case last_dl_reinstall_scm: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListReinstallScmOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListUpgradeOption & s) -{ - do - { - switch (s) - { - case dl_upgrade_always: - o << "always"; - continue; - - case dl_upgrade_as_needed: - o << "as_needed"; - continue; - - case last_dl_upgrade: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListUpgradeOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListDowngradeOption & s) -{ - do - { - switch (s) - { - case dl_downgrade_as_needed: - o << "as_needed"; - continue; - - case dl_downgrade_warning: - o << "warning"; - continue; - - case dl_downgrade_error: - o << "error"; - continue; - - case last_dl_downgrade: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListDowngradeOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListNewSlotsOption & s) -{ - do - { - switch (s) - { - case dl_new_slots_always: - o << "always"; - continue; - - case dl_new_slots_as_needed: - o << "as_needed"; - continue; - - case last_dl_new_slots: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListNewSlotsOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListDepsOption & s) -{ - do - { - switch (s) - { - case dl_deps_discard: - o << "discard"; - continue; - - case dl_deps_pre: - o << "pre"; - continue; - - case dl_deps_pre_or_post: - o << "pre_or_post"; - continue; - - case dl_deps_post: - o << "post"; - continue; - - case dl_deps_try_post: - o << "try_post"; - continue; - - case last_dl_deps: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListDepsOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListSuggestedOption & s) -{ - do - { - switch (s) - { - case dl_suggested_show: - o << "show"; - continue; - - case dl_suggested_discard: - o << "discard"; - continue; - - case dl_suggested_install: - o << "install"; - continue; - - case last_dl_suggested: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListSuggestedOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListCircularOption & s) -{ - do - { - switch (s) - { - case dl_circular_error: - o << "error"; - continue; - - case dl_circular_discard: - o << "discard"; - continue; - - case dl_circular_discard_silently: - o << "circular_discard_silently"; - continue; - - case last_dl_circular: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListCircularOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListBlocksOption & s) -{ - do - { - switch (s) - { - case dl_blocks_accumulate: - o << "accumulate"; - continue; - - case dl_blocks_error: - o << "error"; - continue; - - case dl_blocks_discard: - o << "discard"; - continue; - - case dl_blocks_discard_completely: - o << "discard_completely"; - continue; - - case last_dl_blocks: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListBlocksOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListUseOption & s) -{ - do - { - switch (s) - { - case dl_use_deps_standard: - o << "standard"; - continue; - - case dl_use_deps_take_all: - o << "take_all"; - continue; - - case last_dl_use_deps: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListUseOption"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListEntryState & s) -{ - do - { - switch (s) - { - case dle_no_deps: - o << "no_deps"; - continue; - - case dle_has_pre_deps: - o << "has_pre_deps"; - continue; - - case dle_has_all_deps: - o << "has_all_deps"; - continue; - - case last_dle: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListEntryState"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListEntryKind & s) -{ - do - { - switch (s) - { - case dlk_package: - o << "package"; - continue; - - case dlk_subpackage: - o << "sub_package"; - continue; - - case dlk_suggested: - o << "suggested"; - continue; - - case dlk_already_installed: - o << "already_installed"; - continue; - - case dlk_virtual: - o << "virtual"; - continue; - - case dlk_provided: - o << "provided"; - continue; - - case dlk_block: - o << "block"; - continue; - - case dlk_masked: - o << "masked"; - continue; - - case last_dlk: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListEntryKind"); - } while (false); - - return o; -} - -std::ostream & -paludis::operator<< (std::ostream & o, const DepListOverrideMask & s) -{ - do - { - switch (s) - { - case dl_override_licenses: - o << "licenses"; - continue; - - case dl_override_tilde_keywords: - o << "tilde_keywords"; - continue; - - case dl_override_unkeyworded: - o << "unkeyworded"; - continue; - - case dl_override_repository_masks: - o << "repository_masks"; - continue; - - case dl_override_profile_masks: - o << "profile_masks"; - continue; - - case last_dl_override: - ; - } - - throw InternalError(PALUDIS_HERE, "Bad DepListEntryKind"); - } while (false); - - return o; -} +#include <paludis/dep_list/options-se.cc> diff --git a/paludis/dep_list/options.hh b/paludis/dep_list/options.hh index a1f6e977a..84b55f0a7 100644 --- a/paludis/dep_list/options.hh +++ b/paludis/dep_list/options.hh @@ -26,210 +26,8 @@ namespace paludis { - /** - * What type of target are we handling at the top level. - * - * \ingroup grpdepresolver - */ - enum DepListTargetType - { - dl_target_package, ///< A package, so force reinstalls. - dl_target_set, ///< A set, so don't force reinstalls. - last_dl_target - }; - - /** - * When should we reinstall. - * - * \ingroup grpdepresolver - */ - enum DepListReinstallOption - { - dl_reinstall_never, ///< Never. - dl_reinstall_always, ///< Always. - dl_reinstall_if_use_changed, ///< If a USE flag has changed. - last_dl_reinstall - }; - - /** - * When can we fall back to installed? - * - * \ingroup grpdepresolver - */ - enum DepListFallBackOption - { - dl_fall_back_as_needed_except_targets, - dl_fall_back_as_needed, - dl_fall_back_never, - last_dl_fall_back - }; - - /** - * When should we reinstall scm. - * - * \ingroup grpdepresolver - */ - enum DepListReinstallScmOption - { - dl_reinstall_scm_never, - dl_reinstall_scm_always, - dl_reinstall_scm_daily, - dl_reinstall_scm_weekly, - last_dl_reinstall_scm - }; - /** - * When should we upgrade. - * - * \ingroup grpdepresolver - */ - enum DepListUpgradeOption - { - dl_upgrade_always, ///< Always. - dl_upgrade_as_needed, ///< Only as needed. - last_dl_upgrade - }; - - /** - * What to do when we downgrade. - * - * \ingroup grpdepresolver - */ - enum DepListDowngradeOption - { - dl_downgrade_as_needed, ///< As needed - dl_downgrade_warning, ///< As needed, but warn - dl_downgrade_error, ///< Don't - last_dl_downgrade - }; - - /** - * When should we pull in a new slot. - * - * \ingroup grpdepresolver - */ - enum DepListNewSlotsOption - { - dl_new_slots_always, - dl_new_slots_as_needed, - last_dl_new_slots - }; - - /** - * How should we handle a dep class. - * - * \ingroup grpdepresolver - */ - enum DepListDepsOption - { - dl_deps_discard, ///< Discard it - dl_deps_pre, ///< As a pre dependency - dl_deps_pre_or_post, ///< As a pre dependency with fallback to post - dl_deps_post, ///< As a post dependency - dl_deps_try_post, ///< As an optional post dependency - last_dl_deps - }; - - /** - * How should we handle suggested deps. - * - * \ingroup grpdepresolver - */ - enum DepListSuggestedOption - { - dl_suggested_show, ///< Show - dl_suggested_discard, ///< Discard - dl_suggested_install, ///< Install - last_dl_suggested - }; - - /** - * How we handle circular deps. - * - * \ingroup grpdepresolver - */ - enum DepListCircularOption - { - dl_circular_error, ///< As an error - dl_circular_discard, ///< Discard them - dl_circular_discard_silently, ///< Discard them silently (not for user visible use) - last_dl_circular - }; - - /** - * How we handle blocks. - * - * \ingroup grpdepresolver - */ - enum DepListBlocksOption - { - dl_blocks_accumulate, ///< Accumulate them and show all errors together - dl_blocks_error, ///< Error on the first one - dl_blocks_discard, ///< Discard (dangerous) - dl_blocks_discard_completely, ///< Discard completely (not for user visible use) - last_dl_blocks - }; - - /** - * How we handle use deps. - * - * Not for end user use. Used by adjutrix and qa. - * - * \ingroup grpdepresolver - */ - enum DepListUseOption - { - dl_use_deps_standard, ///< Behave as standard - dl_use_deps_take_all, ///< Take both sides of use conditionals except on masks - last_dl_use_deps - }; - - /** - * State of a DepListEntry. - * - * \ingroup grpdepresolver - */ - enum DepListEntryState - { - dle_no_deps, ///< Dependencies have yet to be added - dle_has_pre_deps, ///< Predependencies have been added - dle_has_all_deps, ///< All dependencies have been added - last_dle - }; - - /** - * Kind of a DepListEntry. - * - * \ingroup grpdepresolver - */ - enum DepListEntryKind - { - dlk_package, ///< A package to be installed - dlk_subpackage, ///< A package to be installed as part of the previous dlk_package - dlk_already_installed, ///< An already installed package - dlk_virtual, ///< A virtual package - dlk_provided, ///< A package provided by the previous dlk_package - dlk_suggested, ///< A package suggested by the previous dlk_package - dlk_block, ///< A blocked package that must be removed - dlk_masked, ///< A masked package that must be unmasked - last_dlk - }; - - /** - * Masks that can be overridden. - * - * \ingroup grpdepresolver - * \see DepListOverrideMasks - */ - enum DepListOverrideMask - { - dl_override_licenses, ///< Override unaccepted licences - dl_override_tilde_keywords, ///< Override ~keywords - dl_override_unkeyworded, ///< Override unkeyworded - dl_override_repository_masks, ///< Override repository masks - dl_override_profile_masks, ///< Override profile masks - last_dl_override - }; +#include <paludis/dep_list/options-se.hh> /** * Set of masks that can be overridden. @@ -238,126 +36,6 @@ namespace paludis * \see DepListOverrideMask */ typedef std::bitset<last_dl_override> DepListOverrideMasks; - - /** - * Write a DepListTargetType to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListTargetType &) PALUDIS_VISIBLE; - - /** - * Write a DepListReinstallOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListReinstallOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListFallBackOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListFallBackOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListReinstallScmOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListReinstallScmOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListUpgradeOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListUpgradeOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListDowngradeOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListDowngradeOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListNewSlotsOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListNewSlotsOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListDepsOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListDepsOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListSuggestedOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListSuggestedOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListCircularOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListCircularOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListBlocksOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListBlocksOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListUseOption to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListUseOption &) PALUDIS_VISIBLE; - - /** - * Write a DepListEntryState to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListEntryState &) PALUDIS_VISIBLE; - - /** - * Write a DepListEntryKind to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListEntryKind &) PALUDIS_VISIBLE; - - /** - * Write a DepListOverrideMask to a stream. - * - * \ingroup grpdepresolver - */ - std::ostream & - operator<< (std::ostream &, const DepListOverrideMask &) PALUDIS_VISIBLE; } #endif diff --git a/paludis/dep_list/options.se b/paludis/dep_list/options.se new file mode 100644 index 000000000..b8c635d82 --- /dev/null +++ b/paludis/dep_list/options.se @@ -0,0 +1,275 @@ +#!/bin/bash +# vim: set sw=4 sts=4 et ft=sh : + +make_enum_DepListTargetType() +{ + prefix dl_target + + key dl_target_package "A package, so force reinstalls." + key dl_target_set "A set, so don't force reinstalls." + + doxygen_comment << "END" + /** + * Type of target being handled at the top level. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListReinstallOption() +{ + prefix dl_reinstall + + key dl_reinstall_never "Never" + key dl_reinstall_always "Always" + key dl_reinstall_if_use_changed "If a USE flag has changed" + + doxygen_comment << "END" + /** + * When we should reinstall. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListFallBackOption() +{ + prefix dl_fall_back + + key dl_fall_back_as_needed_except_targets "As needed, except for targets" + key dl_fall_back_as_needed "As needed" + key dl_fall_back_never "Never" + + doxygen_comment << "END" + /** + * When we should fall back to an installed package. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListReinstallScmOption() +{ + prefix dl_reinstall_scm + + key dl_reinstall_scm_never "Never" + key dl_reinstall_scm_always "Always" + key dl_reinstall_scm_daily "Daily" + key dl_reinstall_scm_weekly "Weekly" + + doxygen_comment << "END" + /** + * When we should reinstall SCM packages. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListUpgradeOption() +{ + prefix dl_upgrade + + key dl_upgrade_always "Always" + key dl_upgrade_as_needed "Only as needed" + + doxygen_comment << "END" + /** + * When we should upgrade. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListDowngradeOption() +{ + prefix dl_downgrade + key dl_downgrade_as_needed "As needed" + key dl_downgrade_warning "As needed, but warn" + key dl_downgrade_error "Refuse to downgrade" + + doxygen_comment << "END" + /** + * What to do when we downgrade. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListNewSlotsOption() +{ + prefix dl_new_slots + + key dl_new_slots_always "Always" + key dl_new_slots_as_needed "Only where necessary" + + doxygen_comment << "END" + /** + * When we should pull in a new slot. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListDepsOption() +{ + prefix dl_deps + + key dl_deps_discard "Discard it" + key dl_deps_pre "As a pre dependency" + key dl_deps_pre_or_post "As a pre dependency with fallback to post" + key dl_deps_post "As a post dependency" + key dl_deps_try_post "As an optional post dependency" + + doxygen_comment << "END" + /** + * How we should handle a dep class. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListSuggestedOption() +{ + prefix dl_suggested + key dl_suggested_show "Show" + key dl_suggested_discard "Discard" + key dl_suggested_install "Install" + + doxygen_comment << "END" + /** + * How we should handle suggested deps. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListCircularOption() +{ + prefix dl_circular + + key dl_circular_error "As an error" + key dl_circular_discard "Discard them" + key dl_circular_discard_silently "Discard them silently" + + doxygen_comment << "END" + /** + * How we should handle circular deps. + * + * \see DepListOptions + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListBlocksOption() +{ + prefix dl_blocks + + key dl_blocks_accumulate "Accumulate them and show all errors together" + key dl_blocks_error "Error on the first one" + key dl_blocks_discard "Discard (dangerous)" + key dl_blocks_discard_completely "Discard completely (not for user visible use)" + + doxygen_comment <<"END" + /** + * How we handle blocks. + * + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListUseOption() +{ + prefix dl_use_deps + key dl_use_deps_standard "Behave as standard" + key dl_use_deps_take_all "Take both sides of use conditionals except on masks" + + doxygen_comment <<"END" + /** + * How we handle use deps. + * + * Not for end user use. Used by adjutrix and qa. + * + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListEntryState() +{ + prefix dle + + key dle_no_deps "Dependencies have yet to be added" + key dle_has_pre_deps "Predependencies have been added" + key dle_has_all_deps "All dependencies have been added" + + doxygen_comment <<"END" + /** + * State of a DepListEntry. + * + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListEntryKind() +{ + prefix dlk + + key dlk_package "A package to be installed" + key dlk_subpackage "A package to be installed as part of the previous dlk_package" + key dlk_already_installed "An already installed package" + key dlk_virtual "A virtual package" + key dlk_provided "A package provided by the previous dlk_package" + key dlk_suggested "A package suggested by the previous dlk_package" + key dlk_block "A blocked package that must be removed" + key dlk_masked "A masked package that must be unmasked" + + doxygen_comment <<"END" + /** + * Kind of a DepListEntry. + * + * \ingroup grpdepresolver + */ +END +} + +make_enum_DepListOverrideMask() +{ + prefix dl_override + + key dl_override_licenses "Override unaccepted licences" + key dl_override_tilde_keywords "Override ~keywords" + key dl_override_unkeyworded "Override unkeyworded" + key dl_override_repository_masks "Override repository masks" + key dl_override_profile_masks "Override profile masks" + + doxygen_comment <<"END" + /** + * Masks that can be overridden. + * + * \ingroup grpdepresolver + * \see DepListOverrideMasks + */ +END +} + |