]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
disable build of the solv tool for unsupported system types
authorMichael Schroeder <mls@suse.de>
Fri, 7 Nov 2014 15:19:50 +0000 (16:19 +0100)
committerMichael Schroeder <mls@suse.de>
Fri, 7 Nov 2014 15:19:50 +0000 (16:19 +0100)
Also gets rid of the no longer used NOSYSTEM.

CMakeLists.txt
examples/CMakeLists.txt
examples/solv.c

index 7e1e342d4920f000d354bf6db852174ca353e88b..ab3fec96699929ccc19fc8cc855808522af518f7 100644 (file)
@@ -129,7 +129,6 @@ ENDIF (HAIKU)
 
 IF (${have_system} STREQUAL x)
     MESSAGE (STATUS "Building for no system")
-    ADD_DEFINITIONS (-DNOSYSTEM)
 ENDIF (${have_system} STREQUAL x)
 IF (${have_system} STRGREATER xx)
     MESSAGE (FATAL_ERROR "Can only compile for one system type.")
index 787d2f9786e3a96d158c3eb62dbb61c6092eec6d..d29ea68436b462144c6d812265b6c9ff9fdbc22c 100644 (file)
@@ -1,6 +1,10 @@
+IF (SUSE OR FEDORA OR DEBIAN)
+
 ADD_EXECUTABLE (solv solv.c)
 TARGET_LINK_LIBRARIES (solv libsolvext libsolv ${SYSTEM_LIBRARIES})
 
 INSTALL(TARGETS
     solv
     DESTINATION ${BIN_INSTALL_DIR})
+
+ENDIF (SUSE OR FEDORA OR DEBIAN)
index 7ae67e3520d13f527845901ca5b054ea75b48e48..8b0d6cc4db981d9adcde7c552d82fa370763c897 100644 (file)
@@ -216,7 +216,6 @@ yum_substitute(Pool *pool, char *line)
 #define TYPE_PLAINDIR  3
 #define TYPE_DEBIAN     4
 
-#ifndef NOSYSTEM
 static int
 read_repoinfos_sort(const void *ap, const void *bp)
 {
@@ -224,7 +223,6 @@ read_repoinfos_sort(const void *ap, const void *bp)
   const struct repoinfo *b = bp;
   return strcmp(a->alias, b->alias);
 }
-#endif
 
 #if defined(SUSE) || defined(FEDORA)
 
@@ -478,15 +476,6 @@ read_repoinfos(Pool *pool, int *nrepoinfosp)
 
 #endif
 
-#ifdef NOSYSTEM
-struct repoinfo *
-read_repoinfos(Pool *pool, int *nrepoinfosp)
-{
-  *nrepoinfosp = 0;
-  return 0;
-}
-#endif
-
 
 void
 free_repoinfos(struct repoinfo *repoinfos, int nrepoinfos)
@@ -1733,6 +1722,7 @@ read_repos(Pool *pool, struct repoinfo *repoinfos, int nrepoinfos)
 #endif
 
   repo = repo_create(pool, "@System");
+  memset(&stb, 0, sizeof(stb));
 #if defined(ENABLE_RPMDB) && (defined(SUSE) || defined(FEDORA))
   printf("rpm database:");
   if (stat(pool_prepend_rootdir_tmp(pool, "/var/lib/rpm/Packages"), &stb))
@@ -1742,10 +1732,6 @@ read_repos(Pool *pool, struct repoinfo *repoinfos, int nrepoinfos)
   printf("dpgk database:");
   if (stat(pool_prepend_rootdir_tmp(pool, "/var/lib/dpkg/status"), &stb))
     memset(&stb, 0, sizeof(stb));
-#endif
-#ifdef NOSYSTEM
-  printf("no installed database:");
-  memset(&stb, 0, sizeof(stb));
 #endif
   calc_checksum_stat(&stb, REPOKEY_TYPE_SHA256, 0, installedcookie);
   if (usecachedrepo(repo, 0, installedcookie, 0))