Hello community,

here is the log from the commit of package libsolv for openSUSE:Factory checked 
in at 2017-06-17 10:19:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libsolv (Old)
 and      /work/SRC/openSUSE:Factory/.libsolv.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libsolv"

Sat Jun 17 10:19:46 2017 rev:55 rq:501414 version:0.6.27

Changes:
--------
--- /work/SRC/openSUSE:Factory/libsolv/libsolv.changes  2017-05-04 
08:51:31.233370791 +0200
+++ /work/SRC/openSUSE:Factory/.libsolv.new/libsolv.changes     2017-06-17 
10:19:47.882761644 +0200
@@ -1,0 +2,20 @@
+Sun May 28 13:32:15 UTC 2017 - [email protected]
+
+- Enable complex/rich dependencies for CentOS/RHEL 7, matching how
+  libsolv is configured there.
+
+-------------------------------------------------------------------
+Thu May 11 12:41:07 UTC 2017 - [email protected]
+
+- Disable bzip2 and xz/lzma compression support for SLE <= 12
+
+-------------------------------------------------------------------
+Mon May  8 13:15:09 UTC 2017 - [email protected]
+
+- Enable bzip2 and xz/lzma compression support
+- Enable complex/rich dependencies on distributions with RPM 4.13+
+- Simplified CentOS/RHEL conditionals
+- Added Mageia conditionals
+- Fixed a few spec portability issues
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libsolv.spec ++++++
--- /var/tmp/diff_new_pack.jY9RAS/_old  2017-06-17 10:19:49.054596341 +0200
+++ /var/tmp/diff_new_pack.jY9RAS/_new  2017-06-17 10:19:49.058595777 +0200
@@ -31,18 +31,32 @@
 %bcond_without ruby_binding
 %bcond_with zypp
 
+%if 0%{?leap_version} >= 420300 || 0%{?sle_version} >= 120300 || 
0%{?suse_version} >= 1330 || !0%{?suse_version}
+%bcond_without bz2
+%bcond_without xz
+%else
+%bcond_with bz2
+%bcond_with xz
+%endif
+
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?mageia} >= 6 || 0%{?suse_version} >= 
1330
+%bcond_without richdeps
+%else
+%bcond_with richdeps
+%endif
+
 %if 0%{?mandriva_version}
 # force this version on mandriva
 BuildRequires:  libneon0.26-devel
 %endif
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 
600
+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
 BuildRequires:  db-devel
 %endif
 BuildRequires:  libxml2-devel
 %if 0%{?suse_version} && 0%{?suse_version} < 1100
 BuildRequires:  graphviz
 %endif
-%if 0%{?suse_version} > 1020
+%if 0%{?suse_version} > 1020 || 0%{?fedora} || 0%{?mageia}
 BuildRequires:  fdupes
 %endif
 BuildRequires:  cmake
@@ -52,27 +66,42 @@
 
 %if %{with perl_binding}
 BuildRequires:  perl
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 
600
+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
 BuildRequires:  perl-devel
 %endif
 BuildRequires:  swig
 %endif
+
 %if %{with ruby_binding}
 %global ruby_vendorarch %(ruby  -r rbconfig -e "puts 
RbConfig::CONFIG['vendorarchdir'].nil? ? RbConfig::CONFIG['sitearchdir'] : 
RbConfig::CONFIG['vendorarchdir']")
 BuildRequires:  ruby
 BuildRequires:  ruby-devel
 BuildRequires:  swig
 %endif
+
 %if %{with python_binding}
 %global python_sitearch %(python -c "from distutils.sysconfig import 
get_python_lib; print(get_python_lib(True))")
 BuildRequires:  python-devel
 BuildRequires:  swig
 %endif
+
 %if %{with python3_binding}
 %global python3_sitearch %(python3 -c "from distutils.sysconfig import 
get_python_lib; print(get_python_lib(True))")
 BuildRequires:  python3-devel
 %endif
 
+%if %{with bz2}
+%if 0%{?suse_version}
+BuildRequires:  libbz2-devel
+%else
+BuildRequires:  bzip2-devel
+%endif
+%endif
+
+%if %{with xz}
+BuildRequires:  xz-devel
+%endif
+
 Summary:        A new approach to package dependency solving
 License:        BSD-3-Clause
 Group:          Development/Libraries/C and C++
@@ -119,7 +148,7 @@
 Summary:        Applications demoing the libsolv library
 Group:          System/Management
 Requires:       curl
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 
600
+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
 Requires:       gnupg2
 %endif
 %if 0%{?suse_version}
@@ -170,8 +199,11 @@
 export CXXFLAGS="$CFLAGS"
 
 CMAKE_FLAGS=
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 
600
-CMAKE_FLAGS="-DFEDORA=1"
+%if 0%{?fedora} || 0%{?rhel} >= 6
+CMAKE_FLAGS="-DFEDORA=1 -DENABLE_APPDATA=1 -DENABLE_COMPS=1"
+%endif
+%if 0%{?mageia}
+CMAKE_FLAGS="-DMAGEIA=1 -DENABLE_APPDATA=1 -DENABLE_COMPS=1"
 %endif
 %if 0%{?suse_version}
 CMAKE_FLAGS="-DSUSE=1 -DENABLE_APPDATA=1 -DENABLE_COMPS=1"
@@ -189,10 +221,13 @@
        %{?with_python_binding:-DENABLE_PYTHON=1} \
        %{?with_python3_binding:-DENABLE_PYTHON3=1} \
        %{?with_ruby_binding:-DENABLE_RUBY=1} \
+       %{?with_bz2:-DENABLE_BZIP2_COMPRESSION=1} \
+       %{?with_xz:-DENABLE_LZMA_COMPRESSION=1} \
+       %{?with_richdeps:-DENABLE_COMPLEX_DEPS=1} \
        %{?with_zypp:-DENABLE_SUSEREPO=1 -DENABLE_HELIXREPO=1} \
        -DUSE_VENDORDIRS=1 \
        -DCMAKE_SKIP_RPATH=1
-make %{?jobs:-j %jobs}
+make %{?_smp_mflags}
 
 %install
 make DESTDIR=$RPM_BUILD_ROOT install

++++++ libsolv-0.6.27.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/CMakeLists.txt 
new/libsolv-0.6.27/CMakeLists.txt
--- old/libsolv-0.6.27/CMakeLists.txt   2017-02-28 15:04:07.000000000 +0100
+++ new/libsolv-0.6.27/CMakeLists.txt   2017-05-24 12:59:08.000000000 +0200
@@ -284,7 +284,7 @@
 
 FOREACH (VAR
   ENABLE_RPMDB ENABLE_RPMPKG ENABLE_PUBKEY ENABLE_RPMMD 
ENABLE_RPMDB_BYRPMHEADER
-  ENABLE_SUSEREPO ENABLE_COMPS
+  ENABLE_SUSEREPO ENABLE_COMPS ENABLE_TESTCASE_HELIXREPO
   ENABLE_HELIXREPO ENABLE_MDKREPO ENABLE_ARCHREPO ENABLE_DEBIAN ENABLE_HAIKU
   ENABLE_ZLIB_COMPRESSION ENABLE_LZMA_COMPRESSION ENABLE_BZIP2_COMPRESSION
   ENABLE_PGPVRFY ENABLE_APPDATA)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/bindings/python/CMakeLists.txt 
new/libsolv-0.6.27/bindings/python/CMakeLists.txt
--- old/libsolv-0.6.27/bindings/python/CMakeLists.txt   2016-11-29 
14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/bindings/python/CMakeLists.txt   2017-05-30 
14:39:09.000000000 +0200
@@ -16,6 +16,7 @@
 IF (${PYTHON_VERSION_MAJOR} GREATER 2)
     SET (SWIG_PY_FLAGS -DPYTHON3=1)
 ENDIF (${PYTHON_VERSION_MAJOR} GREATER 2)
+SET (SWIG_PY_FLAGS ${SWIG_PY_FLAGS} -DSWIG_PYTHON_LEGACY_BOOL=1)
 
 MESSAGE (STATUS "Python executable: ${PYTHON_EXECUTABLE}")
 MESSAGE (STATUS "Python installation dir: ${PYTHON_INSTALL_DIR}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/bindings/python3/CMakeLists.txt 
new/libsolv-0.6.27/bindings/python3/CMakeLists.txt
--- old/libsolv-0.6.27/bindings/python3/CMakeLists.txt  2017-03-06 
17:19:05.000000000 +0100
+++ new/libsolv-0.6.27/bindings/python3/CMakeLists.txt  2017-05-30 
14:39:09.000000000 +0200
@@ -13,13 +13,16 @@
 EXECUTE_PROCESS(COMMAND ${PYTHON3_EXECUTABLE} -c "from sys import stdout; from 
distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON3_INSTALL_DIR)
 EXECUTE_PROCESS(COMMAND ${PYTHON3_EXECUTABLE} -c "from sys import stdout; from 
distutils import sysconfig; stdout.write(sysconfig.get_python_inc())" 
OUTPUT_VARIABLE PYTHON3_INCLUDE_DIR)
 
+SET (SWIG_PY3_FLAGS -DPYTHON3=1)
+SET (SWIG_PY3_FLAGS ${SWIG_PY3_FLAGS} -DSWIG_PYTHON_LEGACY_BOOL=1)
+
 MESSAGE (STATUS "Python3 executable: ${PYTHON3_EXECUTABLE}")
 MESSAGE (STATUS "Python3 installation dir: ${PYTHON3_INSTALL_DIR}")
 MESSAGE (STATUS "Python3 include path: ${PYTHON3_INCLUDE_DIR}")
 
 ADD_CUSTOM_COMMAND (
     OUTPUT solv_python.c
-    COMMAND ${SWIG_EXECUTABLE} ${SWIG_FLAGS} -python -DPYTHON3=1 
-I${CMAKE_SOURCE_DIR}/src -o solv_python.c ${CMAKE_SOURCE_DIR}/bindings/solv.i
+    COMMAND ${SWIG_EXECUTABLE} ${SWIG_FLAGS} -python ${SWIG_PY3_FLAGS} 
-I${CMAKE_SOURCE_DIR}/src -o solv_python.c ${CMAKE_SOURCE_DIR}/bindings/solv.i
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     DEPENDS ${CMAKE_SOURCE_DIR}/bindings/solv.i
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/bindings/solv.i 
new/libsolv-0.6.27/bindings/solv.i
--- old/libsolv-0.6.27/bindings/solv.i  2017-04-26 11:09:06.000000000 +0200
+++ new/libsolv-0.6.27/bindings/solv.i  2017-05-24 16:34:08.000000000 +0200
@@ -2609,7 +2609,6 @@
 #ifdef SWIGPERL
   perliter(solv::Pool_repo_iterator)
 #endif
-  %newobject __next__;
   Repo *__next__() {
     Pool *pool = $self->pool;
     if ($self->id >= pool->nrepos)
@@ -2625,7 +2624,7 @@
   void each() {
     Repo *n;
     while ((n = Pool_repo_iterator___next__($self)) != 0) {
-      rb_yield(SWIG_NewPointerObj(SWIG_as_voidptr(n), SWIGTYPE_p_Repo, 
SWIG_POINTER_OWN | 0));
+      rb_yield(SWIG_NewPointerObj(SWIG_as_voidptr(n), SWIGTYPE_p_Repo, 0 | 0));
     }
   }
 #endif
@@ -2830,6 +2829,9 @@
   const char *lookup_location(unsigned int *OUTPUT) {
     return solvable_lookup_location($self->pool->solvables + $self->id, 
OUTPUT);
   }
+  const char *lookup_sourcepkg() {
+    return solvable_lookup_sourcepkg($self->pool->solvables + $self->id);
+  }
   %newobject Dataiterator;
   Dataiterator *Dataiterator(Id key, const char *match = 0, int flags = 0) {
     return new_Dataiterator($self->pool, 0, $self->id, key, match, flags);
@@ -3792,6 +3794,9 @@
     if (buf)
       repodata_set_bin_checksum(repo_id2repodata($self->repo, $self->id), 
solvid, keyname, solv_chksum_get_type(chksum), buf);
   }
+  void set_sourcepkg(Id solvid, const char *sourcepkg) {
+    repodata_set_sourcepkg(repo_id2repodata($self->repo, $self->id), solvid, 
sourcepkg);
+  }
   const char *lookup_str(Id solvid, Id keyname) {
     return repodata_lookup_str(repo_id2repodata($self->repo, $self->id), 
solvid, keyname);
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/doc/libsolv-bindings.3 
new/libsolv-0.6.27/doc/libsolv-bindings.3
--- old/libsolv-0.6.27/doc/libsolv-bindings.3   2016-12-14 11:39:05.000000000 
+0100
+++ new/libsolv-0.6.27/doc/libsolv-bindings.3   2017-05-19 15:14:11.000000000 
+0200
@@ -2425,6 +2425,21 @@
 .RS 4
 .\}
 .nf
+\fBconst char *lookup_sourcepkg()\fR;
+my \fR\fI$sourcepkg\fR\fB =\fR \fI$solvable\fR\fB\->lookup_sourcepkg()\fR;
+\fIsourcepkg\fR\fB \fB=\fR \fIsolvable\fR\fB\&.lookup_sourcepkg()\fR
+\fIsourcepkg\fR\fB \fB=\fR \fIsolvable\fR\fB\&.lookup_sourcepkg()\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Return a sourcepkg name associated with solvable\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
 \fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char 
*\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
 my \fI$di\fR \fB=\fR 
\fI$solvable\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR 
\fI$flags\fR\fB)\fR;
 \fIdi\fR \fB=\fR \fIsolvable\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR 
\fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
@@ -5551,6 +5566,19 @@
 .fi
 .if n \{\
 .RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBvoid set_sourcepkg(Id\fR \fIsolvid\fR\fB, const char 
*\fR\fIsourcepkg\fR\fB)\fR;
+\fI$data\fR\fB\->set_sourcepkg(\fR\fI$solvid\fR\fB, \fI$sourcepkg\fR\fB)\fR;
+\fIdata\fR\fB\&.set_sourcepkg(\fR\fIsolvid\fR\fB,\fR \fIsourcepkg\fR\fB)\fR
+\fIdata\fR\fB\&.set_sourcepkg(\fR\fIsolvid\fR\fB,\fR \fIsourcepkg\fR\fB)\fR
+.fi
+.if n \{\
+.RE
 .\}
 .sp
 .if n \{\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/doc/libsolv-bindings.txt 
new/libsolv-0.6.27/doc/libsolv-bindings.txt
--- old/libsolv-0.6.27/doc/libsolv-bindings.txt 2016-12-14 11:39:05.000000000 
+0100
+++ new/libsolv-0.6.27/doc/libsolv-bindings.txt 2017-05-19 15:14:11.000000000 
+0200
@@ -1357,6 +1357,13 @@
 media number for multi-part repositories (e.g. repositories
 spawning multiple DVDs).
 
+       const char *lookup_sourcepkg();
+       my $sourcepkg = $solvable->lookup_sourcepkg();
+       sourcepkg = solvable.lookup_sourcepkg()
+       sourcepkg = solvable.lookup_sourcepkg()
+
+Return a sourcepkg name associated with solvable.
+
        Dataiterator Dataiterator(Id keyname, const char *match = 0, int flags 
= 0)
        my $di = $solvable->Dataiterator($keyname, $match, $flags);
        di = solvable.Dataiterator(keyname, match, flags)
@@ -3412,6 +3419,11 @@
        data.set_checksum(solvid, keyname, chksum)
        data.set_checksum(solvid, keyname, chksum)
 
+       void set_sourcepkg(Id solvid, const char *sourcepkg);
+       $data.set_sourcepkg($solvid, $sourcepkg);
+       data.set_sourcepkg(solvid, sourcepkg)
+       data.set_sourcepkg(solvid, sourcepkg)
+
        void add_idarray(Id solvid, Id keyname, DepId id);
        $data->add_idarray($solvid, $keyname, $id);
        data.add_idarray(solvid, keyname, id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/examples/p5solv 
new/libsolv-0.6.27/examples/p5solv
--- old/libsolv-0.6.27/examples/p5solv  2016-11-29 14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/examples/p5solv  2017-05-30 14:49:07.000000000 +0200
@@ -256,6 +256,7 @@
 sub add_exts {
   my ($self) = @_;
   my $repodata = $self->{handle}->add_repodata(0);
+  $repodata->extend_to_repo();
   $self->add_ext($repodata, 'deltainfo', 'DL');
   $self->add_ext($repodata, 'filelists', 'FL');
   $repodata->internalize();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/examples/pysolv 
new/libsolv-0.6.27/examples/pysolv
--- old/libsolv-0.6.27/examples/pysolv  2016-11-29 14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/examples/pysolv  2017-05-30 14:49:07.000000000 +0200
@@ -391,6 +391,7 @@
 
     def add_exts(self):
         repodata = self.handle.add_repodata(0)
+        repodata.extend_to_repo()
         self.add_ext(repodata, 'deltainfo', 'DL')
         self.add_ext(repodata, 'filelists', 'FL')
         repodata.internalize()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/examples/rbsolv 
new/libsolv-0.6.27/examples/rbsolv
--- old/libsolv-0.6.27/examples/rbsolv  2016-11-29 14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/examples/rbsolv  2017-05-30 14:49:07.000000000 +0200
@@ -317,6 +317,7 @@
 
   def add_exts
     repodata = @handle.add_repodata(0)
+    repodata.extend_to_repo()
     add_ext(repodata, 'deltainfo', 'DL')
     add_ext(repodata, 'filelists', 'FL')
     repodata.internalize()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/examples/solv/repoinfo_type_mdk.c 
new/libsolv-0.6.27/examples/solv/repoinfo_type_mdk.c
--- old/libsolv-0.6.27/examples/solv/repoinfo_type_mdk.c        2016-11-29 
14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/examples/solv/repoinfo_type_mdk.c        2017-05-30 
14:49:07.000000000 +0200
@@ -103,6 +103,18 @@
   return 1;
 }
 
+static void
+mdk_add_ext(Repo *repo, Repodata *data, const char *what, const char *ext, 
const char *filename, Id chksumtype, const unsigned char *chksum)
+{
+  Id handle = repodata_new_handle(data);
+  /* we mis-use the repomd ids here... need something generic in the future */
+  repodata_set_poolstr(data, handle, REPOSITORY_REPOMD_TYPE, what);
+  repodata_set_str(data, handle, REPOSITORY_REPOMD_LOCATION, filename);
+  repodata_set_bin_checksum(data, handle, REPOSITORY_REPOMD_CHECKSUM, 
chksumtype, chksum);
+  add_ext_keys(data, handle, ext);
+  repodata_add_flexarray(data, SOLVID_META, REPOSITORY_EXTERNAL, handle);
+}
+
 int
 mdk_load(struct repoinfo *cinfo, Pool **sigpoolp)
 {
@@ -195,13 +207,8 @@
   /* setup on-demand loading of filelist data */
   if (mdk_find(md5sums, "files.xml.lzma", md5))
     {
-      Id handle = repodata_new_handle(data);
-      /* we mis-use the repomd ids here... need something generic in the 
future */
-      repodata_set_poolstr(data, handle, REPOSITORY_REPOMD_TYPE, "filelists");
-      repodata_set_str(data, handle, REPOSITORY_REPOMD_LOCATION, 
"media_info/files.xml.lzma");
-      repodata_set_bin_checksum(data, handle, REPOSITORY_REPOMD_CHECKSUM, 
REPOKEY_TYPE_MD5, md5);
-      add_ext_keys(data, handle, "FL");
-      repodata_add_flexarray(data, SOLVID_META, REPOSITORY_EXTERNAL, handle);
+      repodata_extend_block(data, repo->start, repo->end - repo->start);
+      mdk_add_ext(repo, data, "filelists", "FL", "media_info/files.xml.lzma", 
REPOKEY_TYPE_MD5, md5);
     }
   solv_free(md5sums);
   repodata_internalize(data);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/examples/solv/repoinfo_type_rpmmd.c 
new/libsolv-0.6.27/examples/solv/repoinfo_type_rpmmd.c
--- old/libsolv-0.6.27/examples/solv/repoinfo_type_rpmmd.c      2016-11-29 
14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/examples/solv/repoinfo_type_rpmmd.c      2017-05-30 
14:49:07.000000000 +0200
@@ -196,6 +196,7 @@
     }
 #endif
   data = repo_add_repodata(repo, 0);
+  repodata_extend_block(data, repo->start, repo->end - repo->start);
   repomd_add_ext(repo, data, "deltainfo", "DL");
   repomd_add_ext(repo, data, "filelists", "FL");
   repodata_internalize(data);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libsolv-0.6.27/examples/solv/repoinfo_type_susetags.c 
new/libsolv-0.6.27/examples/solv/repoinfo_type_susetags.c
--- old/libsolv-0.6.27/examples/solv/repoinfo_type_susetags.c   2016-11-29 
14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/examples/solv/repoinfo_type_susetags.c   2017-05-30 
14:49:07.000000000 +0200
@@ -47,7 +47,7 @@
   return filename;
 }
 
-void
+static void
 susetags_add_ext(Repo *repo, Repodata *data)
 {
   Pool *pool = repo->pool;
@@ -264,6 +264,7 @@
 #endif
   repo_internalize(repo);
   data = repo_add_repodata(repo, 0);
+  repodata_extend_block(data, repo->start, repo->end - repo->start);
   susetags_add_ext(repo, data);
   repodata_internalize(data);
   writecachedrepo(cinfo, 0, 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/examples/tclsolv 
new/libsolv-0.6.27/examples/tclsolv
--- old/libsolv-0.6.27/examples/tclsolv 2016-11-29 14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/examples/tclsolv 2017-05-30 14:49:07.000000000 +0200
@@ -260,6 +260,7 @@
 proc repo_repomd_add_exts {selfName} {
   upvar $selfName self
   set repodata [$self(handle) add_repodata 0]
+  $repodata extend_to_repo
   repo_repomd_add_ext self $repodata "filelists" "FL"
   $repodata internalize
 }
@@ -383,6 +384,7 @@
 proc repo_susetags_add_exts {selfName} {
   upvar $selfName self
   set repodata [$self(handle) add_repodata 0]
+  $repodata extend_to_repo
   repo_susetags_add_ext self $repodata "packages.FL" "FL"
   repo_susetags_add_ext self $repodata "packages.FL.gz" "FL"
   $repodata internalize
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/ext/repo_rpmdb.c 
new/libsolv-0.6.27/ext/repo_rpmdb.c
--- old/libsolv-0.6.27/ext/repo_rpmdb.c 2017-03-07 11:39:09.000000000 +0100
+++ new/libsolv-0.6.27/ext/repo_rpmdb.c 2017-05-11 10:59:12.000000000 +0200
@@ -262,7 +262,7 @@
   for (o = 0; o < i; o++, d += 8)
     {
       unsigned int x = d[0] << 24 | d[1] << 16 | d[2] << 8 | d[3];
-      r[o] = (unsigned long long)x << 32 | (d[4] << 24 | d[5] << 16 | d[6] << 
8 | d[7]);
+      r[o] = (unsigned long long)x << 32 | (unsigned int)(d[4] << 24 | d[5] << 
16 | d[6] << 8 | d[7]);
     }
   return r;
 }
@@ -281,7 +281,7 @@
     return 0;
   d = h->dp + o;
   i = d[0] << 24 | d[1] << 16 | d[2] << 8 | d[3];
-  return (unsigned long long)i << 32 | (d[4] << 24 | d[5] << 16 | d[6] << 8 | 
d[7]);
+  return (unsigned long long)i << 32 | (unsigned int)(d[4] << 24 | d[5] << 16 
| d[6] << 8 | d[7]);
 }
 
 static unsigned int *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/ext/testcase.c 
new/libsolv-0.6.27/ext/testcase.c
--- old/libsolv-0.6.27/ext/testcase.c   2017-04-19 11:04:07.000000000 +0200
+++ new/libsolv-0.6.27/ext/testcase.c   2017-05-30 11:04:09.000000000 +0200
@@ -23,6 +23,9 @@
 #include "testcase.h"
 #include "selection.h"
 #include "solv_xfopen.h"
+#if ENABLE_TESTCASE_HELIXREPO
+#include "ext/repo_helix.h"
+#endif
 
 #define DISABLE_JOIN2
 #include "tools_util.h"
@@ -175,6 +178,9 @@
 #ifdef ENABLE_COMPLEX_DEPS
   "complex_deps",
 #endif
+#if ENABLE_TESTCASE_HELIXREPO
+  "testcase_helixrepo",
+#endif
   0
 };
 
@@ -2266,7 +2272,7 @@
       strqueue_push(&sq, cmd);
     }
 
-  if (resultflags)
+  if ((resultflags & ~TESTCASE_RESULT_REUSE_SOLVER) != 0)
     {
       char *result;
       cmd = 0;
@@ -2513,6 +2519,10 @@
   int ngenid = 0;
   Queue autoinstq;
 
+  if (resultp)
+    *resultp = 0;
+  if (resultflagsp)
+    *resultflagsp = 0;
   if (!fp && !(fp = fopen(testcase, "r")))
     {
       pool_debug(pool, SOLV_ERROR, "testcase_read: could not open '%s'\n", 
testcase);
@@ -2617,10 +2627,9 @@
                  repo_add_solv(repo, rfp, 0);
                  fclose(rfp);
                }
-#if 0
+#if ENABLE_TESTCASE_HELIXREPO
              else if (!strcmp(repotype, "helix"))
                {
-                 extern int repo_add_helix(Repo *repo, FILE *fp, int flags);
                  repo_add_helix(repo, rfp, 0);
                  fclose(rfp);
                }
@@ -2794,8 +2803,10 @@
          if (resultflagsp)
            *resultflagsp = resultflags;
        }
-      else if (!strcmp(pieces[0], "nextjob") && npieces == 1)
+      else if (!strcmp(pieces[0], "nextjob"))
        {
+         if (npieces == 2 && resultflagsp && !strcmp(pieces[1], "reusesolver"))
+           *resultflagsp |= TESTCASE_RESULT_REUSE_SOLVER;
          break;
        }
       else if (!strcmp(pieces[0], "disable") && npieces == 3)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/ext/testcase.h 
new/libsolv-0.6.27/ext/testcase.h
--- old/libsolv-0.6.27/ext/testcase.h   2016-11-29 14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/ext/testcase.h   2017-05-30 11:04:09.000000000 +0200
@@ -19,6 +19,9 @@
 #define TESTCASE_RESULT_GENID          (1 << 7)
 #define TESTCASE_RESULT_REASON         (1 << 8)
 
+/* reuse solver hack, testsolv use only */
+#define TESTCASE_RESULT_REUSE_SOLVER   (1 << 31)
+
 extern Id testcase_str2dep(Pool *pool, const char *s);
 extern const char *testcase_dep2str(Pool *pool, Id id);
 extern const char *testcase_repoid2str(Pool *pool, Id repoid);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/package/libsolv.changes 
new/libsolv-0.6.27/package/libsolv.changes
--- old/libsolv-0.6.27/package/libsolv.changes  2017-04-26 11:09:06.000000000 
+0200
+++ new/libsolv-0.6.27/package/libsolv.changes  2017-05-30 10:39:07.000000000 
+0200
@@ -1,4 +1,24 @@
 -------------------------------------------------------------------
+Sun May 28 13:32:15 UTC 2017 - [email protected]
+
+- Enable complex/rich dependencies for CentOS/RHEL 7, matching how
+  libsolv is configured there.
+
+-------------------------------------------------------------------
+Thu May 11 12:41:07 UTC 2017 - [email protected]
+
+- Disable bzip2 and xz/lzma compression support for SLE <= 12
+
+-------------------------------------------------------------------
+Mon May  8 13:15:09 UTC 2017 - [email protected]
+
+- Enable bzip2 and xz/lzma compression support
+- Enable complex/rich dependencies on distributions with RPM 4.13+
+- Simplified CentOS/RHEL conditionals
+- Added Mageia conditionals
+- Fixed a few spec portability issues
+
+-------------------------------------------------------------------
 Tue Apr 25 14:11:05 CEST 2017 - [email protected]
 
 - change queue resize code to use adaptive chunk sizes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/package/libsolv.spec.in 
new/libsolv-0.6.27/package/libsolv.spec.in
--- old/libsolv-0.6.27/package/libsolv.spec.in  2017-02-28 15:09:05.000000000 
+0100
+++ new/libsolv-0.6.27/package/libsolv.spec.in  2017-05-30 11:04:09.000000000 
+0200
@@ -30,18 +30,32 @@
 %bcond_without ruby_binding
 %bcond_with zypp
 
+%if 0%{?leap_version} >= 420300 || 0%{?sle_version} >= 120300 || 
0%{?suse_version} >= 1330 || !0%{?suse_version}
+%bcond_without bz2
+%bcond_without xz
+%else
+%bcond_with bz2
+%bcond_with xz
+%endif
+
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?mageia} >= 6 || 0%{?suse_version} >= 
1330
+%bcond_without richdeps
+%else
+%bcond_with richdeps
+%endif
+
 %if 0%{?mandriva_version}
 # force this version on mandriva
 BuildRequires:  libneon0.26-devel
 %endif
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 
600
+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
 BuildRequires:  db-devel
 %endif
 BuildRequires:  libxml2-devel
 %if 0%{?suse_version} && 0%{?suse_version} < 1100
 BuildRequires:  graphviz
 %endif
-%if 0%{?suse_version} > 1020
+%if 0%{?suse_version} > 1020 || 0%{?fedora} || 0%{?mageia}
 BuildRequires:  fdupes
 %endif
 BuildRequires:  cmake
@@ -51,27 +65,43 @@
 
 %if %{with perl_binding}
 BuildRequires:  perl
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 
600
+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
 BuildRequires:  perl-devel
 %endif
 BuildRequires:  swig
 %endif
+
 %if %{with ruby_binding}
 %global ruby_vendorarch %(ruby  -r rbconfig -e "puts 
RbConfig::CONFIG['vendorarchdir'].nil? ? RbConfig::CONFIG['sitearchdir'] : 
RbConfig::CONFIG['vendorarchdir']")
 BuildRequires:  ruby
 BuildRequires:  ruby-devel
 BuildRequires:  swig
 %endif
+
 %if %{with python_binding}
 %global python_sitearch %(python -c "from distutils.sysconfig import 
get_python_lib; print(get_python_lib(True))")
 BuildRequires:  python-devel
 BuildRequires:  swig
 %endif
+
 %if %{with python3_binding}
 %global python3_sitearch %(python3 -c "from distutils.sysconfig import 
get_python_lib; print(get_python_lib(True))")
 BuildRequires:  python3-devel
 %endif
 
+%if %{with bz2}
+%if 0%{?suse_version}
+BuildRequires:  libbz2-devel
+%else
+BuildRequires:  bzip2-devel
+%endif
+%endif
+
+%if %{with xz}
+BuildRequires:  xz-devel
+%endif
+
+
 Summary:        A new approach to package dependency solving
 License:        BSD-3-Clause
 Group:          Development/Libraries/C and C++
@@ -115,7 +145,7 @@
 Summary:        Applications demoing the libsolv library
 Group:          System/Management
 Requires:       curl
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 
600
+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
 Requires:       gnupg2
 %endif
 %if 0%{?suse_version}
@@ -166,8 +196,11 @@
 export CXXFLAGS="$CFLAGS"
 
 CMAKE_FLAGS=
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 
600
-CMAKE_FLAGS="-DFEDORA=1"
+%if 0%{?fedora} || 0%{?rhel} >= 6
+CMAKE_FLAGS="-DFEDORA=1 -DENABLE_APPDATA=1 -DENABLE_COMPS=1"
+%endif
+%if 0%{?mageia}
+CMAKE_FLAGS="-DMAGEIA=1 -DENABLE_APPDATA=1 -DENABLE_COMPS=1"
 %endif
 %if 0%{?suse_version}
 CMAKE_FLAGS="-DSUSE=1 -DENABLE_APPDATA=1 -DENABLE_COMPS=1"
@@ -185,10 +218,13 @@
        %{?with_python_binding:-DENABLE_PYTHON=1} \
        %{?with_python3_binding:-DENABLE_PYTHON3=1} \
        %{?with_ruby_binding:-DENABLE_RUBY=1} \
+       %{?with_bz2:-DENABLE_BZIP2_COMPRESSION=1} \
+       %{?with_xz:-DENABLE_LZMA_COMPRESSION=1} \
+       %{?with_richdeps:-DENABLE_COMPLEX_DEPS=1} \
        %{?with_zypp:-DENABLE_SUSEREPO=1 -DENABLE_HELIXREPO=1} \
        -DUSE_VENDORDIRS=1 \
        -DCMAKE_SKIP_RPATH=1
-make %{?jobs:-j %jobs}
+make %{?_smp_mflags}
 
 %install
 make DESTDIR=$RPM_BUILD_ROOT install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/src/libsolv.ver 
new/libsolv-0.6.27/src/libsolv.ver
--- old/libsolv-0.6.27/src/libsolv.ver  2017-02-15 11:39:06.000000000 +0100
+++ new/libsolv-0.6.27/src/libsolv.ver  2017-05-23 11:54:07.000000000 +0200
@@ -422,3 +422,7 @@
        local:
                *;
 };
+
+SOLV_1.1 {
+               pool_best_solvables;
+} SOLV_1.0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/src/policy.c 
new/libsolv-0.6.27/src/policy.c
--- old/libsolv-0.6.27/src/policy.c     2016-12-08 14:54:09.000000000 +0100
+++ new/libsolv-0.6.27/src/policy.c     2017-05-23 11:54:07.000000000 +0200
@@ -1353,6 +1353,22 @@
     }
 }
 
+void
+pool_best_solvables(Pool *pool, Queue *plist, int flags)
+{
+  if (plist->count > 1)
+    prune_to_highest_prio(pool, plist);
+  if (plist->count > 1)
+    prune_to_best_arch(pool, plist);
+  if (plist->count > 1)
+    prune_to_best_version(pool, plist);
+  if (plist->count > 1)
+    {
+      dislike_old_versions(pool, plist);
+      sort_by_common_dep(pool, plist);
+    }
+}
+
 
 /* check if there is an illegal architecture change if
  * installed solvable s1 is replaced by s2 */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/src/policy.h 
new/libsolv-0.6.27/src/policy.h
--- old/libsolv-0.6.27/src/policy.h     2016-11-29 14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/src/policy.h     2017-05-23 11:54:07.000000000 +0200
@@ -38,6 +38,8 @@
 
 extern void policy_create_obsolete_index(Solver *solv);
 
+extern void pool_best_solvables(Pool *pool, Queue *plist, int flags);
+
 /* internal, do not use */
 extern void prune_to_best_version(Pool *pool, Queue *plist);
 extern void policy_prefer_favored(Solver *solv, Queue *plist);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/src/poolarch.c 
new/libsolv-0.6.27/src/poolarch.c
--- old/libsolv-0.6.27/src/poolarch.c   2016-11-29 14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/src/poolarch.c   2017-05-19 15:14:11.000000000 +0200
@@ -35,11 +35,11 @@
   "ia64",      "ia64:i686:i586:i486:i386",
   "armv7hnl",  "armv7hnl:armv7hl:armv6hl",
   "armv7hl",   "armv7hl:armv6hl",
-  "armv7l",    "armv7l:armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
-  "armv6l",    "armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
-  "armv5tejl", "armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
-  "armv5tel",  "armv5tel:armv5l:armv4tl:armv4l:armv3l",
-  "armv5tl",   "armv5l:armv4tl:armv4l:armv3l",
+  "armv7l",    
"armv7l:armv6l:armv5tejl:armv5tel:armv5tl:armv5l:armv4tl:armv4l:armv3l",
+  "armv6l",    
"armv6l:armv5tejl:armv5tel:armv5tl:armv5l:armv4tl:armv4l:armv3l",
+  "armv5tejl", "armv5tejl:armv5tel:armv5tl:armv5l:armv4tl:armv4l:armv3l",
+  "armv5tel",  "armv5tel:armv5tl:armv5l:armv4tl:armv4l:armv3l",
+  "armv5tl",   "armv5tl:armv5l:armv4tl:armv4l:armv3l",
   "armv5l",    "armv5l:armv4tl:armv4l:armv3l",
   "armv4tl",   "armv4tl:armv4l:armv3l",
   "armv4l",    "armv4l:armv3l",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/src/poolvendor.c 
new/libsolv-0.6.27/src/poolvendor.c
--- old/libsolv-0.6.27/src/poolvendor.c 2016-11-29 14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/src/poolvendor.c 2017-05-29 12:59:07.000000000 +0200
@@ -5,15 +5,14 @@
  * for further information
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 /* we need FNM_CASEFOLD */
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <fnmatch.h>
 
 #include "pool.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/src/solver.c 
new/libsolv-0.6.27/src/solver.c
--- old/libsolv-0.6.27/src/solver.c     2017-03-13 16:04:07.000000000 +0100
+++ new/libsolv-0.6.27/src/solver.c     2017-05-24 12:59:08.000000000 +0200
@@ -1110,6 +1110,35 @@
   enabledisablelearntrules(solv);
 }
 
+static inline int
+queue_contains(Queue *q, Id id)
+{
+  int i;
+  for (i = 0; i < q->count; i++)
+    if (q->elements[i] == id)
+      return 1;
+  return 0;
+}
+
+static void
+disable_recommendsrules(Solver *solv, Queue *weakq)
+{
+  Pool *pool = solv->pool;
+  int i;
+  for (i = 0; i < weakq->count; i++)
+    {
+      Rule *r;
+      if (!queue_contains(solv->recommendsruleq, weakq->elements[i]))
+       continue;
+      r = solv->rules + weakq->elements[i];
+      if (r->d >= 0)
+       {
+         POOL_DEBUG(SOLV_DEBUG_UNSOLVABLE, "disabling ");
+         solver_printruleclass(solv, SOLV_DEBUG_UNSOLVABLE, r);
+         solver_disablerule(solv, r);
+       }
+    }
+}
 
 /*-------------------------------------------------------------------
  *
@@ -1119,7 +1148,7 @@
  */
 
 static void
-analyze_unsolvable_rule(Solver *solv, Rule *r, Id *lastweakp, Map *rseen)
+analyze_unsolvable_rule(Solver *solv, Rule *r, Queue *weakq, Map *rseen)
 {
   Pool *pool = solv->pool;
   int i;
@@ -1134,12 +1163,11 @@
       MAPSET(rseen, why - solv->learntrules);
       for (i = solv->learnt_why.elements[why - solv->learntrules]; 
solv->learnt_pool.elements[i]; i++)
        if (solv->learnt_pool.elements[i] > 0)
-         analyze_unsolvable_rule(solv, solv->rules + 
solv->learnt_pool.elements[i], lastweakp, rseen);
+         analyze_unsolvable_rule(solv, solv->rules + 
solv->learnt_pool.elements[i], weakq, rseen);
       return;
     }
-  if (solv->weakrulemap.size && MAPTST(&solv->weakrulemap, why))
-    if (!*lastweakp || why > *lastweakp)
-      *lastweakp = why;
+  if (solv->weakrulemap.size && MAPTST(&solv->weakrulemap, why) && weakq)
+    queue_push(weakq, why);
   /* do not add pkg rules to problem */
   if (why < solv->pkgrules_end)
     return;
@@ -1200,12 +1228,12 @@
   Rule *r;
   Map involved;                /* global to speed things up? */
   Map rseen;
+  Queue weakq;
   Id pp, v, vv, why;
   int i, idx;
   Id *decisionmap = solv->decisionmap;
   int oldproblemcount;
   int oldlearntpoolcount;
-  Id lastweak;
   int record_proof = 1;
 
   POOL_DEBUG(SOLV_DEBUG_UNSOLVABLE, "ANALYZE UNSOLVABLE 
----------------------\n");
@@ -1221,10 +1249,10 @@
   r = cr;
   map_init(&involved, pool->nsolvables);
   map_init(&rseen, solv->learntrules ? solv->nrules - solv->learntrules : 0);
+  queue_init(&weakq);
   if (record_proof)
     queue_push(&solv->learnt_pool, r - solv->rules);
-  lastweak = 0;
-  analyze_unsolvable_rule(solv, r, &lastweak, &rseen);
+  analyze_unsolvable_rule(solv, r, &weakq, &rseen);
   FOR_RULELITERALS(v, pp, r)
     {
       if (DECISIONMAP_TRUE(v)) /* the one true literal */
@@ -1244,7 +1272,7 @@
       if (record_proof)
         queue_push(&solv->learnt_pool, why);
       r = solv->rules + why;
-      analyze_unsolvable_rule(solv, r, &lastweak, &rseen);
+      analyze_unsolvable_rule(solv, r, &weakq, &rseen);
       FOR_RULELITERALS(v, pp, r)
        {
          if (DECISIONMAP_TRUE(v))      /* the one true literal */
@@ -1257,11 +1285,25 @@
   map_free(&rseen);
   queue_push(&solv->problems, 0);      /* mark end of this problem */
 
-  if (lastweak)
+  if (weakq.count)
     {
-      /* disable last weak rule */
+      Id lastweak;
+      /* revert problems */
       solv->problems.count = oldproblemcount;
       solv->learnt_pool.count = oldlearntpoolcount;
+      /* find last weak */
+      lastweak = 0;
+      for (i = 0; i < weakq.count; i++)
+       if (weakq.elements[i] > lastweak)
+         lastweak = weakq.elements[i];
+      if (lastweak < solv->pkgrules_end && solv->strongrecommends && 
solv->recommendsruleq && queue_contains(solv->recommendsruleq, lastweak))
+       {
+         disable_recommendsrules(solv, &weakq);
+         queue_free(&weakq);
+         solver_reset(solv);
+         return 0;
+       }
+      queue_free(&weakq);
       if (lastweak >= solv->jobrules && lastweak < solv->jobrules_end)
        v = -(solv->ruletojob.elements[lastweak - solv->jobrules] + 1);
       else
@@ -1276,6 +1318,7 @@
       solver_reset(solv);
       return 0;
     }
+  queue_free(&weakq);
 
   if (solv->allowuninstall || solv->allowuninstall_all || 
solv->allowuninstallmap.size)
     if (autouninstall(solv, solv->problems.elements + oldproblemcount + 1) != 
0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/test/testcases/sat/reuse.t 
new/libsolv-0.6.27/test/testcases/sat/reuse.t
--- old/libsolv-0.6.27/test/testcases/sat/reuse.t       1970-01-01 
01:00:00.000000000 +0100
+++ new/libsolv-0.6.27/test/testcases/sat/reuse.t       2017-05-30 
11:04:09.000000000 +0200
@@ -0,0 +1,20 @@
+repo system 0 testtags <inline>
+#>=Pkg: X 1 1 x86_64
+repo available 0 testtags <inline>
+#>=Pkg: A 1 1 x86_64
+#>=Req: X
+#>=Pkg: B 1 1 x86_64
+job install name A
+result transaction,problems,rules <inline>
+#>install A-1-1.x86_64@available
+#>install X-1-1.x86_64@system
+#>rule job 300db6ce502dde94261e267a8c535441  A-1-1.x86_64@available
+#>rule pkg 11c27e407a56aad27bd6b3eadc17374b  X-1-1.x86_64@system
+#>rule pkg 11c27e407a56aad27bd6b3eadc17374b -A-1-1.x86_64@available
+nextjob reusesolver
+job install name B
+result transaction,problems,rules <inline>
+#>install B-1-1.x86_64@available
+#>rule job ad168c1819736b8aa6f507ab075b3494  B-1-1.x86_64@available
+#>rule pkg 11c27e407a56aad27bd6b3eadc17374b  X-1-1.x86_64@system
+#>rule pkg 11c27e407a56aad27bd6b3eadc17374b -A-1-1.x86_64@available
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libsolv-0.6.27/test/testcases/strongrecommends/break.t 
new/libsolv-0.6.27/test/testcases/strongrecommends/break.t
--- old/libsolv-0.6.27/test/testcases/strongrecommends/break.t  1970-01-01 
01:00:00.000000000 +0100
+++ new/libsolv-0.6.27/test/testcases/strongrecommends/break.t  2017-05-25 
14:49:08.000000000 +0200
@@ -0,0 +1,28 @@
+#
+# A recommends B and B recommends C
+#
+# With strongrecommends, we get the following
+# rules:
+#   A -> B
+#   B -> C
+# after pkg rules sorting, this will be (-B is less than -A)
+#   B -> C (weak)
+#   A -> B (weak)
+# If just the last weak rule is broken, only A will be
+# installed but but B. So the code now breaks all weak
+# recommends rules.
+repo system 0 testtags <inline>
+#>=Pkg: X 1 1 noarch
+#>=Con: C
+repo available 0 testtags <inline>
+#>=Pkg: A 1 2 noarch
+#>=Rec: B
+#>=Pkg: B 1 1 noarch
+#>=Rec: C
+#>=Pkg: C 1 1 noarch
+system i686 rpm system
+solverflags strongrecommends
+job install name A
+result transaction,problems <inline>
+#>install A-1-2.noarch@available
+#>install B-1-1.noarch@available
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libsolv-0.6.27/test/testcases/strongrecommends/strongr.t 
new/libsolv-0.6.27/test/testcases/strongrecommends/strongr.t
--- old/libsolv-0.6.27/test/testcases/strongrecommends/strongr.t        
1970-01-01 01:00:00.000000000 +0100
+++ new/libsolv-0.6.27/test/testcases/strongrecommends/strongr.t        
2017-05-25 14:49:08.000000000 +0200
@@ -0,0 +1,27 @@
+# test strong recommends
+#
+# with normal recommends, the solver will
+# not backtrack to fulfill them.
+#
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Con: C
+#>=Pkg: A2 1 1 noarch
+#>=Con: C2
+repo available 0 testtags <inline>
+#>=Pkg: A 1 2 noarch
+#>=Pkg: B 1 1 noarch
+#>=Rec: C
+#>=Pkg: C 1 1 noarch
+#>=Pkg: B2 1 1 noarch
+#>=Rec: C2
+#>=Pkg: C2 1 1 noarch
+system i686 rpm system
+solverflags strongrecommends
+job install name B
+job install name B2
+result transaction,problems <inline>
+#>install B-1-1.noarch@available
+#>install B2-1-1.noarch@available
+#>install C-1-1.noarch@available
+#>upgrade A-1-1.noarch@system A-1-2.noarch@available
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.6.27/tools/testsolv.c 
new/libsolv-0.6.27/tools/testsolv.c
--- old/libsolv-0.6.27/tools/testsolv.c 2016-11-29 14:45:33.000000000 +0100
+++ new/libsolv-0.6.27/tools/testsolv.c 2017-05-30 11:04:09.000000000 +0200
@@ -68,7 +68,7 @@
   Pool *pool;
   Queue job;
   Queue solq;
-  Solver *solv;
+  Solver *solv, *reusesolv = 0;
   char *result = 0;
   int resultflags = 0;
   int debuglevel = 0;
@@ -140,7 +140,12 @@
              pool_free(pool);
              exit(resultflags == 77 ? 77 : 1);
            }
-
+         if (reusesolv)
+           {
+             solver_free(solv);
+             solv = reusesolv;
+             reusesolv = 0;
+           }
          if (!multijob && !feof(fp))
            multijob = 1;
 
@@ -179,8 +184,8 @@
              solver_solve(solv, &job);
              solv->solution_callback = 0;
              solv->solution_callback_data = 0;
-             if (!resultflags)
-               resultflags = TESTCASE_RESULT_TRANSACTION | 
TESTCASE_RESULT_PROBLEMS;
+             if ((resultflags & ~TESTCASE_RESULT_REUSE_SOLVER) == 0)
+               resultflags |= TESTCASE_RESULT_TRANSACTION | 
TESTCASE_RESULT_PROBLEMS;
              myresult = testcase_solverresult(solv, resultflags);
              if (rescallback && reportsolutiondata.result)
                {
@@ -292,8 +297,13 @@
                }
            }
          queue_free(&job);
-         solver_free(solv);
+         if ((resultflags & TESTCASE_RESULT_REUSE_SOLVER) != 0 && !feof(fp))
+           reusesolv = solv;
+         else
+           solver_free(solv);
        }
+      if (reusesolv)
+       solver_free(reusesolv);
       pool_free(pool);
       fclose(fp);
     }


Reply via email to