File 0631-snmp-agent-Build-order.patch of Package erlang

From 5e2305ab7a7d6bc20d098699a0205055b0940abc Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Thu, 21 Mar 2019 12:16:01 +0100
Subject: [PATCH 2/8] [snmp|agent] Build order

Fixed the build order. Some of the mib modules export types
used by other modules, so build them (the mib-modules) first
(after snmpa).

OTP-15691
---
 lib/snmp/src/agent/modules.mk | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/lib/snmp/src/agent/modules.mk b/lib/snmp/src/agent/modules.mk
index 0f8615588a..9be3349524 100644
--- a/lib/snmp/src/agent/modules.mk
+++ b/lib/snmp/src/agent/modules.mk
@@ -2,7 +2,7 @@
 
 # %CopyrightBegin%
 # 
-# Copyright Ericsson AB 2004-2016. All Rights Reserved.
+# Copyright Ericsson AB 2004-2019. All Rights Reserved.
 # 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -30,12 +30,24 @@ BEHAVIOUR_MODULES = \
 	snmpa_notification_filter \
 	snmpa_set_mechanism
 
+MIB_MODULES = \
+	snmp_community_mib \
+	snmp_framework_mib \
+	snmp_notification_mib \
+	snmp_standard_mib \
+	snmp_target_mib \
+	snmp_user_based_sm_mib \
+	snmp_view_based_acm_mib
+
 # snmpa is "plain" interface module but also defines some agent specific types
 # and therefor must be compiled before the modules that use them, including
 # the behaviour modules...
+# Some of the MIB modules also define types used elsewhere and therefor
+# has to be built before the other mods.
 # snmpa_mib_data_ttln
 MODULES = \
 	snmpa \
+	$(MIB_MODULES) \
 	$(BEHAVIOUR_MODULES) \
 	snmpa_acm \
 	snmpa_agent \
@@ -66,17 +78,10 @@ MODULES = \
 	snmpa_trap \
 	snmpa_usm \
 	snmpa_vacm \
-	snmp_community_mib \
-	snmp_framework_mib \
 	snmp_generic \
 	snmp_generic_mnesia \
 	snmp_index \
-	snmp_notification_mib \
-	snmp_shadow_table \
-	snmp_standard_mib \
-	snmp_target_mib \
-	snmp_user_based_sm_mib \
-	snmp_view_based_acm_mib
+	snmp_shadow_table
 
 
 INTERNAL_HRL_FILES = \
-- 
2.16.4

openSUSE Build Service is sponsored by