diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-27 14:53:44 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-27 14:53:44 +0900 |
commit | 0254042972e8b301303ad00678e5388e7722b440 (patch) | |
tree | 3e9f1f5ac6f74d12d02b64613caa2704a681718c /examples | |
parent | ef6e8f8da0690f0e11c12eff0f6e7fa97c109d54 (diff) | |
download | libsolv-0254042972e8b301303ad00678e5388e7722b440.tar.gz libsolv-0254042972e8b301303ad00678e5388e7722b440.tar.bz2 libsolv-0254042972e8b301303ad00678e5388e7722b440.zip |
Imported Upstream version 0.6.7upstream/0.6.7
Change-Id: I4903b1e04cf23c0c38f633e48a06732764ee6444
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/CMakeLists.txt | 4 | ||||
-rw-r--r-- | examples/solv.c | 16 |
2 files changed, 5 insertions, 15 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 787d2f9..d29ea68 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -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) diff --git a/examples/solv.c b/examples/solv.c index 7ae67e3..8b0d6cc 100644 --- a/examples/solv.c +++ b/examples/solv.c @@ -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)) @@ -1743,10 +1733,6 @@ read_repos(Pool *pool, struct repoinfo *repoinfos, int nrepoinfos) 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)) printf(" cached\n"); |