Hello list.
I think it is annoying that the old/new handling introduced in 16904 is
so granular and would suggest this alternative version (draft).
Pros of my version:
* Supports multiple older and newer versions of a feature.
* Once the target version comes upon us the feature will get into
use automatically, no need to change anything.
Cons of my version:
* New features are automatically enabled when the target version
arrives.
Pros of the 16904 version:
* It is an explicit act to make a new feature the default.
Cons of the 16904 version:
* It is an explicit act to make a new feature the default.
* There can be either an older or a newer version, not bot and
only one of each.
I have chosen to ignore any non-number parts, thus 5.5.dev = 5.5.rc1 =
5.5 for the purpose of the version numbers of this item - this is a
feature.
Due to how the implementation is done 5.rc.3 = 5.0.3 -this is a
misfeature.
Now to the user interface:
In the hedaer file there is
config_version_require(modules, [version, modules], ...)
Examples:
config_version_require(adam)
Equivalent to config_require(adam)
config_version_require(adam, 5.5, adam-5.5)
If the version number is less than 5.5 then
config_require(adam), otherwise config_require(adam-5.5)
config_version_require(, 5.4.1, bertil)
If the version number is less than 5.4.1 then do
nothing, otherwise config_require(bertil)
config_version_require(caesar, 1.4, tiberius, 3.7, gaius)
For versions prior to 1.4, use caesar, for versions from
1.4 up to but not including 3.7, use tiberius, for
versions after 3.7 use gaius.
The configure options for this are
--with-old-features
The matching version is just less than the current version so
everything new in this version or later is excluded but the
latest version of the older features are used.
--with-new-features
Use the latest version of everything
--with-features-of=<version>
Use features as if the current version is <version>
Is this something we want or is the old/new stuff good enough?
/MF
Index: clean/configure.in
===================================================================
--- clean.orig/configure.in 2008-05-19 09:07:22.000000000 +0200
+++ clean/configure.in 2008-05-19 21:15:21.000000000 +0200
@@ -752,6 +752,11 @@
AC_ARG_ENABLE(old-features,
[ --enable-old-features Compile in old MIB modules and other deprecated features
which were replaced in the default build of this major release.])
+
+AC_ARG_WITH(features-of,
+[ --with-features-of=version Compile in MIB modules and other features
+ as if this was release [version].],,
+[with_features_of=$PACKAGE_VERSION])
#
AC_ARG_WITH(enterprise-oid,
@@ -2185,6 +2190,47 @@
AC_MSG_MODULE_DBG(" $i required old features: $new_list")
#---------------------
+ # macro: config_version_require(base, version, version-modules, ...)
+ # - lists alternative modules used from different version.
+ #
+ [new_list_alt3=`$MODULECPP module_tmp_header.h | \
+ $GREP config_version_require | \
+ $SED -e 's/ */ /g' \
+ -e 's/.*config_version_require( *\([^)]*\) *).*/\1/' \
+ -e 's/ *, */,/g' | \
+ awk -v enable_new_features="$enable_new_features" \
+ -v enable_old_features="$enable_old_features" \
+ -v with_features_of="$with_features_of" '
+ BEGIN {
+ if(enable_new_features == "yes")
+ method="max";
+ else if(enable_old_features == "yes")
+ method="max-less";
+ else
+ method="max-less-equal";
+ split(with_features_of, a, ".");
+ version=sprintf("%03u%03u%03u", a[1], a[2], a[3]);
+ }
+ {
+ n = split($0, a, ",");
+ actver = "000000000";
+ actstr = a[1];
+ for(i = 2; i < n; i += 2) {
+ split(a[i], b, ".");
+ curver=sprintf("%03u%03u%03u", b[1], b[2], b[3]);
+ if (curver > actver &&
+ (method != "max-less" || curver < version) &&
+ (method != "max-less-equal" || curver <= version)) {
+ actver = curver;
+ actstr = a[i + 1];
+ }
+ }
+ printf(" %s", actstr);
+ }'`]
+ AC_MSG_MODULE_DBG(" $i required versioned features: $new_list_alt3")
+ new_list="${new_list}${new_list_alt3}"
+
+ #---------------------
# macro: config_require(modules)
# - lists modules required for this module
#
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders