summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/CMakeLists.txt11
-rw-r--r--tools/installcheck.c9
2 files changed, 15 insertions, 5 deletions
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 16fa097..6b592f7 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -10,15 +10,18 @@ IF (ENABLE_RPMDB)
ADD_EXECUTABLE (rpmdb2solv rpmdb2solv.c)
TARGET_LINK_LIBRARIES (rpmdb2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
-ADD_EXECUTABLE (rpms2solv rpms2solv.c)
-TARGET_LINK_LIBRARIES (rpms2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
-
ADD_EXECUTABLE (findfileconflicts findfileconflicts.c)
TARGET_LINK_LIBRARIES (findfileconflicts libsolvext libsolv ${SYSTEM_LIBRARIES})
-SET (tools_list ${tools_list} rpmdb2solv rpms2solv)
+SET (tools_list ${tools_list} rpmdb2solv)
ENDIF (ENABLE_RPMDB)
+IF (ENABLE_RPMPKG)
+ADD_EXECUTABLE (rpms2solv rpms2solv.c)
+TARGET_LINK_LIBRARIES (rpms2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
+SET (tools_list ${tools_list} rpms2solv)
+ENDIF (ENABLE_RPMPKG)
+
IF (ENABLE_RPMMD)
ADD_EXECUTABLE (repomdxml2solv repomdxml2solv.c)
TARGET_LINK_LIBRARIES (repomdxml2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
diff --git a/tools/installcheck.c b/tools/installcheck.c
index e8be171..b0fdb33 100644
--- a/tools/installcheck.c
+++ b/tools/installcheck.c
@@ -49,6 +49,7 @@ usage(char** argv)
exit(1);
}
+#if defined(ENABLE_SUSEREPO) || defined(ENABLE_RPMMD) || defined(ENABLE_DEBIAN) || defined(ENABLE_ARCHREPO)
static int
strlen_comp(const char *str)
{
@@ -63,6 +64,7 @@ strlen_comp(const char *str)
return l - 5;
return l;
}
+#endif
int
main(int argc, char **argv)
@@ -97,7 +99,10 @@ main(int argc, char **argv)
for (i = 2; i < argc; i++)
{
FILE *fp;
- int r, l;
+ int r;
+#if defined(ENABLE_SUSEREPO) || defined(ENABLE_RPMMD) || defined(ENABLE_DEBIAN) || defined(ENABLE_ARCHREPO)
+ int l;
+#endif
if (!strcmp(argv[i], "--withsrc"))
{
@@ -126,7 +131,9 @@ main(int argc, char **argv)
++i;
continue;
}
+#if defined(ENABLE_SUSEREPO) || defined(ENABLE_RPMMD) || defined(ENABLE_DEBIAN) || defined(ENABLE_ARCHREPO)
l = strlen_comp(argv[i]);
+#endif
if (!strcmp(argv[i], "-"))
fp = stdin;
else if ((fp = solv_xfopen(argv[i], 0)) == 0)