Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 658964
Collapse All | Expand All

(-)a/agent/mibgroup/host/data_access/swinst_rpm.c (-5 / +5 lines)
Lines 119-129 netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) Link Here
119
        CONTAINER_INSERT(container, entry);
119
        CONTAINER_INSERT(container, entry);
120
120
121
        h = headerLink( h );
121
        h = headerLink( h );
122
        headerGetEntry( h, RPMTAG_NAME,        NULL, (void**)&n, NULL);
122
        headerGet( h, RPMTAG_NAME,        (void**)&n, HEADERGET_DEFAULT);
123
        headerGetEntry( h, RPMTAG_VERSION,     NULL, (void**)&v, NULL);
123
        headerGet( h, RPMTAG_VERSION,     (void**)&v, HEADERGET_DEFAULT);
124
        headerGetEntry( h, RPMTAG_RELEASE,     NULL, (void**)&r, NULL);
124
        headerGet( h, RPMTAG_RELEASE,     (void**)&r, HEADERGET_DEFAULT);
125
        headerGetEntry( h, RPMTAG_GROUP,       NULL, (void**)&g, NULL);
125
        headerGet( h, RPMTAG_GROUP,       (void**)&g, HEADERGET_DEFAULT);
126
        headerGetEntry( h, RPMTAG_INSTALLTIME, NULL, (void**)&t, NULL);
126
        headerGet( h, RPMTAG_INSTALLTIME, (void**)&t, HEADERGET_DEFAULT);
127
127
128
        entry->swName_len = snprintf( entry->swName, sizeof(entry->swName),
128
        entry->swName_len = snprintf( entry->swName, sizeof(entry->swName),
129
                                      "%s-%s-%s", n, v, r);
129
                                      "%s-%s-%s", n, v, r);
(-)a/agent/mibgroup/host/hr_swinst.c (-7 / +7 lines)
Lines 485-491 var_hrswinst(struct variable * vp, Link Here
485
#else
485
#else
486
# ifdef HAVE_LIBRPM
486
# ifdef HAVE_LIBRPM
487
            char *rpm_groups;
487
            char *rpm_groups;
488
            if ( headerGetEntry(swi->swi_h, RPMTAG_GROUP, NULL, (void **) &rpm_groups, NULL) ) {
488
            if ( headerGet(swi->swi_h, RPMTAG_GROUP,(void **) &rpm_groups, HEADERGET_DEFAULT) ) {
489
                if ( strstr(rpm_groups, "System Environment") != NULL )
489
                if ( strstr(rpm_groups, "System Environment") != NULL )
490
                    long_return = 2;	/* operatingSystem */
490
                    long_return = 2;	/* operatingSystem */
491
                else
491
                else
Lines 504-510 var_hrswinst(struct variable * vp, Link Here
504
        {
504
        {
505
#ifdef HAVE_LIBRPM
505
#ifdef HAVE_LIBRPM
506
            int32_t         *rpm_data;
506
            int32_t         *rpm_data;
507
            if ( headerGetEntry(swi->swi_h, RPMTAG_INSTALLTIME, NULL, (void **) &rpm_data, NULL) ) {
507
            if ( headerGet(swi->swi_h, RPMTAG_INSTALLTIME, (void **) &rpm_data, HEADERGET_DEFAULT) ) {
508
                time_t          installTime = *rpm_data;
508
                time_t          installTime = *rpm_data;
509
                ret = date_n_time(&installTime, var_len);
509
                ret = date_n_time(&installTime, var_len);
510
            } else {
510
            } else {
Lines 690-700 Save_HR_SW_info(int ix) Link Here
690
        swi->swi_h = h;
690
        swi->swi_h = h;
691
        swi->swi_prevx = ix;
691
        swi->swi_prevx = ix;
692
692
693
        headerGetEntry(swi->swi_h, RPMTAG_NAME, NULL, (void **) &n, NULL);
693
        headerGet(swi->swi_h, RPMTAG_NAME, (void **) &n, HEADERGET_DEFAULT);
694
        headerGetEntry(swi->swi_h, RPMTAG_VERSION, NULL, (void **) &v,
694
        headerGet(swi->swi_h, RPMTAG_VERSION, (void **) &v,
695
                       NULL);
695
                       HEADERGET_DEFAULT);
696
        headerGetEntry(swi->swi_h, RPMTAG_RELEASE, NULL, (void **) &r,
696
        headerGet(swi->swi_h, RPMTAG_RELEASE, (void **) &r,
697
                       NULL);
697
                       HEADERGET_DEFAULT);
698
        snprintf(swi->swi_name, sizeof(swi->swi_name), "%s-%s-%s", n, v, r);
698
        snprintf(swi->swi_name, sizeof(swi->swi_name), "%s-%s-%s", n, v, r);
699
        swi->swi_name[ sizeof(swi->swi_name)-1 ] = 0;
699
        swi->swi_name[ sizeof(swi->swi_name)-1 ] = 0;
700
    }
700
    }
(-)a/configure (-2 / +2 lines)
Lines 19628-19637 $as_echo "#define HAVE_LIBRPM 1" >>confdefs.h Link Here
19628
19628
19629
19629
19630
  # rpm 4.6 has incompatible API, turn on the legacy one
19630
  # rpm 4.6 has incompatible API, turn on the legacy one
19631
  ac_fn_c_check_decl "$LINENO" "headerGetEntry" "ac_cv_have_decl_headerGetEntry" "#include <rpm/rpmlib.h>
19631
  ac_fn_c_check_decl "$LINENO" "headerGet" "ac_cv_have_decl_headerGet" "#include <rpm/rpmlib.h>
19632
19632
19633
"
19633
"
19634
if test "x$ac_cv_have_decl_headerGetEntry" = xyes; then :
19634
if test "x$ac_cv_have_decl_headerGet" = xyes; then :
19635
  :
19635
  :
19636
else
19636
else
19637
19637
(-)a/configure.d/config_os_libs1 (-1 / +1 lines)
Lines 46-52 if test "x$with_rpm" != "xno"; then Link Here
46
  ],, $LMIBLIBS, _rpmlibs)
46
  ],, $LMIBLIBS, _rpmlibs)
47
47
48
  # rpm 4.6 has incompatible API, turn on the legacy one
48
  # rpm 4.6 has incompatible API, turn on the legacy one
49
  AC_CHECK_DECL([headerGetEntry],
49
  AC_CHECK_DECL([headerGet],
50
    : ,
50
    : ,
51
    AC_DEFINE([_RPM_4_4_COMPAT], [], [Define if you have RPM 4.6 or newer to turn on legacy API]),
51
    AC_DEFINE([_RPM_4_4_COMPAT], [], [Define if you have RPM 4.6 or newer to turn on legacy API]),
52
    [[#include <rpm/rpmlib.h>]]
52
    [[#include <rpm/rpmlib.h>]]

Return to bug 658964