]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- make old rpmdb pubkey support optional
authorMichael Schroeder <mls@suse.de>
Mon, 20 Feb 2012 15:47:36 +0000 (16:47 +0100)
committerMichael Schroeder <mls@suse.de>
Mon, 20 Feb 2012 15:47:36 +0000 (16:47 +0100)
CMakeLists.txt
examples/solv.c
ext/repo_rpmdb.c

index fd5f75ee500bebdb9188a0b9e528de76fb78ee75..539199ee8920ffa79ea3274d7d2030d6b2017ccd 100644 (file)
@@ -12,6 +12,7 @@ OPTION (ENABLE_RUBY "Build the ruby bindings?" OFF)
 OPTION (USE_VENDORDIRS "Install the bindings in vendor directories?" OFF)
 
 OPTION (ENABLE_RPMDB "Build with rpm database support?" OFF)
+OPTION (ENABLE_RPMDB_PUBKEY "Build with rpmdb pubkey support?" OFF)
 OPTION (ENABLE_RPMMD "Build with rpmmd repository support?" OFF)
 OPTION (ENABLE_SUSEREPO "Build with suse repository support?" OFF)
 OPTION (ENABLE_COMPS "Build with fedora comps support?" OFF)
@@ -86,6 +87,7 @@ IF (NOT ENABLE_RPMDB AND
     NOT ENABLE_HELIXREPO AND
     NOT ENABLE_DEBIAN)
     SET (ENABLE_RPMDB ON)
+    SET (ENABLE_RPMDB_PUBKEY ON)
     SET (ENABLE_RPMMD ON)
     SET (ENABLE_SUSEREPO ON)
     SET (ENABLE_HELIXREPO ON)
@@ -129,7 +131,8 @@ TEST_BIG_ENDIAN (WORDS_BIGENDIAN)
 
 # should create config.h with #cmakedefine instead...
 FOREACH (VAR HAVE_STRCHRNUL HAVE_FOPENCOOKIE HAVE_FUNOPEN WORDS_BIGENDIAN
-  ENABLE_RPMDB ENABLE_RPMMD ENABLE_SUSEREPO ENABLE_COMPS ENABLE_HELIXREPO ENABLE_DEBIAN)
+  ENABLE_RPMDB ENABLE_RPMDB_PUBKEY ENABLE_RPMMD ENABLE_SUSEREPO ENABLE_COMPS
+  ENABLE_HELIXREPO ENABLE_DEBIAN)
   IF(${VAR})
     ADD_DEFINITIONS (-D${VAR}=1)
   ENDIF (${VAR})
index 4e3cdbed90530ceb172309dd617a1944cd8b07ca..dd3ff5eb7734c01c63e770600590d18f342b0f87 100644 (file)
@@ -1206,7 +1206,7 @@ static Pool *
 read_sigs()
 {
   Pool *sigpool = pool_create();
-#ifdef ENABLE_RPMDB
+#if defined(ENABLE_RPMDB_PUBKEYS)
   Repo *repo = repo_create(sigpool, "rpmdbkeys");
   repo_add_rpmdb_pubkeys(repo, 0, 0);
 #endif
index 4dcd956d7821e56a0217f209a4ecab78243dd929..5eccfeca5491946fcaa358b8dc7dee2c095f2187 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Novell Inc.
+ * Copyright (c) 2007-2012, Novell Inc.
  *
  * This program is licensed under the BSD license, read LICENSE.BSD
  * for further information
@@ -2528,6 +2528,8 @@ rpm_byrpmh(Header h, void **statep)
 }
 
 
+#ifdef ENABLE_RPM_PUBKEY
+
 static char *
 r64dec1(char *p, unsigned int *vp, int *eofp)
 {
@@ -3142,3 +3144,5 @@ repo_add_pubkeys(Repo *repo, const char **keys, int nkeys, int flags)
     repodata_internalize(data);
   return 0;
 }
+
+#endif /* ENABLE_RPM_PUBKEY */