This function returns a static string which contains
version of createrepo_c library and list of features
which were enabled during compilation time.
Currently there are only two features:
"DeltaRPM" which means that createrepo_c lib was compiled
with support for generation of Delta RPMS.
"LegacyWeakdeps" which means that createrepo_c was compiled
with support for legacy weakdeps which are (were?) used in
OpenSuse and related distros.
Example string:
"0.10.0 (Features: DeltaRPM )"
Signed-off-by: Tomas Mlcoch <tmlcoch@redhat.com>
set(CR_DELTA_RPM_SUPPORT "1")
ENDIF (NOT DRPM_LIBRARY)
endif (DRPM_PATH)
+
+ IF (CR_DELTA_RPM_SUPPORT)
+ ADD_DEFINITIONS("-DCR_DELTA_RPM_SUPPORT")
+ ENDIF (CR_DELTA_RPM_SUPPORT)
ENDIF (ENABLE_DRPM)
# Get package version
#include "cleanup.h"
#include "error.h"
#include "misc.h"
+#include "version.h"
#define ERR_DOMAIN CREATEREPO_C_ERROR
#define BUFFER_SIZE 4096
+#define xstr(s) str(s)
+#define str(s) #s
+
const char *
cr_flag_to_str(gint64 flags)
return cut+1;
}
+
+const gchar *
+cr_version_string_with_features(void)
+{
+ return (xstr(CR_VERSION_MAJOR)
+ "."
+ xstr(CR_VERSION_MINOR)
+ "."
+ xstr(CR_VERSION_PATCH)
+ " (Features: "
+#ifdef CR_DELTA_RPM_SUPPORT
+ "DeltaRPM "
+#endif
+#ifdef ENABLE_LEGACY_WEAKDEPS
+ "LegacyWeakdeps "
+#endif
+ ")");
+}
gchar *
cr_cut_dirs(gchar *path, gint cut_dirs);
+/** Return string with createrepo_c lib version and available features
+ * @return String with version and list of features
+ */
+const gchar *
+cr_version_string_with_features(void);
+
/** @} */
#ifdef __cplusplus