Imported Upstream version 0.6.6 05/94105/1 upstream/0.6.6
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 27 Oct 2016 05:53:30 +0000 (14:53 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 27 Oct 2016 05:53:30 +0000 (14:53 +0900)
Change-Id: I39261d63e28e2f057203bd11bd6b1cbb83523fab
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
57 files changed:
CMakeLists.txt
README
VERSION.cmake
bindings/solv.i
doc/CMakeLists.txt
doc/Makefile.gen
doc/appdata2solv.1 [new file with mode: 0644]
doc/appdata2solv.txt [new file with mode: 0644]
doc/archpkgs2solv.1 [new file with mode: 0644]
doc/archpkgs2solv.txt [new file with mode: 0644]
doc/archrepo2solv.1 [new file with mode: 0644]
doc/archrepo2solv.txt [new file with mode: 0644]
doc/comps2solv.1 [new file with mode: 0644]
doc/comps2solv.txt [new file with mode: 0644]
doc/deb2solv.1 [new file with mode: 0644]
doc/deb2solv.txt [new file with mode: 0644]
doc/deltainfoxml2solv.1 [new file with mode: 0644]
doc/deltainfoxml2solv.txt [new file with mode: 0644]
doc/dumpsolv.1 [new file with mode: 0644]
doc/dumpsolv.txt [new file with mode: 0644]
doc/helix2solv.1 [new file with mode: 0644]
doc/helix2solv.txt [new file with mode: 0644]
doc/installcheck.1 [new file with mode: 0644]
doc/installcheck.txt [new file with mode: 0644]
doc/libsolv-bindings.3
doc/libsolv-bindings.txt
doc/libsolv-constantids.3
doc/libsolv-pool.3
doc/mdk2solv.1 [new file with mode: 0644]
doc/mdk2solv.txt [new file with mode: 0644]
doc/mergesolv.1 [new file with mode: 0644]
doc/mergesolv.txt [new file with mode: 0644]
doc/repomdxml2solv.1 [new file with mode: 0644]
doc/repomdxml2solv.txt [new file with mode: 0644]
doc/rpmdb2solv.1 [new file with mode: 0644]
doc/rpmdb2solv.txt [new file with mode: 0644]
doc/rpmmd2solv.1 [new file with mode: 0644]
doc/rpmmd2solv.txt [new file with mode: 0644]
doc/rpms2solv.1 [new file with mode: 0644]
doc/rpms2solv.txt [new file with mode: 0644]
doc/susetags2solv.1 [new file with mode: 0644]
doc/susetags2solv.txt [new file with mode: 0644]
doc/testsolv.1 [new file with mode: 0644]
doc/testsolv.txt [new file with mode: 0644]
doc/updateinfoxml2solv.1 [new file with mode: 0644]
doc/updateinfoxml2solv.txt [new file with mode: 0644]
ext/CMakeLists.txt
ext/repo_rpmdb.c
ext/repo_rpmmd.c
package/libsolv.changes
package/libsolv.spec.in
src/CMakeLists.txt
src/problems.c
src/rules.c
src/rules.h
src/solver.c
src/solver.h

index 816c333..7e1e342 100644 (file)
@@ -46,6 +46,13 @@ ELSE (DEFINED  LIB)
   SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
 ENDIF (DEFINED  LIB)
 MESSAGE (STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}")
   SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
 ENDIF (DEFINED  LIB)
 MESSAGE (STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}")
+# Library
+IF (DEFINED INCLUDE)
+  SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${INCLUDE}")
+else (DEFINED INCLUDE)
+  SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
+ENDIF (DEFINED  INCLUDE)
+MESSAGE (STATUS "Header files will be installed in ${INCLUDE_INSTALL_DIR}")
 SET (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
 SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/man")
 IF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man"  AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man")
 SET (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
 SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/man")
 IF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man"  AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man")
diff --git a/README b/README
index bb8f022..5942468 100644 (file)
--- a/README
+++ b/README
@@ -9,7 +9,11 @@ This code is based on two major, but independent, blocks:
  2. Using satisfiability, a well known and researched topic, for
     resolving package dependencies.
 
  2. Using satisfiability, a well known and researched topic, for
     resolving package dependencies.
 
-Google for 'sat solver' to get links to the theory behind it.
+The sat-solver code has been written to aim for the newest packages,
+record the decison tree to provide introspection, and also allows to
+provide the user with suggestions on how to deal with unsolvable
+problems. It also takes advantage of the repository storage to
+minimize memory usage.
 
 Supported package formats:
   - rpm/rpm5
 
 Supported package formats:
   - rpm/rpm5
index 324dfa7..20b844e 100644 (file)
@@ -49,5 +49,5 @@ SET(LIBSOLVEXT_SOVERSION "0")
 
 SET(LIBSOLV_MAJOR "0")
 SET(LIBSOLV_MINOR "6")
 
 SET(LIBSOLV_MAJOR "0")
 SET(LIBSOLV_MINOR "6")
-SET(LIBSOLV_PATCH "5")
+SET(LIBSOLV_PATCH "6")
 
 
index e8acd35..20facc5 100644 (file)
@@ -2720,16 +2720,16 @@ rb_eval_string(
 
 %extend Solver {
   static const int SOLVER_RULE_UNKNOWN = SOLVER_RULE_UNKNOWN;
 
 %extend Solver {
   static const int SOLVER_RULE_UNKNOWN = SOLVER_RULE_UNKNOWN;
-  static const int SOLVER_RULE_RPM = SOLVER_RULE_RPM;
-  static const int SOLVER_RULE_RPM_NOT_INSTALLABLE = SOLVER_RULE_RPM_NOT_INSTALLABLE;
-  static const int SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP = SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP;
-  static const int SOLVER_RULE_RPM_PACKAGE_REQUIRES = SOLVER_RULE_RPM_PACKAGE_REQUIRES;
-  static const int SOLVER_RULE_RPM_SELF_CONFLICT = SOLVER_RULE_RPM_SELF_CONFLICT;
-  static const int SOLVER_RULE_RPM_PACKAGE_CONFLICT = SOLVER_RULE_RPM_PACKAGE_CONFLICT;
-  static const int SOLVER_RULE_RPM_SAME_NAME = SOLVER_RULE_RPM_SAME_NAME;
-  static const int SOLVER_RULE_RPM_PACKAGE_OBSOLETES = SOLVER_RULE_RPM_PACKAGE_OBSOLETES;
-  static const int SOLVER_RULE_RPM_IMPLICIT_OBSOLETES = SOLVER_RULE_RPM_IMPLICIT_OBSOLETES;
-  static const int SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES = SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES;
+  static const int SOLVER_RULE_PKG = SOLVER_RULE_PKG;
+  static const int SOLVER_RULE_PKG_NOT_INSTALLABLE = SOLVER_RULE_PKG_NOT_INSTALLABLE;
+  static const int SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP = SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP;
+  static const int SOLVER_RULE_PKG_REQUIRES = SOLVER_RULE_PKG_REQUIRES;
+  static const int SOLVER_RULE_PKG_SELF_CONFLICT = SOLVER_RULE_PKG_SELF_CONFLICT;
+  static const int SOLVER_RULE_PKG_CONFLICTS = SOLVER_RULE_PKG_CONFLICTS;
+  static const int SOLVER_RULE_PKG_SAME_NAME = SOLVER_RULE_PKG_SAME_NAME;
+  static const int SOLVER_RULE_PKG_OBSOLETES = SOLVER_RULE_PKG_OBSOLETES;
+  static const int SOLVER_RULE_PKG_IMPLICIT_OBSOLETES = SOLVER_RULE_PKG_IMPLICIT_OBSOLETES;
+  static const int SOLVER_RULE_PKG_INSTALLED_OBSOLETES = SOLVER_RULE_PKG_INSTALLED_OBSOLETES;
   static const int SOLVER_RULE_UPDATE = SOLVER_RULE_UPDATE;
   static const int SOLVER_RULE_FEATURE = SOLVER_RULE_FEATURE;
   static const int SOLVER_RULE_JOB = SOLVER_RULE_JOB;
   static const int SOLVER_RULE_UPDATE = SOLVER_RULE_UPDATE;
   static const int SOLVER_RULE_FEATURE = SOLVER_RULE_FEATURE;
   static const int SOLVER_RULE_JOB = SOLVER_RULE_JOB;
@@ -2792,6 +2792,9 @@ rb_eval_string(
   static const int SOLVER_REASON_RECOMMENDED = SOLVER_REASON_RECOMMENDED;
   static const int SOLVER_REASON_SUPPLEMENTED = SOLVER_REASON_SUPPLEMENTED;
 
   static const int SOLVER_REASON_RECOMMENDED = SOLVER_REASON_RECOMMENDED;
   static const int SOLVER_REASON_SUPPLEMENTED = SOLVER_REASON_SUPPLEMENTED;
 
+  /* legacy */
+  static const int SOLVER_RULE_RPM = SOLVER_RULE_RPM;
+
   ~Solver() {
     solver_free($self);
   }
   ~Solver() {
     solver_free($self);
   }
index fc588e7..13e086c 100644 (file)
@@ -1,8 +1,51 @@
 
 
-SET (libsolv_MANPAGES
+SET (libsolv_MANPAGES3
     libsolv.3 libsolv-bindings.3 libsolv-constantids.3 libsolv-history.3
     libsolv-pool.3)
 
     libsolv.3 libsolv-bindings.3 libsolv-constantids.3 libsolv-history.3
     libsolv-pool.3)
 
+SET (libsolv_MANPAGES1
+    mergesolv.1 dumpsolv.1 installcheck.1 testsolv.1)
+
+IF (ENABLE_RPMDB)
+SET (libsolv_MANPAGES1 ${libsolv_MANPAGES1} rpmdb2solv.1 rpms2solv.1)
+ENDIF (ENABLE_RPMDB)
+
+IF (ENABLE_RPMMD)
+SET (libsolv_MANPAGES1 ${libsolv_MANPAGES1} repomdxml2solv.1 rpmmd2solv.1 updateinfoxml2solv.1 deltainfoxml2solv.1)
+ENDIF (ENABLE_RPMMD)
+
+IF (ENABLE_HELIXREPO)
+SET (libsolv_MANPAGES1 ${libsolv_MANPAGES1} helix2solv.1)
+ENDIF (ENABLE_HELIXREPO)
+
+IF (ENABLE_SUSEREPO)
+SET (libsolv_MANPAGES1 ${libsolv_MANPAGES1} susetags2solv.1)
+ENDIF (ENABLE_SUSEREPO)
+
+IF (ENABLE_COMPS)
+SET (libsolv_MANPAGES1 ${libsolv_MANPAGES1} comps2solv.1)
+ENDIF (ENABLE_COMPS)
+
+IF (ENABLE_DEBIAN)
+SET (libsolv_MANPAGES1 ${libsolv_MANPAGES1} deb2solv.1)
+ENDIF (ENABLE_DEBIAN)
+
+IF (ENABLE_MDKREPO)
+SET (libsolv_MANPAGES1 ${libsolv_MANPAGES1} mdk2solv.1)
+ENDIF (ENABLE_MDKREPO)
+
+IF (ENABLE_ARCHREPO)
+SET (libsolv_MANPAGES1 ${libsolv_MANPAGES1} archpkgs2solv.1 archrepo2solv.1)
+ENDIF (ENABLE_ARCHREPO)
+
+IF (ENABLE_APPDATA)
+SET (libsolv_MANPAGES1 ${libsolv_MANPAGES1} appdata2solv.1)
+ENDIF (ENABLE_APPDATA)
+
 INSTALL(FILES
 INSTALL(FILES
-    ${libsolv_MANPAGES}
+    ${libsolv_MANPAGES3}
     DESTINATION "${MAN_INSTALL_DIR}/man3")
     DESTINATION "${MAN_INSTALL_DIR}/man3")
+
+INSTALL(FILES
+    ${libsolv_MANPAGES1}
+    DESTINATION "${MAN_INSTALL_DIR}/man1")
index e18d0bc..84a1095 100644 (file)
@@ -1,9 +1,19 @@
 
 
-man: libsolv.3 libsolv-bindings.3 libsolv-constantids.3 libsolv-history.3 libsolv-pool.3
+man:   man3 man1
+
+man3:  libsolv.3 libsolv-bindings.3 libsolv-constantids.3 libsolv-history.3 libsolv-pool.3
+
+man1:  mergesolv.1 dumpsolv.1 installcheck.1 testsolv.1 rpmdb2solv.1 rpms2solv.1 \
+       rpmmd2solv.1 repomdxml2solv.1 updateinfoxml2solv.1 deltainfoxml2solv.1 \
+       helix2solv.1 susetags2solv.1 comps2solv.1 deb2solv.1 mdk2solv.1 \
+       archpkgs2solv.1 archrepo2solv.1 appdata2solv.1
 
 html: libsolv.html libsolv-bindings.html libsolv-constantids.html libsolv-history.html libsolv-pool.html
 
 
 html: libsolv.html libsolv-bindings.html libsolv-constantids.html libsolv-history.html libsolv-pool.html
 
-.SUFFIXES: .html .3 .txt
+.SUFFIXES: .html .3 .1 .txt
+
+.txt.1:
+       a2x -f manpage $<
 
 .txt.3:
        a2x -f manpage $<
 
 .txt.3:
        a2x -f manpage $<
diff --git a/doc/appdata2solv.1 b/doc/appdata2solv.1
new file mode 100644 (file)
index 0000000..174e25e
--- /dev/null
@@ -0,0 +1,58 @@
+'\" t
+.\"     Title: appdata2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/25/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "APPDATA2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+appdata2solv \- convert application meta data into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBappdata2solv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The appdata format contains metadata about application\&. It can be available both in repositories (for available applications) and in the installed system (for installed applications)\&. The appdata2solv tool reads the metadata from stdin and writes the parsed data as solv file to standard output\&. The parser will create \fBapplication:\fR pseudo packages for each entry\&.
+.PP
+\fB\-d\fR \fIAPPDATADIR\fR
+.RS 4
+Do not read from standard input, instead scan the specified directory for appdata entries\&.
+\fIAPPDATADIR\fR
+is normally set to
+\fB/usr/share/appdata\fR\&.
+.RE
+.PP
+\fB\-r\fR \fIROOTDIR\fR
+.RS 4
+Use
+\fIROOTDIR\fR
+as root directory\&.
+.RE
+.SH "SEE ALSO"
+.sp
+mergesolv(1)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/appdata2solv.txt b/doc/appdata2solv.txt
new file mode 100644 (file)
index 0000000..3ccb4b5
--- /dev/null
@@ -0,0 +1,39 @@
+appdata2solv(1)
+===============
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+appdata2solv - convert application meta data into a solv file
+
+Synopsis
+--------
+*appdata2solv* ['OPTIONS']
+
+Description
+-----------
+The appdata format contains metadata about application. It can
+be available both in repositories (for available applications)
+and in the installed system (for installed applications).
+The appdata2solv tool reads the metadata from stdin and
+writes the parsed data as solv file to standard output. The
+parser will create *application:* pseudo packages for each entry.
+
+*-d* 'APPDATADIR'::
+Do not read from standard input, instead scan the specified
+directory for appdata entries. 'APPDATADIR' is normally
+set to */usr/share/appdata*.
+
+*-r* 'ROOTDIR'::
+Use 'ROOTDIR' as root directory.
+
+
+See Also
+--------
+mergesolv(1)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/archpkgs2solv.1 b/doc/archpkgs2solv.1
new file mode 100644 (file)
index 0000000..e4ef62d
--- /dev/null
@@ -0,0 +1,59 @@
+'\" t
+.\"     Title: archpkgs2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/25/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "ARCHPKGS2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+archpkgs2solv \- convert one or more Arch package files into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBarchpkgs2solv\fR [\fIOPTIONS\fR] \fIPKG1\&.pkg\&.xz\fR \&...
+.SH "DESCRIPTION"
+.sp
+The archpkgs2solv tool converts the meta data from one or more Arch Linux packages into the solv file written to standard output\&.
+.PP
+\fB\-m\fR \fIMANIFESTFILE\fR
+.RS 4
+Read the rpm file names from the specified
+\fIMANIFESTFILE\fR\&. You can use
+\fB\-\fR
+to read the manifest from standard input\&.
+.RE
+.PP
+\fB\-0\fR
+.RS 4
+Use a null byte as line terminator for manifest files instead of a newline\&. This is useful if the file names can contain newlines\&. See also the
+\fB\-print0\fR
+option in
+\fBfind\fR\&.
+.RE
+.SH "SEE ALSO"
+.sp
+pacman(8)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/archpkgs2solv.txt b/doc/archpkgs2solv.txt
new file mode 100644 (file)
index 0000000..2a17066
--- /dev/null
@@ -0,0 +1,35 @@
+archpkgs2solv(1)
+================
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+archpkgs2solv - convert one or more Arch package files into a solv file
+
+Synopsis
+--------
+*archpkgs2solv* ['OPTIONS'] 'PKG1.pkg.xz' ...
+
+Description
+-----------
+The archpkgs2solv tool converts the meta data from one or more
+Arch Linux packages into the solv file written to standard output.
+
+*-m* 'MANIFESTFILE'::
+Read the rpm file names from the specified 'MANIFESTFILE'. You can
+use *-* to read the manifest from standard input.
+
+*-0*::
+Use a null byte as line terminator for manifest files instead of
+a newline. This is useful if the file names can contain newlines.
+See also the *-print0* option in *find*.
+
+See Also
+--------
+pacman(8)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/archrepo2solv.1 b/doc/archrepo2solv.1
new file mode 100644 (file)
index 0000000..4987821
--- /dev/null
@@ -0,0 +1,52 @@
+'\" t
+.\"     Title: archrepo2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/25/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "ARCHREPO2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+archrepo2solv \- convert files in Arch repository format into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBarchrepo2solv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The archrepo2solv tool reads Arch Linux repository data (\fBcore\&.db\fR) from stdin, and writes it as solv file to standard output\&.
+.PP
+\fB\-l\fR \fIDATABASEDIR\fR
+.RS 4
+Instead of reading from standard input, scan the specified directory for package meta files\&. Set
+\fIDATABASEDIR\fR
+to
+\fB/var/lib/pacman/local\fR
+to scan the installed packages\&.
+.RE
+.SH "SEE ALSO"
+.sp
+pacman(8)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/archrepo2solv.txt b/doc/archrepo2solv.txt
new file mode 100644 (file)
index 0000000..3f5b138
--- /dev/null
@@ -0,0 +1,31 @@
+archrepo2solv(1)
+================
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+archrepo2solv - convert files in Arch repository format into a solv file
+
+Synopsis
+--------
+*archrepo2solv* ['OPTIONS']
+
+Description
+-----------
+The archrepo2solv tool reads Arch Linux repository data (*core.db*) from stdin,
+and writes it as solv file to standard output.
+
+*-l* 'DATABASEDIR'::
+Instead of reading from standard input, scan the specified directory for
+package meta files. Set 'DATABASEDIR' to */var/lib/pacman/local* to
+scan the installed packages.
+
+See Also
+--------
+pacman(8)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/comps2solv.1 b/doc/comps2solv.1
new file mode 100644 (file)
index 0000000..e8ec2f7
--- /dev/null
@@ -0,0 +1,43 @@
+'\" t
+.\"     Title: comps2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/25/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "COMPS2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+comps2solv \- convert rpm\-md comps\&.xml file into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBcomps2solv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The comps\&.xml file is Fedora\(cqs way to implement package groups\&. The comps2solv tool reads the comps xml file from stdin and writes the parsed data as solv file to standard output\&. The parser will create \fBgroup:\fR and \fBcategory:\fR pseudo packages for each comps entry\&.
+.SH "SEE ALSO"
+.sp
+mergesolv(1), createrepo(8)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/comps2solv.txt b/doc/comps2solv.txt
new file mode 100644 (file)
index 0000000..23e304e
--- /dev/null
@@ -0,0 +1,29 @@
+comps2solv(1)
+=============
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+comps2solv - convert rpm-md comps.xml file into a solv file
+
+Synopsis
+--------
+*comps2solv* ['OPTIONS']
+
+Description
+-----------
+The comps.xml file is Fedora's way to implement package groups.
+The comps2solv tool reads the comps xml file from stdin and
+writes the parsed data as solv file to standard output. The
+parser will create *group:* and *category:* pseudo packages
+for each comps entry.
+
+See Also
+--------
+mergesolv(1), createrepo(8)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/deb2solv.1 b/doc/deb2solv.1
new file mode 100644 (file)
index 0000000..4cfa093
--- /dev/null
@@ -0,0 +1,59 @@
+'\" t
+.\"     Title: deb2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/25/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "DEB2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+deb2solv \- convert one or more Debian package files into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBdeb2solv\fR [\fIOPTIONS\fR] \fIPKG1\&.deb\fR \&...
+.SH "DESCRIPTION"
+.sp
+The deb2solv tool converts the meta data from one or more Debian packages into the solv file written to standard output\&.
+.PP
+\fB\-m\fR \fIMANIFESTFILE\fR
+.RS 4
+Read the rpm file names from the specified
+\fIMANIFESTFILE\fR\&. You can use
+\fB\-\fR
+to read the manifest from standard input\&.
+.RE
+.PP
+\fB\-0\fR
+.RS 4
+Use a null byte as line terminator for manifest files instead of a newline\&. This is useful if the file names can contain newlines\&. See also the
+\fB\-print0\fR
+option in
+\fBfind\fR\&.
+.RE
+.SH "SEE ALSO"
+.sp
+deb(5), dpkg\-deb(1)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/deb2solv.txt b/doc/deb2solv.txt
new file mode 100644 (file)
index 0000000..0907383
--- /dev/null
@@ -0,0 +1,35 @@
+deb2solv(1)
+============
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+deb2solv - convert one or more Debian package files into a solv file
+
+Synopsis
+--------
+*deb2solv* ['OPTIONS'] 'PKG1.deb' ...
+
+Description
+-----------
+The deb2solv tool converts the meta data from one or more
+Debian packages into the solv file written to standard output.
+
+*-m* 'MANIFESTFILE'::
+Read the rpm file names from the specified 'MANIFESTFILE'. You can
+use *-* to read the manifest from standard input.
+
+*-0*::
+Use a null byte as line terminator for manifest files instead of
+a newline. This is useful if the file names can contain newlines.
+See also the *-print0* option in *find*.
+
+See Also
+--------
+deb(5), dpkg-deb(1)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/deltainfoxml2solv.1 b/doc/deltainfoxml2solv.1
new file mode 100644 (file)
index 0000000..844c4fb
--- /dev/null
@@ -0,0 +1,43 @@
+'\" t
+.\"     Title: deltainfoxml2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/24/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "DELTAINFOXML2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+deltainfoxml2solv \- convert rpm\-md\*(Aqs deltainfo format into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBdeltainfoxml2solv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The deltainfoxml2solv tool reads rpm\-md\(cqs \fBdeltainfo\&.xml\fR data from stdin, and writes it as solv file to standard output\&. Some distributions name the input \fBprestodelta\&.xml\fR instead\&. Each delta rpm element is converted and added as \fBrepository:deltainfo\fR element to the meta section of the solv file\&.
+.SH "SEE ALSO"
+.sp
+mergesolv(1), createrepo(8)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/deltainfoxml2solv.txt b/doc/deltainfoxml2solv.txt
new file mode 100644 (file)
index 0000000..f14a843
--- /dev/null
@@ -0,0 +1,29 @@
+deltainfoxml2solv(1)
+====================
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+deltainfoxml2solv - convert rpm-md's deltainfo format into a solv file
+
+Synopsis
+--------
+*deltainfoxml2solv* ['OPTIONS']
+
+Description
+-----------
+The deltainfoxml2solv tool reads rpm-md's *deltainfo.xml* data from stdin,
+and writes it as solv file to standard output. Some distributions name
+the input *prestodelta.xml* instead. Each delta rpm element is converted
+and added as *repository:deltainfo* element to the meta section of the
+solv file.
+
+See Also
+--------
+mergesolv(1), createrepo(8)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/dumpsolv.1 b/doc/dumpsolv.1
new file mode 100644 (file)
index 0000000..3e1400e
--- /dev/null
@@ -0,0 +1,45 @@
+'\" t
+.\"     Title: dumpsolv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/22/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "DUMPSOLV" "1" "09/22/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+dumpsolv \- print a solv file into a human readable format
+.SH "SYNOPSIS"
+.sp
+\fBdumpsolv\fR [\fIOPTIONS\fR] [\fIFILE\&.solv\fR]
+.SH "DESCRIPTION"
+.sp
+The dumpsolv tool reads a solv files and writes its contents to standard output\&. If no input file is given, it reads the solv file from standard input\&.
+.PP
+\fB\-j\fR
+.RS 4
+Write the contents in JSON format\&.
+.RE
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/dumpsolv.txt b/doc/dumpsolv.txt
new file mode 100644 (file)
index 0000000..ec2d771
--- /dev/null
@@ -0,0 +1,26 @@
+dumpsolv(1)
+===========
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+dumpsolv - print a solv file into a human readable format
+
+Synopsis
+--------
+*dumpsolv* ['OPTIONS'] ['FILE.solv']
+
+Description
+-----------
+The dumpsolv tool reads a solv files and writes its contents
+to standard output. If no input file is given, it reads the
+solv file from standard input.
+
+*-j*::
+Write the contents in JSON format.
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/helix2solv.1 b/doc/helix2solv.1
new file mode 100644 (file)
index 0000000..5a8d678
--- /dev/null
@@ -0,0 +1,40 @@
+'\" t
+.\"     Title: helix2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/24/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "HELIX2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+helix2solv \- convert legacy helixcode format into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBhelix2solv\fR
+.SH "DESCRIPTION"
+.sp
+The helix format was a metadata format used in the RedCarpet package manager\&. It\(cqs still used in libzypp testcases\&. The helix2solv tool reads data in helix format from standhard input and write it in solv file format to standard output\&.
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/helix2solv.txt b/doc/helix2solv.txt
new file mode 100644 (file)
index 0000000..db8dfe9
--- /dev/null
@@ -0,0 +1,24 @@
+helix2solv(1)
+=============
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+helix2solv - convert legacy helixcode format into a solv file
+
+Synopsis
+--------
+*helix2solv*
+
+Description
+-----------
+The helix format was a metadata format used in the RedCarpet
+package manager. It's still used in libzypp testcases.
+The helix2solv tool reads data in helix format from standhard
+input and write it in solv file format to standard output.
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/installcheck.1 b/doc/installcheck.1
new file mode 100644 (file)
index 0000000..85e4d89
--- /dev/null
@@ -0,0 +1,42 @@
+'\" t
+.\"     Title: installcheck
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/22/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "INSTALLCHECK" "1" "09/22/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+installcheck \- find out which packages cannot be installed
+.SH "SYNOPSIS"
+.sp
+\fBinstallcheck\fR \fIARCH\fR \fIREPO1\fR \fIREPO2\fR\&... \fB\-\-nocheck\fR \fINREPO1\fR \fINREPO2\fR\&...
+.SH "DESCRIPTION"
+.sp
+The installcheck tool checks if all packages in \fIREPO1\fR\&...\fIREPON\fR are installable\&. A package is installable if there is a set of packages from the repositories that satisfies its dependencies\&. The repositories after the \fB\-\-nocheck\fR option are only used for dependency resolving, but the tool does not check if the packages in them are installable\&.
+.sp
+A Repository can be a solv file, a rpmmd \fBprimary\&.xml\&.gz\fR file, a SUSE \fBpackages\fR or \fBpackages\&.gz\fR file, or a Debian \fBPackages\fR or \fBPackages\&.gz\fR file\&.
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/installcheck.txt b/doc/installcheck.txt
new file mode 100644 (file)
index 0000000..99eb279
--- /dev/null
@@ -0,0 +1,29 @@
+installcheck(1)
+===============
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+installcheck - find out which packages cannot be installed
+
+Synopsis
+--------
+*installcheck* 'ARCH' 'REPO1' 'REPO2'... *--nocheck* 'NREPO1' 'NREPO2'...
+
+Description
+-----------
+The installcheck tool checks if all packages in 'REPO1'...'REPON' are
+installable. A package is installable if there is a set of packages
+from the repositories that satisfies its dependencies. The repositories
+after the *--nocheck* option are only used for dependency resolving,
+but the tool does not check if the packages in them are installable.
+
+A Repository can be a solv file, a rpmmd *primary.xml.gz* file, a SUSE
+*packages* or *packages.gz* file, or a Debian *Packages* or *Packages.gz*
+file.
+
+Author
+------
+Michael Schroeder <mls@suse.de>
index 87e949a..1f52285 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: Libsolv-Bindings
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
 .\"     Title: Libsolv-Bindings
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
-.\"      Date: 04/04/2014
+.\"      Date: 09/29/2014
 .\"    Manual: LIBSOLV
 .\"    Source: libsolv
 .\"  Language: English
 .\"
 .\"    Manual: LIBSOLV
 .\"    Source: libsolv
 .\"  Language: English
 .\"
-.TH "LIBSOLV\-BINDINGS" "3" "04/04/2014" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-BINDINGS" "3" "09/29/2014" "libsolv" "LIBSOLV"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -307,7 +307,7 @@ Note that boolean methods have an added trailing \(lq?\(rq, to be consistent wit
 .RS 4
 .\}
 .nf
 .RS 4
 .\}
 .nf
-\fBputs "empty\fR \fIrepo\fR\fB" if\fR \fIrepo\fR\fB\&.isempty?\fR
+\fBputs "empty" if\fR \fIrepo\fR\fB\&.isempty?\fR
 .fi
 .if n \{\
 .RE
 .fi
 .if n \{\
 .RE
@@ -3435,6 +3435,21 @@ Make the SOLVER_FORCEBEST job option consider only packages that meet the polici
 .RS 4
 Do not enable auto\-targeting up update and distupgrade jobs\&. See the section on targeted updates for more information\&.
 .RE
 .RS 4
 Do not enable auto\-targeting up update and distupgrade jobs\&. See the section on targeted updates for more information\&.
 .RE
+.PP
+\fBSOLVER_FLAG_KEEP_ORPHANS\fR
+.RS 4
+Do not allow orphaned packages to be deinstalled if they get in the way of resolving other packages\&.
+.RE
+.PP
+\fBSOLVER_FLAG_BREAK_ORPHANS\fR
+.RS 4
+Ignore dependencies of orphaned packages that get in the way of resolving non\-orphaned ones\&. Setting the flag might result in no longer working packages in case they are orphaned\&.
+.RE
+.PP
+\fBSOLVER_FLAG_FOCUS_INSTALLED\fR
+.RS 4
+Resolve installed packages before resolving the given job\&. Setting this flag means that the solver will prefer picking a package version that fits the other installed packages over updating installed packages\&.
+.RE
 .sp
 Basic rule types:
 .PP
 .sp
 Basic rule types:
 .PP
@@ -3443,9 +3458,9 @@ Basic rule types:
 A rule of an unknown class\&. You should never encounter those\&.
 .RE
 .PP
 A rule of an unknown class\&. You should never encounter those\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM\fR
+\fBSOLVER_RULE_PKG\fR
 .RS 4
 .RS 4
-A package dependency rule, called rpm rule for historical reasons\&.
+A package dependency rule\&.
 .RE
 .PP
 \fBSOLVER_RULE_UPDATE\fR
 .RE
 .PP
 \fBSOLVER_RULE_UPDATE\fR
@@ -3485,47 +3500,47 @@ These rules are generated by the solver to keep it from running into the same pr
 .sp
 Special dependency rule types:
 .PP
 .sp
 Special dependency rule types:
 .PP
-\fBSOLVER_RULE_RPM_NOT_INSTALLABLE\fR
+\fBSOLVER_RULE_PKG_NOT_INSTALLABLE\fR
 .RS 4
 This rule was added to prevent the installation of a package of an architecture that does not work on the system\&.
 .RE
 .PP
 .RS 4
 This rule was added to prevent the installation of a package of an architecture that does not work on the system\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_NOTHING_PROVIDES_DEP\fR
+\fBSOLVER_RULE_PKG_NOTHING_PROVIDES_DEP\fR
 .RS 4
 The package contains a required dependency which was not provided by any package\&.
 .RE
 .PP
 .RS 4
 The package contains a required dependency which was not provided by any package\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_PACKAGE_REQUIRES\fR
+\fBSOLVER_RULE_PKG_REQUIRES\fR
 .RS 4
 .RS 4
-Similar to SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP, but in this case some packages provided the dependency but none of them could be installed due to other dependency issues\&.
+Similar to SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, but in this case some packages provided the dependency but none of them could be installed due to other dependency issues\&.
 .RE
 .PP
 .RE
 .PP
-\fBSOLVER_RULE_RPM_SELF_CONFLICT\fR
+\fBSOLVER_RULE_PKG_SELF_CONFLICT\fR
 .RS 4
 The package conflicts with itself\&. This is not allowed by older rpm versions\&.
 .RE
 .PP
 .RS 4
 The package conflicts with itself\&. This is not allowed by older rpm versions\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_PACKAGE_CONFLICT\fR
+\fBSOLVER_RULE_PKG_CONFLICTS\fR
 .RS 4
 To fulfill the dependencies two packages need to be installed, but one of the packages contains a conflict with the other one\&.
 .RE
 .PP
 .RS 4
 To fulfill the dependencies two packages need to be installed, but one of the packages contains a conflict with the other one\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_SAME_NAME\fR
+\fBSOLVER_RULE_PKG_SAME_NAME\fR
 .RS 4
 The dependencies can only be fulfilled by multiple versions of a package, but installing multiple versions of the same package is not allowed\&.
 .RE
 .PP
 .RS 4
 The dependencies can only be fulfilled by multiple versions of a package, but installing multiple versions of the same package is not allowed\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_PACKAGE_OBSOLETES\fR
+\fBSOLVER_RULE_PKG_OBSOLETES\fR
 .RS 4
 To fulfill the dependencies two packages need to be installed, but one of the packages obsoletes the other one\&.
 .RE
 .PP
 .RS 4
 To fulfill the dependencies two packages need to be installed, but one of the packages obsoletes the other one\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_IMPLICIT_OBSOLETES\fR
+\fBSOLVER_RULE_PKG_IMPLICIT_OBSOLETES\fR
 .RS 4
 To fulfill the dependencies two packages need to be installed, but one of the packages has provides a dependency that is obsoleted by the other one\&. See the POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES flag\&.
 .RE
 .PP
 .RS 4
 To fulfill the dependencies two packages need to be installed, but one of the packages has provides a dependency that is obsoleted by the other one\&. See the POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES flag\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES\fR
+\fBSOLVER_RULE_PKG_INSTALLED_OBSOLETES\fR
 .RS 4
 To fulfill the dependencies a package needs to be installed that is obsoleted by an installed package\&. See the POOL_FLAG_NOINSTALLEDOBSOLETES flag\&.
 .RE
 .RS 4
 To fulfill the dependencies a package needs to be installed that is obsoleted by an installed package\&. See the POOL_FLAG_NOINSTALLEDOBSOLETES flag\&.
 .RE
index b4f5609..2b51635 100644 (file)
@@ -138,7 +138,7 @@ Constants live in the namespace of the class they belong to:
 Note that boolean methods have an added trailing ``?'', to be consistent with
 other ruby modules:
 
 Note that boolean methods have an added trailing ``?'', to be consistent with
 other ruby modules:
 
-       puts "empty repo" if repo.isempty?
+       puts "empty" if repo.isempty?
 
 
 The Solv Class
 
 
 The Solv Class
@@ -2101,8 +2101,8 @@ Basic rule types:
 *SOLVER_RULE_UNKNOWN*::
 A rule of an unknown class. You should never encounter those.
 
 *SOLVER_RULE_UNKNOWN*::
 A rule of an unknown class. You should never encounter those.
 
-*SOLVER_RULE_RPM*::
-A package dependency rule, called rpm rule for historical reasons.
+*SOLVER_RULE_PKG*::
+A package dependency rule.
 
 *SOLVER_RULE_UPDATE*::
 A rule to implement the update policy of installed packages. Every
 
 *SOLVER_RULE_UPDATE*::
 A rule to implement the update policy of installed packages. Every
@@ -2142,43 +2142,43 @@ implementations.
 
 Special dependency rule types:
 
 
 Special dependency rule types:
 
-*SOLVER_RULE_RPM_NOT_INSTALLABLE*::
+*SOLVER_RULE_PKG_NOT_INSTALLABLE*::
 This rule was added to prevent the installation of a package of an
 architecture that does not work on the system.
 
 This rule was added to prevent the installation of a package of an
 architecture that does not work on the system.
 
-*SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP*::
+*SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP*::
 The package contains a required dependency which was not provided by
 any package.
 
 The package contains a required dependency which was not provided by
 any package.
 
-*SOLVER_RULE_RPM_PACKAGE_REQUIRES*::
-Similar to SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP, but in this case
+*SOLVER_RULE_PKG_REQUIRES*::
+Similar to SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, but in this case
 some packages provided the dependency but none of them could be
 installed due to other dependency issues.
 
 some packages provided the dependency but none of them could be
 installed due to other dependency issues.
 
-*SOLVER_RULE_RPM_SELF_CONFLICT*::
+*SOLVER_RULE_PKG_SELF_CONFLICT*::
 The package conflicts with itself. This is not allowed by older rpm
 versions.
 
 The package conflicts with itself. This is not allowed by older rpm
 versions.
 
-*SOLVER_RULE_RPM_PACKAGE_CONFLICT*::
+*SOLVER_RULE_PKG_CONFLICTS*::
 To fulfill the dependencies two packages need to be installed, but
 one of the packages contains a conflict with the other one.
 
 To fulfill the dependencies two packages need to be installed, but
 one of the packages contains a conflict with the other one.
 
-*SOLVER_RULE_RPM_SAME_NAME*::
+*SOLVER_RULE_PKG_SAME_NAME*::
 The dependencies can only be fulfilled by multiple versions of
 a package, but installing multiple versions of the same package
 is not allowed.
 
 The dependencies can only be fulfilled by multiple versions of
 a package, but installing multiple versions of the same package
 is not allowed.
 
-*SOLVER_RULE_RPM_PACKAGE_OBSOLETES*::
+*SOLVER_RULE_PKG_OBSOLETES*::
 To fulfill the dependencies two packages need to be installed, but
 one of the packages obsoletes the other one.
 
 To fulfill the dependencies two packages need to be installed, but
 one of the packages obsoletes the other one.
 
-*SOLVER_RULE_RPM_IMPLICIT_OBSOLETES*::
+*SOLVER_RULE_PKG_IMPLICIT_OBSOLETES*::
 To fulfill the dependencies two packages need to be installed, but
 one of the packages has provides a dependency that is obsoleted
 by the other one. See the POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES
 flag.
 
 To fulfill the dependencies two packages need to be installed, but
 one of the packages has provides a dependency that is obsoleted
 by the other one. See the POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES
 flag.
 
-*SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES*::
+*SOLVER_RULE_PKG_INSTALLED_OBSOLETES*::
 To fulfill the dependencies a package needs to be installed that is
 obsoleted by an installed package. See the POOL_FLAG_NOINSTALLEDOBSOLETES
 flag.
 To fulfill the dependencies a package needs to be installed that is
 obsoleted by an installed package. See the POOL_FLAG_NOINSTALLEDOBSOLETES
 flag.
index 45e717e..8511667 100644 (file)
@@ -89,7 +89,7 @@ Stores an array of dependency Ids that describe the capabilities that also must
 .PP
 \fBSOLVABLE_RECOMMENDS "solvable:recommends"\fR
 .RS 4
 .PP
 \fBSOLVABLE_RECOMMENDS "solvable:recommends"\fR
 .RS 4
-Stores an array of dependency Ids that describe the capabilities that also should be installed when this package is installed\&. It\(cqs not an error if not all capabilites can be met\&.
+Stores an array of dependency Ids that describe the capabilities that also should be installed when this package is installed\&. It\(cqs not an error if not all capabilities can be met\&.
 .RE
 .PP
 \fBSOLVABLE_SUGGESTS "solvable:suggests"\fR
 .RE
 .PP
 \fBSOLVABLE_SUGGESTS "solvable:suggests"\fR
index 748f112..0db9f8d 100644 (file)
@@ -1241,7 +1241,7 @@ There can be multiple equivalence classes, the set of allowed vendor changes for
 You can turn off the architecture replacement checks with the Solver\(cqs SOLVER_FLAG_ALLOW_VENDORCHANGE flag\&.
 .SH "BOOLEAN DEPENDENCIES"
 .sp
 You can turn off the architecture replacement checks with the Solver\(cqs SOLVER_FLAG_ALLOW_VENDORCHANGE flag\&.
 .SH "BOOLEAN DEPENDENCIES"
 .sp
-Boolean Dependencies allow to build complex expressions from simple dependencies\&. While rpm does not support boolean expressions in dependencies and debian only allows an "OR" expression, libsolv allows to arbitrary complex expressions\&. The following basic types are supported:
+Boolean Dependencies allow to build complex expressions from simple dependencies\&. While rpm does not support boolean expressions in dependencies and debian only allows an "OR" expression, libsolv allows one to arbitrary complex expressions\&. The following basic types are supported:
 .PP
 \fBREL_OR\fR
 .RS 4
 .PP
 \fBREL_OR\fR
 .RS 4
diff --git a/doc/mdk2solv.1 b/doc/mdk2solv.1
new file mode 100644 (file)
index 0000000..a32118a
--- /dev/null
@@ -0,0 +1,53 @@
+'\" t
+.\"     Title: mdk2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/25/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "MDK2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+mdk2solv \- convert files in Mandriva synthesis format into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBmdk2solv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The mdk2solv tool reads Mandriva synthesis data (\fBhdlist\fR) from stdin, and writes it as solv file to standard output\&.
+.PP
+\fB\-i\fR \fIINFO\&.xml\fR
+.RS 4
+Also read the info file containing url, license, and src information from the specified xml file\&.
+.RE
+.PP
+\fB\-f\fR \fIFILES\&.xml\fR
+.RS 4
+Also read filelist information from the specified xml file\&.
+.RE
+.SH "SEE ALSO"
+.sp
+genhdlist2(1)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/mdk2solv.txt b/doc/mdk2solv.txt
new file mode 100644 (file)
index 0000000..2616a87
--- /dev/null
@@ -0,0 +1,33 @@
+mdk2solv(1)
+===========
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+mdk2solv - convert files in Mandriva synthesis format into a solv file
+
+Synopsis
+--------
+*mdk2solv* ['OPTIONS']
+
+Description
+-----------
+The mdk2solv tool reads Mandriva synthesis data (*hdlist*) from stdin, and writes
+it as solv file to standard output.
+
+*-i* 'INFO.xml'::
+Also read the info file containing url, license, and src information from
+the specified xml file.
+
+*-f* 'FILES.xml'::
+Also read filelist information from the specified xml file.
+
+See Also
+--------
+genhdlist2(1)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/mergesolv.1 b/doc/mergesolv.1
new file mode 100644 (file)
index 0000000..e7cdd26
--- /dev/null
@@ -0,0 +1,45 @@
+'\" t
+.\"     Title: mergesolv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/22/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "MERGESOLV" "1" "09/22/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+mergesolv \- merge multiple files in solv format into a single one
+.SH "SYNOPSIS"
+.sp
+\fBmergesolv\fR [\fIOPTIONS\fR] \fIFILE1\&.solv\fR \fIFILE2\&.solv\fR \&...
+.SH "DESCRIPTION"
+.sp
+The mergesolv tool reads all solv files specified on the command line, and writes a merged version to standard output\&.
+.PP
+\fB\-X\fR
+.RS 4
+Autoexpand SUSE pattern and product provides into packages\&.
+.RE
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/mergesolv.txt b/doc/mergesolv.txt
new file mode 100644 (file)
index 0000000..bbe8c72
--- /dev/null
@@ -0,0 +1,25 @@
+mergesolv(1)
+============
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+mergesolv - merge multiple files in solv format into a single one
+
+Synopsis
+--------
+*mergesolv* ['OPTIONS'] 'FILE1.solv' 'FILE2.solv' ...
+
+Description
+-----------
+The mergesolv tool reads all solv files specified on the command line,
+and writes a merged version to standard output.
+
+*-X*::
+Autoexpand SUSE pattern and product provides into packages.
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/repomdxml2solv.1 b/doc/repomdxml2solv.1
new file mode 100644 (file)
index 0000000..d00fa02
--- /dev/null
@@ -0,0 +1,57 @@
+'\" t
+.\"     Title: repomdxml2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/24/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "REPOMDXML2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+repomdxml2solv \- convert a repomd\&.xml file into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBrepomdxml2solv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The repomd\&.xml file is the index file of a rpm\-md repository, containing references to all data file with checksums\&. The repomdxml2solv tool reads the repomd\&.xml file from stdin and writes the parsed data as solv file to standard output\&. The data is stored as meta attributes in the result\&.
+.PP
+\fB\-q\fR \fIWHAT\fR
+.RS 4
+Data query mode: instead of writing a solv file, select the
+\fIWHAT\fR
+element in the input data and write it to standard output\&. Examples for
+\fIWHAT\fR
+are
+\fBtype\fR
+to get a list of all types, and
+\fBprimary:location\fR
+to get the location of the element with type
+\fBprimary\fR\&.
+.RE
+.SH "SEE ALSO"
+.sp
+rpmmd2solv(1), mergesolv(1), createrepo(8)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/repomdxml2solv.txt b/doc/repomdxml2solv.txt
new file mode 100644 (file)
index 0000000..feb859c
--- /dev/null
@@ -0,0 +1,36 @@
+repomdxml2solv(1)
+=================
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+repomdxml2solv - convert a repomd.xml file into a solv file
+
+Synopsis
+--------
+*repomdxml2solv* ['OPTIONS']
+
+Description
+-----------
+The repomd.xml file is the index file of a rpm-md repository,
+containing references to all data file with checksums. The
+repomdxml2solv tool reads the repomd.xml file from stdin and
+writes the parsed data as solv file to standard output. The
+data is stored as meta attributes in the result.
+
+*-q* 'WHAT'::
+Data query mode: instead of writing a solv file, select the
+'WHAT' element in the input data and write it to standard output.
+Examples for 'WHAT' are *type* to get a list of all types, and
+*primary:location* to get the location of the element with
+type *primary*.
+
+See Also
+--------
+rpmmd2solv(1), mergesolv(1), createrepo(8)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/rpmdb2solv.1 b/doc/rpmdb2solv.1
new file mode 100644 (file)
index 0000000..5057b57
--- /dev/null
@@ -0,0 +1,95 @@
+'\" t
+.\"     Title: rpmdb2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/25/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "RPMDB2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+rpmdb2solv \- convert the rpm database into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBrpmdb2solv\fR [\fIOPTIONS\fR] [\fIREFFILE\&.solv\fR]
+.SH "DESCRIPTION"
+.sp
+The rpmdb2solv tool reads rpm\(cqs installed packages database and writes it in solv file format to standard output\&. You can make use of an old version of the database by specifying a \fIREFFILE\&.solv\fR file\&.
+.PP
+\fB\-o\fR \fIOUTFILE\fR
+.RS 4
+Write the generated solv to
+\fIOUTFILE\fR
+instead of standard output\&.
+.RE
+.PP
+\fB\-P\fR
+.RS 4
+Print percentages as packages are being read in\&. The output format is like rpm\(cqs \-\-percent option\&.
+.RE
+.PP
+\fB\-r\fR \fIROOTDIR\fR
+.RS 4
+Use
+\fIROOTDIR\fR
+as root directory\&.
+.RE
+.PP
+\fB\-k\fR
+.RS 4
+Read pubkeys from the rpm database instead of installed packages\&. Note that many distributions stopped storing pubkeys in the database but use a directory like
+\fB/var/lib/rpm/pubkeys\fR
+instead\&.
+.RE
+.PP
+\fB\-A\fR
+.RS 4
+Also scan the
+\fB/usr/share/appdata\fR
+for installed appdata files and create pseudo packages for each file\&.
+.RE
+.PP
+\fB\-p\fR \fIPRODDIR\fR
+.RS 4
+Also read SUSE product files from directory
+\fIPRODDIR\fR\&. The standard directory is
+\fB/etc/products\&.d\fR\&.
+.RE
+.PP
+\fB\-n\fR
+.RS 4
+Do not read any packages from the rpm database\&. This is useful together with
+\fB\-p\fR
+to only convert SUSE products\&.
+.RE
+.PP
+\fB\-X\fR
+.RS 4
+Autoexpand SUSE pattern and product provides into packages\&.
+.RE
+.SH "SEE ALSO"
+.sp
+rpms2solv(1)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/rpmdb2solv.txt b/doc/rpmdb2solv.txt
new file mode 100644 (file)
index 0000000..0c4585f
--- /dev/null
@@ -0,0 +1,59 @@
+rpmdb2solv(1)
+=============
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+rpmdb2solv - convert the rpm database into a solv file
+
+Synopsis
+--------
+*rpmdb2solv* ['OPTIONS'] ['REFFILE.solv']
+
+Description
+-----------
+The rpmdb2solv tool reads rpm's installed packages database
+and writes it in solv file format to standard output. You can
+make use of an old version of the database by specifying a
+'REFFILE.solv' file.
+
+*-o* 'OUTFILE'::
+Write the generated solv to 'OUTFILE' instead of standard output.
+
+*-P*::
+Print percentages as packages are being read in. The output
+format is like rpm's --percent option.
+
+*-r* 'ROOTDIR'::
+Use 'ROOTDIR' as root directory.
+
+*-k*::
+Read pubkeys from the rpm database instead of installed packages.
+Note that many distributions stopped storing pubkeys in the
+database but use a directory like */var/lib/rpm/pubkeys*
+instead.
+
+*-A*::
+Also scan the */usr/share/appdata* for installed appdata files
+and create pseudo packages for each file.
+
+*-p* 'PRODDIR'::
+Also read SUSE product files from directory 'PRODDIR'. The
+standard directory is */etc/products.d*.
+
+*-n*::
+Do not read any packages from the rpm database. This is useful
+together with *-p* to only convert SUSE products.
+
+*-X*::
+Autoexpand SUSE pattern and product provides into packages.
+
+See Also
+--------
+rpms2solv(1)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/rpmmd2solv.1 b/doc/rpmmd2solv.1
new file mode 100644 (file)
index 0000000..249d801
--- /dev/null
@@ -0,0 +1,48 @@
+'\" t
+.\"     Title: rpmmd2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/24/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "RPMMD2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+rpmmd2solv \- convert files in rpm\-md format into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBrpmmd2solv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The rpmmd2solv tool reads rpm\-md xml data from stdin, and writes it as solv file to standard output\&. It understands the \fBprimary\fR, \fBfilelist\fR, \fBother\fR, and \fBsusedata\fR format\&.
+.PP
+\fB\-X\fR
+.RS 4
+Autoexpand SUSE pattern and product provides into packages\&.
+.RE
+.SH "SEE ALSO"
+.sp
+repomdxml2solv(1), mergesolv(1), createrepo(8)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/rpmmd2solv.txt b/doc/rpmmd2solv.txt
new file mode 100644 (file)
index 0000000..c72ccc9
--- /dev/null
@@ -0,0 +1,30 @@
+rpmmd2solv(1)
+=============
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+rpmmd2solv - convert files in rpm-md format into a solv file
+
+Synopsis
+--------
+*rpmmd2solv* ['OPTIONS']
+
+Description
+-----------
+The rpmmd2solv tool reads rpm-md xml data from stdin, and writes
+it as solv file to standard output. It understands the *primary*,
+*filelist*, *other*, and *susedata* format.
+
+*-X*::
+Autoexpand SUSE pattern and product provides into packages.
+
+See Also
+--------
+repomdxml2solv(1), mergesolv(1), createrepo(8)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/rpms2solv.1 b/doc/rpms2solv.1
new file mode 100644 (file)
index 0000000..c6a2725
--- /dev/null
@@ -0,0 +1,80 @@
+'\" t
+.\"     Title: rpms2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/24/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "RPMS2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+rpms2solv \- convert one or more rpms into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBrpms2solv\fR [\fIOPTIONS\fR] \fIRPM1\&.rpm\fR \&...
+.SH "DESCRIPTION"
+.sp
+The rpms2solv tool converts the header data from one or more rpms into the solv file written to standard output\&.
+.PP
+\fB\-m\fR \fIMANIFESTFILE\fR
+.RS 4
+Read the rpm file names from the specified
+\fIMANIFESTFILE\fR\&. You can use
+\fB\-\fR
+to read the manifest from standard input\&.
+.RE
+.PP
+\fB\-0\fR
+.RS 4
+Use a null byte as line terminator for manifest files instead of a newline\&. This is useful if the file names can contain newlines\&. See also the
+\fB\-print0\fR
+option in
+\fBfind\fR\&.
+.RE
+.PP
+\fB\-F\fR
+.RS 4
+Do not put all files from the headers into the file list, but instead use the filtering also found in
+\fBcreaterepo\fR\&.
+.RE
+.PP
+\fB\-k\fR
+.RS 4
+Read pubkeys instead of rpms\&.
+.RE
+.PP
+\fB\-K\fR
+.RS 4
+Read pubkey keyrings instead of rpms\&.
+.RE
+.PP
+\fB\-X\fR
+.RS 4
+Autoexpand SUSE pattern and product provides into packages\&.
+.RE
+.SH "SEE ALSO"
+.sp
+rpmdb2solv(1)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/rpms2solv.txt b/doc/rpms2solv.txt
new file mode 100644 (file)
index 0000000..244dffb
--- /dev/null
@@ -0,0 +1,48 @@
+rpms2solv(1)
+============
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+rpms2solv - convert one or more rpms into a solv file
+
+Synopsis
+--------
+*rpms2solv* ['OPTIONS'] 'RPM1.rpm' ...
+
+Description
+-----------
+The rpms2solv tool converts the header data from one or more
+rpms into the solv file written to standard output.
+
+*-m* 'MANIFESTFILE'::
+Read the rpm file names from the specified 'MANIFESTFILE'. You can
+use *-* to read the manifest from standard input.
+
+*-0*::
+Use a null byte as line terminator for manifest files instead of
+a newline. This is useful if the file names can contain newlines.
+See also the *-print0* option in *find*.
+
+*-F*::
+Do not put all files from the headers into the file list, but
+instead use the filtering also found in *createrepo*.
+
+*-k*::
+Read pubkeys instead of rpms.
+
+*-K*::
+Read pubkey keyrings instead of rpms.
+
+*-X*::
+Autoexpand SUSE pattern and product provides into packages.
+
+See Also
+--------
+rpmdb2solv(1)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/susetags2solv.1 b/doc/susetags2solv.1
new file mode 100644 (file)
index 0000000..9ec9510
--- /dev/null
@@ -0,0 +1,66 @@
+'\" t
+.\"     Title: susetags2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/24/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "SUSETAGS2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+susetags2solv \- convert the susetags repository format into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBsusetags2solv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The susetags format is most as repository format on most products created by SUSE\&. The susetags2solv reads data from standard input, converts the format into a solv file, and writes it to standard output\&.
+.PP
+\fB\-c\fR \fICONTENTFILE\fR
+.RS 4
+Also parse the specified content file containing meta information about the repository\&.
+.RE
+.PP
+\fB\-q\fR \fIWHAT\fR
+.RS 4
+Data query mode: instead of writing a solv file, select the
+\fIWHAT\fR
+element in the input data and write it to standard output\&. An example for
+\fIWHAT\fR
+is
+\fBdefaultvendor\fR
+to get a default vendor for the repository\&.
+.RE
+.PP
+\fB\-M\fR \fIMERGEFILE\&.solv\fR
+.RS 4
+Merge the content of the specified solv file into the output\&.
+.RE
+.PP
+\fB\-X\fR
+.RS 4
+Autoexpand SUSE pattern and product provides into packages\&.
+.RE
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/susetags2solv.txt b/doc/susetags2solv.txt
new file mode 100644 (file)
index 0000000..9a2e2f1
--- /dev/null
@@ -0,0 +1,39 @@
+susetags2solv(1)
+================
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+susetags2solv - convert the susetags repository format into a solv file
+
+Synopsis
+--------
+*susetags2solv* ['OPTIONS']
+
+Description
+-----------
+The susetags format is most as repository format on most products
+created by SUSE. The susetags2solv reads data from standard input,
+converts the format into a solv file, and writes it to standard output.
+
+*-c* 'CONTENTFILE'::
+Also parse the specified content file containing meta information
+about the repository.
+
+*-q* 'WHAT'::
+Data query mode: instead of writing a solv file, select the
+'WHAT' element in the input data and write it to standard output.
+An example for 'WHAT' is *defaultvendor* to get a default vendor for
+the repository.
+
+*-M* 'MERGEFILE.solv'::
+Merge the content of the specified solv file into the output.
+
+*-X*::
+Autoexpand SUSE pattern and product provides into packages.
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/testsolv.1 b/doc/testsolv.1
new file mode 100644 (file)
index 0000000..faf97b6
--- /dev/null
@@ -0,0 +1,62 @@
+'\" t
+.\"     Title: testsolv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/22/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "TESTSOLV" "1" "09/22/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+testsolv \- run a libsolv testcase through the solver
+.SH "SYNOPSIS"
+.sp
+\fBtestsolv\fR [\fIOPTIONS\fR] \fITESTCASE\fR
+.SH "DESCRIPTION"
+.sp
+The testsolv tools can be used to run a testcase\&. Testcases can either be manually created to test specific features, or they can be written by libsolv\(cqs testcase_write function\&. This is useful to evaluate bug reports about the solver\&.
+.PP
+\fB\-v\fR
+.RS 4
+Increase the debug level of the solver\&. This option can be specified multiple times to further increase the amount of debug data\&.
+.RE
+.PP
+\fB\-r\fR
+.RS 4
+Write the output in testcase format instead of human readable text\&. The output can then be used in the result section of the test case\&. If the
+\fB\-r\fR
+option is given twice, the output is formated for verbatim inclusion\&.
+.RE
+.PP
+\fB\-l\fR \fIPKGSPEC\fR
+.RS 4
+Instead of running the solver, list packages in the repositories\&.
+.RE
+.PP
+\fB\-s\fR \fISOLUTIONSPEC\fR
+.RS 4
+This is used in the solver test suite to test the calculated solutions to encountered problems\&.
+.RE
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/testsolv.txt b/doc/testsolv.txt
new file mode 100644 (file)
index 0000000..dc3a34e
--- /dev/null
@@ -0,0 +1,41 @@
+testsolv(1)
+===========
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+testsolv - run a libsolv testcase through the solver
+
+Synopsis
+--------
+*testsolv* ['OPTIONS'] 'TESTCASE'
+
+Description
+-----------
+The testsolv tools can be used to run a testcase. Testcases can
+either be manually created to test specific features, or they
+can be written by libsolv's testcase_write function. This is useful
+to evaluate bug reports about the solver.
+
+*-v*::
+Increase the debug level of the solver. This option can be specified
+multiple times to further increase the amount of debug data.
+
+*-r*::
+Write the output in testcase format instead of human readable text.
+The output can then be used in the result section of the test case.
+If the *-r* option is given twice, the output is formated for
+verbatim inclusion.
+
+*-l* 'PKGSPEC'::
+Instead of running the solver, list packages in the repositories.
+
+*-s* 'SOLUTIONSPEC'::
+This is used in the solver test suite to test the calculated solutions
+to encountered problems.
+
+Author
+------
+Michael Schroeder <mls@suse.de>
diff --git a/doc/updateinfoxml2solv.1 b/doc/updateinfoxml2solv.1
new file mode 100644 (file)
index 0000000..03c5cc7
--- /dev/null
@@ -0,0 +1,43 @@
+'\" t
+.\"     Title: updateinfoxml2solv
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/24/2014
+.\"    Manual: LIBSOLV
+.\"    Source: libsolv
+.\"  Language: English
+.\"
+.TH "UPDATEINFOXML2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+updateinfoxml2solv \- convert rpm\-md\*(Aqs updateinfo\&.xml format into a solv file
+.SH "SYNOPSIS"
+.sp
+\fBupdateinfoxml2solv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The updateinfoxml2solv tool reads rpm\-md\(cqs updateinfo xml data from stdin, and writes it as solv file to standard output\&. Update elements are converted into special \fBpatch:\fR pseudo packages\&.
+.SH "SEE ALSO"
+.sp
+mergesolv(1), createrepo(8)
+.SH "AUTHOR"
+.sp
+Michael Schroeder <mls@suse\&.de>
diff --git a/doc/updateinfoxml2solv.txt b/doc/updateinfoxml2solv.txt
new file mode 100644 (file)
index 0000000..7e7c5fc
--- /dev/null
@@ -0,0 +1,27 @@
+updateinfoxml2solv(1)
+=====================
+:man manual: LIBSOLV
+:man source: libsolv
+
+
+Name
+----
+updateinfoxml2solv - convert rpm-md's updateinfo.xml format into a solv file
+
+Synopsis
+--------
+*updateinfoxml2solv* ['OPTIONS']
+
+Description
+-----------
+The updateinfoxml2solv tool reads rpm-md's updateinfo xml data from stdin,
+and writes it as solv file to standard output. Update elements are converted
+into special *patch:* pseudo packages.
+
+See Also
+--------
+mergesolv(1), createrepo(8)
+
+Author
+------
+Michael Schroeder <mls@suse.de>
index 3b96974..5f017f2 100644 (file)
@@ -119,7 +119,7 @@ ENDIF (DISABLE_SHARED)
 SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext")
 SET_TARGET_PROPERTIES(libsolvext PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION})
 
 SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext")
 SET_TARGET_PROPERTIES(libsolvext PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION})
 
-INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/solv")
+INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/solv")
 INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
 
 IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
 INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
 
 IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
index c4ad78f..b4541c3 100644 (file)
@@ -1414,12 +1414,12 @@ freestate(struct rpmdbstate *state)
   /* close down */
   if (!state)
     return;
   /* close down */
   if (!state)
     return;
-  if (state->rootdir)
-    solv_free(state->rootdir);
   if (state->db)
     state->db->close(state->db, 0);
   if (state->dbenv)
     closedbenv(state);
   if (state->db)
     state->db->close(state->db, 0);
   if (state->dbenv)
     closedbenv(state);
+  if (state->rootdir)
+    solv_free(state->rootdir);
   solv_free(state->rpmhead);
 }
 
   solv_free(state->rpmhead);
 }
 
index 5029a68..21dd913 100644 (file)
@@ -829,6 +829,8 @@ startElement(void *userData, const char *name, const char **atts)
            pd->ret = pool_error(pool, -1, "<dir .../> tag without 'name' attribute");
             break;
           }
            pd->ret = pool_error(pool, -1, "<dir .../> tag without 'name' attribute");
             break;
           }
+        if (!dirid)
+          dirid = repodata_str2dir(pd->data, "/", 1);
         if ((str = find_attr("size", atts)) != 0)
           filesz = strtol(str, 0, 0);
         if ((str = find_attr("count", atts)) != 0)
         if ((str = find_attr("size", atts)) != 0)
           filesz = strtol(str, 0, 0);
         if ((str = find_attr("count", atts)) != 0)
index 28bd976..9e7f5e6 100644 (file)
@@ -1,4 +1,13 @@
 -------------------------------------------------------------------
 -------------------------------------------------------------------
+Tue Oct  7 14:39:23 CEST 2014 - mls@suse.de
+
+- fix bug in reorder_dq_for_jobrules leading to crashes
+  [bnc#899907]
+- rename rpm rules to pkg rules
+- add manpages for the tools
+- bump version to 0.6.6
+
+-------------------------------------------------------------------
 Thu Sep 11 17:33:04 CEST 2014 - mls@suse.de
 
 - support DUCHANGES_ONLYADD flag in diskusage calculation
 Thu Sep 11 17:33:04 CEST 2014 - mls@suse.de
 
 - support DUCHANGES_ONLYADD flag in diskusage calculation
index e235f9c..5292459 100644 (file)
@@ -94,7 +94,6 @@ A new approach to package dependency solving
 %package devel
 Summary:        A new approach to package dependency solving
 Group:          Development/Libraries/C and C++
 %package devel
 Summary:        A new approach to package dependency solving
 Group:          Development/Libraries/C and C++
-Requires:       libsolv-tools = %version
 %if !%{with disable_shared}
 Requires:       libsolv@LIBSOLV_SOVERSION@ = %version
 %endif
 %if !%{with disable_shared}
 Requires:       libsolv@LIBSOLV_SOVERSION@ = %version
 %endif
@@ -219,9 +218,11 @@ rm -rf "$RPM_BUILD_ROOT"
 %defattr(-,root,root)
 %if 0%{?suse_version}
 %exclude %{_bindir}/helix2solv
 %defattr(-,root,root)
 %if 0%{?suse_version}
 %exclude %{_bindir}/helix2solv
+%exclude %{_mandir}/man1/helix2solv*
 %endif
 %exclude %{_bindir}/solv
 %{_bindir}/*
 %endif
 %exclude %{_bindir}/solv
 %{_bindir}/*
+%{_mandir}/man1/*
 
 %files devel
 %defattr(-,root,root)
 
 %files devel
 %defattr(-,root,root)
@@ -236,9 +237,10 @@ rm -rf "$RPM_BUILD_ROOT"
 %{_includedir}/solv
 %if 0%{?suse_version}
 %{_bindir}/helix2solv
 %{_includedir}/solv
 %if 0%{?suse_version}
 %{_bindir}/helix2solv
+%{_mandir}/man1/helix2solv*
 %endif
 %{_datadir}/cmake/Modules/*
 %endif
 %{_datadir}/cmake/Modules/*
-%{_mandir}/man?/*
+%{_mandir}/man3/*
 
 %files demo
 %defattr(-,root,root)
 
 %files demo
 %defattr(-,root,root)
index f6542ce..b78a82a 100644 (file)
@@ -39,7 +39,7 @@ ENDIF (DISABLE_SHARED)
 SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv")
 SET_TARGET_PROPERTIES(libsolv PROPERTIES SOVERSION ${LIBSOLV_SOVERSION})
 
 SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv")
 SET_TARGET_PROPERTIES(libsolv PROPERTIES SOVERSION ${LIBSOLV_SOVERSION})
 
-INSTALL (FILES ${libsolv_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/solv")
+INSTALL (FILES ${libsolv_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/solv")
 INSTALL (TARGETS libsolv LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
 
 IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
 INSTALL (TARGETS libsolv LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
 
 IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
index b2063a5..c82baa8 100644 (file)
@@ -930,7 +930,7 @@ findproblemrule_internal(Solver *solv, Id idx, Id *reqrp, Id *conrp, Id *sysrp,
        }
       else
        {
        }
       else
        {
-         assert(rid < solv->rpmrules_end);
+         assert(rid < solv->pkgrules_end);
          r = solv->rules + rid;
          d = r->d < 0 ? -r->d - 1 : r->d;
          if (!d && r->w2 < 0)
          r = solv->rules + rid;
          d = r->d < 0 ? -r->d - 1 : r->d;
          if (!d && r->w2 < 0)
@@ -1103,40 +1103,40 @@ solver_problemruleinfo2str(Solver *solv, SolverRuleinfo type, Id source, Id targ
       return pool_tmpjoin(pool, "package ", pool_dep2str(pool, dep), " does not exist");
     case SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM:
       return pool_tmpjoin(pool, pool_dep2str(pool, dep), " is provided by the system", 0);
       return pool_tmpjoin(pool, "package ", pool_dep2str(pool, dep), " does not exist");
     case SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM:
       return pool_tmpjoin(pool, pool_dep2str(pool, dep), " is provided by the system", 0);
-    case SOLVER_RULE_RPM:
+    case SOLVER_RULE_PKG:
       return "some dependency problem";
     case SOLVER_RULE_BEST:
       if (source > 0)
         return pool_tmpjoin(pool, "cannot install the best update candidate for package ", pool_solvid2str(pool, source), 0);
      return "cannot install the best candidate for the job";
       return "some dependency problem";
     case SOLVER_RULE_BEST:
       if (source > 0)
         return pool_tmpjoin(pool, "cannot install the best update candidate for package ", pool_solvid2str(pool, source), 0);
      return "cannot install the best candidate for the job";
-    case SOLVER_RULE_RPM_NOT_INSTALLABLE:
+    case SOLVER_RULE_PKG_NOT_INSTALLABLE:
       return pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), " is not installable");
       return pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), " is not installable");
-    case SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP:
+    case SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP:
       s = pool_tmpjoin(pool, "nothing provides ", pool_dep2str(pool, dep), 0);
       return pool_tmpappend(pool, s, " needed by ", pool_solvid2str(pool, source));
       s = pool_tmpjoin(pool, "nothing provides ", pool_dep2str(pool, dep), 0);
       return pool_tmpappend(pool, s, " needed by ", pool_solvid2str(pool, source));
-    case SOLVER_RULE_RPM_SAME_NAME:
+    case SOLVER_RULE_PKG_SAME_NAME:
       s = pool_tmpjoin(pool, "cannot install both ", pool_solvid2str(pool, source), 0);
       return pool_tmpappend(pool, s, " and ", pool_solvid2str(pool, target));
       s = pool_tmpjoin(pool, "cannot install both ", pool_solvid2str(pool, source), 0);
       return pool_tmpappend(pool, s, " and ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_PACKAGE_CONFLICT:
+    case SOLVER_RULE_PKG_CONFLICTS:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " conflicts with ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " conflicts with ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_PACKAGE_OBSOLETES:
+    case SOLVER_RULE_PKG_OBSOLETES:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " obsoletes ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " obsoletes ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES:
+    case SOLVER_RULE_PKG_INSTALLED_OBSOLETES:
       s = pool_tmpjoin(pool, "installed package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " obsoletes ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
       s = pool_tmpjoin(pool, "installed package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " obsoletes ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_IMPLICIT_OBSOLETES:
+    case SOLVER_RULE_PKG_IMPLICIT_OBSOLETES:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " implicitly obsoletes ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " implicitly obsoletes ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_PACKAGE_REQUIRES:
+    case SOLVER_RULE_PKG_REQUIRES:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), " requires ");
       return pool_tmpappend(pool, s, pool_dep2str(pool, dep), ", but none of the providers can be installed");
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), " requires ");
       return pool_tmpappend(pool, s, pool_dep2str(pool, dep), ", but none of the providers can be installed");
-    case SOLVER_RULE_RPM_SELF_CONFLICT:
+    case SOLVER_RULE_PKG_SELF_CONFLICT:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), " conflicts with ");
       return pool_tmpappend(pool, s, pool_dep2str(pool, dep), " provided by itself");
     case SOLVER_RULE_YUMOBS:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), " conflicts with ");
       return pool_tmpappend(pool, s, pool_dep2str(pool, dep), " provided by itself");
     case SOLVER_RULE_YUMOBS:
index 922b9d0..048cd99 100644 (file)
 
 #define RULES_BLOCK 63
 
 
 #define RULES_BLOCK 63
 
-static void addrpmruleinfo(Solver *solv, Id p, Id d, int type, Id dep);
+static void addpkgruleinfo(Solver *solv, Id p, Id d, int type, Id dep);
 static void solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded);
 
 /*-------------------------------------------------------------------
  * Check if dependency is possible
  *
  * mirrors solver_dep_fulfilled but uses map m instead of the decisionmap.
 static void solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded);
 
 /*-------------------------------------------------------------------
  * Check if dependency is possible
  *
  * mirrors solver_dep_fulfilled but uses map m instead of the decisionmap.
- * used in solver_addrpmrulesforweak and solver_createcleandepsmap.
+ * used in solver_addpkgrulesforweak and solver_createcleandepsmap.
  */
 
 static inline int
  */
 
 static inline int
@@ -243,7 +243,7 @@ hashrule(Solver *solv, Id p, Id d, int n)
 
 /*
  * add rule
 
 /*
  * add rule
- *  p = direct literal; always < 0 for installed rpm rules
+ *  p = direct literal; always < 0 for installed pkg rules
  *  d, if < 0 direct literal, if > 0 offset into whatprovides, if == 0 rule is assertion (look at p only)
  *
  *
  *  d, if < 0 direct literal, if > 0 offset into whatprovides, if == 0 rule is assertion (look at p only)
  *
  *
@@ -273,7 +273,7 @@ hashrule(Solver *solv, Id p, Id d, int n)
  *   Binary rule: p = first literal, d = 0, w2 = second literal, w1 = p
  *   every other : w1 = p, w2 = whatprovidesdata[d];
  *
  *   Binary rule: p = first literal, d = 0, w2 = second literal, w1 = p
  *   every other : w1 = p, w2 = whatprovidesdata[d];
  *
- *   always returns a rule for non-rpm rules
+ *   always returns a rule for non-pkg rules
  */
 
 Rule *
  */
 
 Rule *
@@ -289,11 +289,11 @@ solver_addrule(Solver *solv, Id p, Id d)
                                          >1 = multi-literal rule
                                        */
 
                                          >1 = multi-literal rule
                                        */
 
-  /* it often happenes that requires lead to adding the same rpm rule
+  /* it often happenes that requires lead to adding the same pkg rule
    * multiple times, so we prune those duplicates right away to make
    * the work for unifyrules a bit easier */
 
    * multiple times, so we prune those duplicates right away to make
    * the work for unifyrules a bit easier */
 
-  if (!solv->rpmrules_end)             /* we add rpm rules */
+  if (!solv->pkgrules_end)             /* we add pkg rules */
     {
       r = solv->rules + solv->nrules - 1;      /* get the last added rule */
       if (r->p == p && r->d == d && (d != 0 || !r->w2))
     {
       r = solv->rules + solv->nrules - 1;      /* get the last added rule */
       if (r->p == p && r->d == d && (d != 0 || !r->w2))
@@ -319,7 +319,7 @@ solver_addrule(Solver *solv, Id p, Id d)
        d = dp[-1];
     }
 
        d = dp[-1];
     }
 
-  if (n == 1 && p > d && !solv->rpmrules_end)
+  if (n == 1 && p > d && !solv->pkgrules_end)
     {
       /* put smallest literal first so we can find dups */
       n = p; p = d; d = n;             /* p <-> d */
     {
       /* put smallest literal first so we can find dups */
       n = p; p = d; d = n;             /* p <-> d */
@@ -327,7 +327,7 @@ solver_addrule(Solver *solv, Id p, Id d)
     }
 
   /*
     }
 
   /*
-   * check for duplicate (r is only set if we're adding rpm rules)
+   * check for duplicate (r is only set if we're adding pkg rules)
    */
   if (r)
     {
    */
   if (r)
     {
@@ -398,7 +398,7 @@ solver_shrinkrules(Solver *solv, int nrules)
 
 /******************************************************************************
  ***
 
 /******************************************************************************
  ***
- *** rpm rule part: create rules representing the package dependencies
+ *** pkg rule part: create rules representing the package dependencies
  ***
  ***/
 
  ***
  ***/
 
@@ -442,12 +442,12 @@ makemultiversionconflict(Solver *solv, Id n, Id con)
 }
 
 static inline void
 }
 
 static inline void
-addrpmrule(Solver *solv, Id p, Id d, int type, Id dep)
+addpkgrule(Solver *solv, Id p, Id d, int type, Id dep)
 {
   if (!solv->ruleinfoq)
     solver_addrule(solv, p, d);
   else
 {
   if (!solv->ruleinfoq)
     solver_addrule(solv, p, d);
   else
-    addrpmruleinfo(solv, p, d, type, dep);
+    addpkgruleinfo(solv, p, d, type, dep);
 }
 
 #ifdef ENABLE_LINKED_PKGS
 }
 
 #ifdef ENABLE_LINKED_PKGS
@@ -469,22 +469,22 @@ addlinks(Solver *solv, Solvable *s, Id req, Queue *qr, Id prv, Queue *qp, Map *m
 #endif
 
   if (qr->count == 1)
 #endif
 
   if (qr->count == 1)
-    addrpmrule(solv, qr->elements[0], -(s - pool->solvables), SOLVER_RULE_RPM_PACKAGE_REQUIRES, req);
+    addpkgrule(solv, qr->elements[0], -(s - pool->solvables), SOLVER_RULE_PKG_REQUIRES, req);
   else
   else
-    addrpmrule(solv, -(s - pool->solvables), pool_queuetowhatprovides(pool, qr), SOLVER_RULE_RPM_PACKAGE_REQUIRES, req);
+    addpkgrule(solv, -(s - pool->solvables), pool_queuetowhatprovides(pool, qr), SOLVER_RULE_PKG_REQUIRES, req);
   if (qp->count > 1)
     {
       Id d = pool_queuetowhatprovides(pool, qp);
       for (i = 0; i < qr->count; i++)
   if (qp->count > 1)
     {
       Id d = pool_queuetowhatprovides(pool, qp);
       for (i = 0; i < qr->count; i++)
-       addrpmrule(solv, -qr->elements[i], d, SOLVER_RULE_RPM_PACKAGE_REQUIRES, prv);
+       addpkgrule(solv, -qr->elements[i], d, SOLVER_RULE_PKG_REQUIRES, prv);
     }
   else if (qp->count)
     {
       for (i = 0; i < qr->count; i++)
     }
   else if (qp->count)
     {
       for (i = 0; i < qr->count; i++)
-       addrpmrule(solv, qp->elements[0], -qr->elements[i], SOLVER_RULE_RPM_PACKAGE_REQUIRES, prv);
+       addpkgrule(solv, qp->elements[0], -qr->elements[i], SOLVER_RULE_PKG_REQUIRES, prv);
     }
   if (!m)
     }
   if (!m)
-    return;    /* nothing more to do if called from getrpmruleinfos() */
+    return;    /* nothing more to do if called from getpkgruleinfos() */
   for (i = 0; i < qr->count; i++)
     if (!MAPTST(m, qr->elements[i]))
       queue_push(workq, qr->elements[i]);
   for (i = 0; i < qr->count; i++)
     if (!MAPTST(m, qr->elements[i]))
       queue_push(workq, qr->elements[i]);
@@ -541,7 +541,7 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
   queue_init(&bq);
 
   /* CNF expansion for requires, DNF + INVERT expansion for conflicts */
   queue_init(&bq);
 
   /* CNF expansion for requires, DNF + INVERT expansion for conflicts */
-  i = pool_normalize_complex_dep(pool, dep, &bq, type == SOLVER_RULE_RPM_PACKAGE_REQUIRES ? 0 : (CPLXDEPS_TODNF | CPLXDEPS_EXPAND | CPLXDEPS_INVERT));
+  i = pool_normalize_complex_dep(pool, dep, &bq, type == SOLVER_RULE_DEP_PACKAGE_REQUIRES ? 0 : (CPLXDEPS_TODNF | CPLXDEPS_EXPAND | CPLXDEPS_INVERT));
   /* handle special cases */
   if (i == 0)
     {
   /* handle special cases */
   if (i == 0)
     {
@@ -552,7 +552,7 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
       else
        {
          POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable (%s)\n", pool_solvid2str(pool, p), p, pool_dep2str(pool, dep));
       else
        {
          POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable (%s)\n", pool_solvid2str(pool, p), p, pool_dep2str(pool, dep));
-         addrpmrule(solv, -p, 0, type == SOLVER_RULE_RPM_PACKAGE_REQUIRES ? SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP : type, dep);
+         addpkgrule(solv, -p, 0, type == SOLVER_RULE_PKG_REQUIRES ? SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP : type, dep);
        }
       queue_free(&bq);
       return;
        }
       queue_free(&bq);
       return;
@@ -588,10 +588,10 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
            {
              /* nothing provides req! */
              POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable (%s)\n", pool_solvid2str(pool, p), p, pool_dep2str(pool, dep));
            {
              /* nothing provides req! */
              POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable (%s)\n", pool_solvid2str(pool, p), p, pool_dep2str(pool, dep));
-             addrpmrule(solv, -p, 0, SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP, dep);
+             addpkgrule(solv, -p, 0, SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, dep);
              continue;
            }
              continue;
            }
-         addrpmrule(solv, -p, dp - pool->whatprovidesdata, SOLVER_RULE_RPM_PACKAGE_REQUIRES, dep);
+         addpkgrule(solv, -p, dp - pool->whatprovidesdata, SOLVER_RULE_PKG_REQUIRES, dep);
          /* push all non-visited providers on the work queue */
          if (m)
            for (; *dp; dp++)
          /* push all non-visited providers on the work queue */
          if (m)
            for (; *dp; dp++)
@@ -611,19 +611,19 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
            continue;
          if (-p == p2)
            {
            continue;
          if (-p == p2)
            {
-             if (type == SOLVER_RULE_RPM_PACKAGE_CONFLICT)
+             if (type == SOLVER_RULE_PKG_CONFLICTS)
                {
                  if (pool->forbidselfconflicts && !is_otherproviders_dep(pool, dep))
                {
                  if (pool->forbidselfconflicts && !is_otherproviders_dep(pool, dep))
-                   addrpmrule(solv, -p, 0, SOLVER_RULE_RPM_SELF_CONFLICT, dep);
+                   addpkgrule(solv, -p, 0, SOLVER_RULE_PKG_SELF_CONFLICT, dep);
                  continue;
                }
                  continue;
                }
-             addrpmrule(solv, -p, 0, type, dep);
+             addpkgrule(solv, -p, 0, type, dep);
              continue;
            }
          if (p2 > 0)
              continue;
            }
          if (p2 > 0)
-           addrpmrule(solv, p2, -p, type, dep);        /* hack so that we don't need pool_queuetowhatprovides */
+           addpkgrule(solv, p2, -p, type, dep);        /* hack so that we don't need pool_queuetowhatprovides */
          else
          else
-           addrpmrule(solv, -p, p2, type, dep);
+           addpkgrule(solv, -p, p2, type, dep);
          if (m && p2 > 0 && !MAPTST(m, p2))
            queue_push(workq, p2);
        }
          if (m && p2 > 0 && !MAPTST(m, p2))
            queue_push(workq, p2);
        }
@@ -674,7 +674,7 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
              memset(&q, 0, sizeof(q));
              q.count = qcnt - 1;
              q.elements = qele + 1;
              memset(&q, 0, sizeof(q));
              q.count = qcnt - 1;
              q.elements = qele + 1;
-             addrpmrule(solv, qele[0], pool_queuetowhatprovides(pool, &q), type, dep);
+             addpkgrule(solv, qele[0], pool_queuetowhatprovides(pool, &q), type, dep);
              if (m)
                for (j = 0; j < qcnt; j++)
                  if (qele[j] > 0 && !MAPTST(m, qele[j]))
              if (m)
                for (j = 0; j < qcnt; j++)
                  if (qele[j] > 0 && !MAPTST(m, qele[j]))
@@ -708,7 +708,7 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
  */
 
 void
  */
 
 void
-solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
+solver_addpkgrulesforsolvable(Solver *solv, Solvable *s, Map *m)
 {
   Pool *pool = solv->pool;
   Repo *installed = solv->installed;
 {
   Pool *pool = solv->pool;
   Repo *installed = solv->installed;
@@ -751,10 +751,10 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
       dontfix = 0;
       if (installed                    /* Installed system available */
          && s->repo == installed       /* solvable is installed */
       dontfix = 0;
       if (installed                    /* Installed system available */
          && s->repo == installed       /* solvable is installed */
-         && !solv->fixmap_all          /* NOT repair errors in rpm dependency graph */
+         && !solv->fixmap_all          /* NOT repair errors in dependency graph */
          && !(solv->fixmap.size && MAPTST(&solv->fixmap, n - installed->start)))
         {
          && !(solv->fixmap.size && MAPTST(&solv->fixmap, n - installed->start)))
         {
-         dontfix = 1;                  /* dont care about broken rpm deps */
+         dontfix = 1;                  /* dont care about broken deps */
         }
 
       if (!dontfix)
         }
 
       if (!dontfix)
@@ -764,7 +764,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                : !pool_installable(pool, s))
            {
              POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable\n", pool_solvid2str(pool, n), n);
                : !pool_installable(pool, s))
            {
              POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable\n", pool_solvid2str(pool, n), n);
-             addrpmrule(solv, -n, 0, SOLVER_RULE_RPM_NOT_INSTALLABLE, 0);
+             addpkgrule(solv, -n, 0, SOLVER_RULE_PKG_NOT_INSTALLABLE, 0);
            }
        }
 
            }
        }
 
@@ -790,7 +790,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
              if (pool_is_complex_dep(pool, req))
                {
                  /* we have AND/COND deps, normalize */
              if (pool_is_complex_dep(pool, req))
                {
                  /* we have AND/COND deps, normalize */
-                 add_complex_deprules(solv, n, req, SOLVER_RULE_RPM_PACKAGE_REQUIRES, dontfix, &workq, m);
+                 add_complex_deprules(solv, n, req, SOLVER_RULE_PKG_REQUIRES, dontfix, &workq, m);
                  continue;
                }
 #endif
                  continue;
                }
 #endif
@@ -821,7 +821,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
              if (!*dp)
                {
                  POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable (%s)\n", pool_solvid2str(pool, n), n, pool_dep2str(pool, req));
              if (!*dp)
                {
                  POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable (%s)\n", pool_solvid2str(pool, n), n, pool_dep2str(pool, req));
-                 addrpmrule(solv, -n, 0, SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP, req);
+                 addpkgrule(solv, -n, 0, SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, req);
                  continue;
                }
 
                  continue;
                }
 
@@ -834,7 +834,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
 
              /* add 'requires' dependency */
               /* rule: (-requestor|provider1|provider2|...|providerN) */
 
              /* add 'requires' dependency */
               /* rule: (-requestor|provider1|provider2|...|providerN) */
-             addrpmrule(solv, -n, dp - pool->whatprovidesdata, SOLVER_RULE_RPM_PACKAGE_REQUIRES, req);
+             addpkgrule(solv, -n, dp - pool->whatprovidesdata, SOLVER_RULE_PKG_REQUIRES, req);
 
              /* push all non-visited providers on the work queue */
              if (m)
 
              /* push all non-visited providers on the work queue */
              if (m)
@@ -872,7 +872,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
              if (!ispatch && pool_is_complex_dep(pool, con))
                {
                  /* we have AND/COND deps, normalize */
              if (!ispatch && pool_is_complex_dep(pool, con))
                {
                  /* we have AND/COND deps, normalize */
-                 add_complex_deprules(solv, n, con, SOLVER_RULE_RPM_PACKAGE_CONFLICT, dontfix, &workq, m);
+                 add_complex_deprules(solv, n, con, SOLVER_RULE_PKG_CONFLICTS, dontfix, &workq, m);
                  continue;
                }
 #endif
                  continue;
                }
 #endif
@@ -888,7 +888,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                    {
                      if (!pool->forbidselfconflicts || is_otherproviders_dep(pool, con))
                        continue;
                    {
                      if (!pool->forbidselfconflicts || is_otherproviders_dep(pool, con))
                        continue;
-                     addrpmrule(solv, -n, 0, SOLVER_RULE_RPM_SELF_CONFLICT, con);
+                     addpkgrule(solv, -n, 0, SOLVER_RULE_PKG_SELF_CONFLICT, con);
                      continue;
                    }
                  if (ispatch && solv->multiversion.size && MAPTST(&solv->multiversion, p) && ISRELDEP(con))
                      continue;
                    }
                  if (ispatch && solv->multiversion.size && MAPTST(&solv->multiversion, p) && ISRELDEP(con))
@@ -897,7 +897,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                      p = -makemultiversionconflict(solv, p, con);
                    }
                   /* rule: -n|-p: either solvable _or_ provider of conflict */
                      p = -makemultiversionconflict(solv, p, con);
                    }
                   /* rule: -n|-p: either solvable _or_ provider of conflict */
-                 addrpmrule(solv, -n, p == SYSTEMSOLVABLE ? 0 : -p, SOLVER_RULE_RPM_PACKAGE_CONFLICT, con);
+                 addpkgrule(solv, -n, p == SYSTEMSOLVABLE ? 0 : -p, SOLVER_RULE_PKG_CONFLICTS, con);
                }
            }
        }
                }
            }
        }
@@ -931,9 +931,9 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                      if (pool->obsoleteusescolors && !pool_colormatch(pool, s, ps))
                        continue;
                      if (!isinstalled)
                      if (pool->obsoleteusescolors && !pool_colormatch(pool, s, ps))
                        continue;
                      if (!isinstalled)
-                       addrpmrule(solv, -n, -p, SOLVER_RULE_RPM_PACKAGE_OBSOLETES, obs);
+                       addpkgrule(solv, -n, -p, SOLVER_RULE_PKG_OBSOLETES, obs);
                      else
                      else
-                       addrpmrule(solv, -n, -p, SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES, obs);
+                       addpkgrule(solv, -n, -p, SOLVER_RULE_PKG_INSTALLED_OBSOLETES, obs);
                    }
                }
            }
                    }
                }
            }
@@ -960,9 +960,9 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                  if (pool->implicitobsoleteusescolors && !pool_colormatch(pool, s, ps))
                    continue;
                  if (s->name == ps->name)
                  if (pool->implicitobsoleteusescolors && !pool_colormatch(pool, s, ps))
                    continue;
                  if (s->name == ps->name)
-                   addrpmrule(solv, -n, -p, SOLVER_RULE_RPM_SAME_NAME, 0);
+                   addpkgrule(solv, -n, -p, SOLVER_RULE_PKG_SAME_NAME, 0);
                  else
                  else
-                   addrpmrule(solv, -n, -p, SOLVER_RULE_RPM_IMPLICIT_OBSOLETES, s->name);
+                   addpkgrule(solv, -n, -p, SOLVER_RULE_PKG_IMPLICIT_OBSOLETES, s->name);
                }
            }
        }
                }
            }
        }
@@ -1011,7 +1011,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
 
 #ifdef ENABLE_LINKED_PKGS
 void
 
 #ifdef ENABLE_LINKED_PKGS
 void
-solver_addrpmrulesforlinked(Solver *solv, Map *m)
+solver_addpkgrulesforlinked(Solver *solv, Map *m)
 {
   Pool *pool = solv->pool;
   Solvable *s;
 {
   Pool *pool = solv->pool;
   Solvable *s;
@@ -1036,7 +1036,7 @@ solver_addrpmrulesforlinked(Solver *solv, Map *m)
          for (j = 0; j < qr.count; j++)
            if (MAPTST(m, qr.elements[j]))
              {
          for (j = 0; j < qr.count; j++)
            if (MAPTST(m, qr.elements[j]))
              {
-               solver_addrpmrulesforsolvable(solv, s, m);
+               solver_addpkgrulesforsolvable(solv, s, m);
                break;
              }
          queue_empty(&qr);
                break;
              }
          queue_empty(&qr);
@@ -1054,7 +1054,7 @@ solver_addrpmrulesforlinked(Solver *solv, Map *m)
  */
 
 void
  */
 
 void
-solver_addrpmrulesforweak(Solver *solv, Map *m)
+solver_addpkgrulesforweak(Solver *solv, Map *m)
 {
   Pool *pool = solv->pool;
   Solvable *s;
 {
   Pool *pool = solv->pool;
   Solvable *s;
@@ -1096,7 +1096,7 @@ solver_addrpmrulesforweak(Solver *solv, Map *m)
       /* if nothing found, goto next solvables */
       if (!sup)
        continue;
       /* if nothing found, goto next solvables */
       if (!sup)
        continue;
-      solver_addrpmrulesforsolvable(solv, s, m);
+      solver_addpkgrulesforsolvable(solv, s, m);
       n = 0;                   /* check all solvables again because we added solvables to m */
     }
 }
       n = 0;                   /* check all solvables again because we added solvables to m */
     }
 }
@@ -1112,7 +1112,7 @@ solver_addrpmrulesforweak(Solver *solv, Map *m)
  */
 
 void
  */
 
 void
-solver_addrpmrulesforupdaters(Solver *solv, Solvable *s, Map *m, int allow_all)
+solver_addpkgrulesforupdaters(Solver *solv, Solvable *s, Map *m, int allow_all)
 {
   Pool *pool = solv->pool;
   int i;
 {
   Pool *pool = solv->pool;
   int i;
@@ -1125,11 +1125,11 @@ solver_addrpmrulesforupdaters(Solver *solv, Solvable *s, Map *m, int allow_all)
   policy_findupdatepackages(solv, s, &qs, allow_all);
     /* add rule for 's' if not already done */
   if (!MAPTST(m, s - pool->solvables))
   policy_findupdatepackages(solv, s, &qs, allow_all);
     /* add rule for 's' if not already done */
   if (!MAPTST(m, s - pool->solvables))
-    solver_addrpmrulesforsolvable(solv, s, m);
+    solver_addpkgrulesforsolvable(solv, s, m);
     /* foreach update candidate, add rule if not already done */
   for (i = 0; i < qs.count; i++)
     if (!MAPTST(m, qs.elements[i]))
     /* foreach update candidate, add rule if not already done */
   for (i = 0; i < qs.count; i++)
     if (!MAPTST(m, qs.elements[i]))
-      solver_addrpmrulesforsolvable(solv, pool->solvables + qs.elements[i], m);
+      solver_addpkgrulesforsolvable(solv, pool->solvables + qs.elements[i], m);
   queue_free(&qs);
 }
 
   queue_free(&qs);
 }
 
@@ -2374,7 +2374,7 @@ solver_reenablepolicyrules_cleandeps(Solver *solv, Id pkg)
  ***/
 
 static void
  ***/
 
 static void
-addrpmruleinfo(Solver *solv, Id p, Id d, int type, Id dep)
+addpkgruleinfo(Solver *solv, Id p, Id d, int type, Id dep)
 {
   Pool *pool = solv->pool;
   Rule *r;
 {
   Pool *pool = solv->pool;
   Rule *r;
@@ -2437,12 +2437,12 @@ addrpmruleinfo(Solver *solv, Id p, Id d, int type, Id dep)
            return;
        }
       /* should use a different type instead */
            return;
        }
       /* should use a different type instead */
-      if (type == SOLVER_RULE_RPM_PACKAGE_CONFLICT && !w2)
+      if (type == SOLVER_RULE_PKG_CONFLICTS && !w2)
        w2 = -SYSTEMSOLVABLE;
     }
   /* yep, rule matches. record info */
   queue_push(solv->ruleinfoq, type);
        w2 = -SYSTEMSOLVABLE;
     }
   /* yep, rule matches. record info */
   queue_push(solv->ruleinfoq, type);
-  if (type == SOLVER_RULE_RPM_SAME_NAME)
+  if (type == SOLVER_RULE_PKG_SAME_NAME)
     {
       /* we normalize same name order */
       queue_push(solv->ruleinfoq, op < 0 ? -op : 0);
     {
       /* we normalize same name order */
       queue_push(solv->ruleinfoq, op < 0 ? -op : 0);
@@ -2478,7 +2478,7 @@ solver_allruleinfos_cmp(const void *ap, const void *bp, void *dp)
 }
 
 static void
 }
 
 static void
-getrpmruleinfos(Solver *solv, Rule *r, Queue *rq)
+getpkgruleinfos(Solver *solv, Rule *r, Queue *rq)
 {
   Pool *pool = solv->pool;
   Id l, pp;
 {
   Pool *pool = solv->pool;
   Id l, pp;
@@ -2490,7 +2490,7 @@ getrpmruleinfos(Solver *solv, Rule *r, Queue *rq)
     {
       if (l >= 0)
        break;
     {
       if (l >= 0)
        break;
-      solver_addrpmrulesforsolvable(solv, pool->solvables - l, 0);
+      solver_addpkgrulesforsolvable(solv, pool->solvables - l, 0);
     }
 #ifdef ENABLE_LINKED_PKGS
   FOR_RULELITERALS(l, pp, r)
     }
 #ifdef ENABLE_LINKED_PKGS
   FOR_RULELITERALS(l, pp, r)
@@ -2517,7 +2517,7 @@ solver_allruleinfos(Solver *solv, Id rid, Queue *rq)
   int i, j;
 
   queue_empty(rq);
   int i, j;
 
   queue_empty(rq);
-  if (rid <= 0 || rid >= solv->rpmrules_end)
+  if (rid <= 0 || rid >= solv->pkgrules_end)
     {
       Id type, from, to, dep;
       type = solver_ruleinfo(solv, rid, &from, &to, &dep);
     {
       Id type, from, to, dep;
       type = solver_ruleinfo(solv, rid, &from, &to, &dep);
@@ -2527,7 +2527,7 @@ solver_allruleinfos(Solver *solv, Id rid, Queue *rq)
       queue_push(rq, dep);
       return 1;
     }
       queue_push(rq, dep);
       return 1;
     }
-  getrpmruleinfos(solv, r, rq);
+  getpkgruleinfos(solv, r, rq);
   /* now sort & unify em */
   if (!rq->count)
     return 0;
   /* now sort & unify em */
   if (!rq->count)
     return 0;
@@ -2565,18 +2565,18 @@ solver_ruleinfo(Solver *solv, Id rid, Id *fromp, Id *top, Id *depp)
     *top = 0;
   if (depp)
     *depp = 0;
     *top = 0;
   if (depp)
     *depp = 0;
-  if (rid > 0 && rid < solv->rpmrules_end)
+  if (rid > 0 && rid < solv->pkgrules_end)
     {
       Queue rq;
       int i;
 
       if (r->p >= 0)
     {
       Queue rq;
       int i;
 
       if (r->p >= 0)
-       return SOLVER_RULE_RPM;
+       return SOLVER_RULE_PKG;
       if (fromp)
        *fromp = -r->p;
       queue_init(&rq);
       if (fromp)
        *fromp = -r->p;
       queue_init(&rq);
-      getrpmruleinfos(solv, r, &rq);
-      type = SOLVER_RULE_RPM;
+      getpkgruleinfos(solv, r, &rq);
+      type = SOLVER_RULE_PKG;
       for (i = 0; i < rq.count; i += 4)
        {
          Id qt, qo, qp, qd;
       for (i = 0; i < rq.count; i += 4)
        {
          Id qt, qo, qp, qd;
@@ -2584,7 +2584,7 @@ solver_ruleinfo(Solver *solv, Id rid, Id *fromp, Id *top, Id *depp)
          qp = rq.elements[i + 1];
          qo = rq.elements[i + 2];
          qd = rq.elements[i + 3];
          qp = rq.elements[i + 1];
          qo = rq.elements[i + 2];
          qd = rq.elements[i + 3];
-         if (type == SOLVER_RULE_RPM || type > qt)
+         if (type == SOLVER_RULE_PKG || type > qt)
            {
              type = qt;
              if (fromp)
            {
              type = qt;
              if (fromp)
@@ -2688,8 +2688,8 @@ solver_ruleclass(Solver *solv, Id rid)
 {
   if (rid <= 0)
     return SOLVER_RULE_UNKNOWN;
 {
   if (rid <= 0)
     return SOLVER_RULE_UNKNOWN;
-  if (rid > 0 && rid < solv->rpmrules_end)
-    return SOLVER_RULE_RPM;
+  if (rid > 0 && rid < solv->pkgrules_end)
+    return SOLVER_RULE_PKG;
   if (rid >= solv->jobrules && rid < solv->jobrules_end)
     return SOLVER_RULE_JOB;
   if (rid >= solv->updaterules && rid < solv->updaterules_end)
   if (rid >= solv->jobrules && rid < solv->jobrules_end)
     return SOLVER_RULE_JOB;
   if (rid >= solv->updaterules && rid < solv->updaterules_end)
@@ -2872,7 +2872,7 @@ solver_addchoicerules(Solver *solv)
       return;
     }
   now = solv_timems(0);
       return;
     }
   now = solv_timems(0);
-  solv->choicerules_ref = solv_calloc(solv->rpmrules_end, sizeof(Id));
+  solv->choicerules_ref = solv_calloc(solv->pkgrules_end, sizeof(Id));
   queue_init(&q);
   queue_init(&qi);
   map_init(&m, pool->nsolvables);
   queue_init(&q);
   queue_init(&qi);
   map_init(&m, pool->nsolvables);
@@ -2887,7 +2887,7 @@ solver_addchoicerules(Solver *solv)
   lastaddedp = 0;
   lastaddedd = 0;
   lastaddedcnt = 0;
   lastaddedp = 0;
   lastaddedd = 0;
   lastaddedcnt = 0;
-  for (rid = 1; rid < solv->rpmrules_end ; rid++)
+  for (rid = 1; rid < solv->pkgrules_end ; rid++)
     {
       r = solv->rules + rid;
       if (r->p >= 0 || ((r->d == 0 || r->d == -1) && r->w2 <= 0))
     {
       r = solv->rules + rid;
       if (r->p >= 0 || ((r->d == 0 || r->d == -1) && r->w2 <= 0))
@@ -4598,7 +4598,7 @@ solver_breakorphans(Solver *solv)
        continue;
       MAPSET(&m, p - installed->start);
     }
        continue;
       MAPSET(&m, p - installed->start);
     }
-  for (rid = 1; rid < solv->rpmrules_end ; rid++)
+  for (rid = 1; rid < solv->pkgrules_end ; rid++)
     {
       Id p, *dp;
       Rule *r = solv->rules + rid;
     {
       Id p, *dp;
       Rule *r = solv->rules + rid;
index 3be3ea1..83a2679 100644 (file)
@@ -48,16 +48,16 @@ typedef struct _Rule {
 
 typedef enum {
   SOLVER_RULE_UNKNOWN = 0,
 
 typedef enum {
   SOLVER_RULE_UNKNOWN = 0,
-  SOLVER_RULE_RPM = 0x100,
-  SOLVER_RULE_RPM_NOT_INSTALLABLE,
-  SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP,
-  SOLVER_RULE_RPM_PACKAGE_REQUIRES,
-  SOLVER_RULE_RPM_SELF_CONFLICT,
-  SOLVER_RULE_RPM_PACKAGE_CONFLICT,
-  SOLVER_RULE_RPM_SAME_NAME,
-  SOLVER_RULE_RPM_PACKAGE_OBSOLETES,
-  SOLVER_RULE_RPM_IMPLICIT_OBSOLETES,
-  SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES,
+  SOLVER_RULE_PKG = 0x100,
+  SOLVER_RULE_PKG_NOT_INSTALLABLE,
+  SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP,
+  SOLVER_RULE_PKG_REQUIRES,
+  SOLVER_RULE_PKG_SELF_CONFLICT,
+  SOLVER_RULE_PKG_CONFLICTS,
+  SOLVER_RULE_PKG_SAME_NAME,
+  SOLVER_RULE_PKG_OBSOLETES,
+  SOLVER_RULE_PKG_IMPLICIT_OBSOLETES,
+  SOLVER_RULE_PKG_INSTALLED_OBSOLETES,
   SOLVER_RULE_UPDATE = 0x200,
   SOLVER_RULE_FEATURE = 0x300,
   SOLVER_RULE_JOB = 0x400,
   SOLVER_RULE_UPDATE = 0x200,
   SOLVER_RULE_FEATURE = 0x300,
   SOLVER_RULE_JOB = 0x400,
@@ -104,11 +104,11 @@ extern void solver_unifyrules(struct _Solver *solv);
 extern int solver_rulecmp(struct _Solver *solv, Rule *r1, Rule *r2);
 extern void solver_shrinkrules(struct _Solver *solv, int nrules);
 
 extern int solver_rulecmp(struct _Solver *solv, Rule *r1, Rule *r2);
 extern void solver_shrinkrules(struct _Solver *solv, int nrules);
 
-/* rpm rules */
-extern void solver_addrpmrulesforsolvable(struct _Solver *solv, Solvable *s, Map *m);
-extern void solver_addrpmrulesforweak(struct _Solver *solv, Map *m);
-extern void solver_addrpmrulesforlinked(struct _Solver *solv, Map *m);
-extern void solver_addrpmrulesforupdaters(struct _Solver *solv, Solvable *s, Map *m, int allow_all);
+/* pkg rules */
+extern void solver_addpkgrulesforsolvable(struct _Solver *solv, Solvable *s, Map *m);
+extern void solver_addpkgrulesforweak(struct _Solver *solv, Map *m);
+extern void solver_addpkgrulesforlinked(struct _Solver *solv, Map *m);
+extern void solver_addpkgrulesforupdaters(struct _Solver *solv, Solvable *s, Map *m, int allow_all);
 
 /* update/feature rules */
 extern void solver_addupdaterule(struct _Solver *solv, Solvable *s, int allow_all);
 
 /* update/feature rules */
 extern void solver_addupdaterule(struct _Solver *solv, Solvable *s, int allow_all);
@@ -150,6 +150,19 @@ extern void solver_rule2rules(struct _Solver *solv, Id rid, Queue *q, int recurs
 extern void solver_breakorphans(struct _Solver *solv);
 extern void solver_check_brokenorphanrules(struct _Solver *solv, Queue *dq);
 
 extern void solver_breakorphans(struct _Solver *solv);
 extern void solver_check_brokenorphanrules(struct _Solver *solv, Queue *dq);
 
+
+/* legacy */
+#define SOLVER_RULE_RPM SOLVER_RULE_PKG
+#define SOLVER_RULE_RPM_NOT_INSTALLABLE SOLVER_RULE_PKG_NOT_INSTALLABLE
+#define SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP
+#define SOLVER_RULE_RPM_PACKAGE_REQUIRES SOLVER_RULE_PKG_REQUIRES
+#define SOLVER_RULE_RPM_SELF_CONFLICT SOLVER_RULE_PKG_SELF_CONFLICT
+#define SOLVER_RULE_RPM_PACKAGE_CONFLICT SOLVER_RULE_PKG_CONFLICTS
+#define SOLVER_RULE_RPM_SAME_NAME SOLVER_RULE_PKG_SAME_NAME
+#define SOLVER_RULE_RPM_PACKAGE_OBSOLETES SOLVER_RULE_PKG_OBSOLETES
+#define SOLVER_RULE_RPM_IMPLICIT_OBSOLETES SOLVER_RULE_PKG_IMPLICIT_OBSOLETES
+#define SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES SOLVER_RULE_PKG_INSTALLED_OBSOLETES
+
 #ifdef __cplusplus
 }
 #endif
 #ifdef __cplusplus
 }
 #endif
index 48b3aaa..14fe78d 100644 (file)
@@ -427,9 +427,9 @@ makeruledecisions(Solver *solv)
          assert(solv->decisionq_why.elements[i] > 0);
 
          /*
          assert(solv->decisionq_why.elements[i] > 0);
 
          /*
-          * conflict with an rpm rule ?
+          * conflict with a pkg rule ?
           */
           */
-         if (solv->decisionq_why.elements[i] < solv->rpmrules_end)
+         if (solv->decisionq_why.elements[i] < solv->pkgrules_end)
            {
              if (record_proof)
                {
            {
              if (record_proof)
                {
@@ -441,7 +441,7 @@ makeruledecisions(Solver *solv)
              else
                queue_push(&solv->problems, 0);
              assert(v > 0 || v == -SYSTEMSOLVABLE);
              else
                queue_push(&solv->problems, 0);
              assert(v > 0 || v == -SYSTEMSOLVABLE);
-             POOL_DEBUG(SOLV_DEBUG_UNSOLVABLE, "conflict with rpm rule, disabling rule #%d\n", ri);
+             POOL_DEBUG(SOLV_DEBUG_UNSOLVABLE, "conflict with pkg rule, disabling rule #%d\n", ri);
              if (ri >= solv->jobrules && ri < solv->jobrules_end)
                v = -(solv->ruletojob.elements[ri - solv->jobrules] + 1);
              else
              if (ri >= solv->jobrules && ri < solv->jobrules_end)
                v = -(solv->ruletojob.elements[ri - solv->jobrules] + 1);
              else
@@ -583,7 +583,7 @@ makewatches(Solver *solv)
                                       /* lower half for removals, upper half for installs */
   solv->watches = solv_calloc(2 * nsolvables, sizeof(Id));
 #if 1
                                       /* lower half for removals, upper half for installs */
   solv->watches = solv_calloc(2 * nsolvables, sizeof(Id));
 #if 1
-  /* do it reverse so rpm rules get triggered first (XXX: obsolete?) */
+  /* do it reverse so pkg rules get triggered first (XXX: obsolete?) */
   for (i = 1, r = solv->rules + solv->nrules - 1; i < solv->nrules; i++, r--)
 #else
   for (i = 1, r = solv->rules + 1; i < solv->nrules; i++, r++)
   for (i = 1, r = solv->rules + solv->nrules - 1; i < solv->nrules; i++, r--)
 #else
   for (i = 1, r = solv->rules + 1; i < solv->nrules; i++, r++)
@@ -1024,8 +1024,8 @@ analyze_unsolvable_rule(Solver *solv, Rule *r, Id *lastweakp, Map *rseen)
   if (MAPTST(&solv->weakrulemap, why))
     if (!*lastweakp || why > *lastweakp)
       *lastweakp = why;
   if (MAPTST(&solv->weakrulemap, why))
     if (!*lastweakp || why > *lastweakp)
       *lastweakp = why;
-  /* do not add rpm rules to problem */
-  if (why < solv->rpmrules_end)
+  /* do not add pkg rules to problem */
+  if (why < solv->pkgrules_end)
     return;
   /* turn rule into problem */
   if (why >= solv->jobrules && why < solv->jobrules_end)
     return;
   /* turn rule into problem */
   if (why >= solv->jobrules && why < solv->jobrules_end)
@@ -1063,7 +1063,7 @@ analyze_unsolvable_rule(Solver *solv, Rule *r, Id *lastweakp, Map *rseen)
  *
  * We know that the problem is not solvable. Record all involved
  * rules (i.e. the "proof") into solv->learnt_pool.
  *
  * We know that the problem is not solvable. Record all involved
  * rules (i.e. the "proof") into solv->learnt_pool.
- * Record the learnt pool index and all non-rpm rules into
+ * Record the learnt pool index and all non-pkg rules into
  * solv->problems. (Our solutions to fix the problems are to
  * disable those rules.)
  *
  * solv->problems. (Our solutions to fix the problems are to
  * disable those rules.)
  *
@@ -1390,7 +1390,7 @@ reorder_dq_for_jobrules(Solver *solv, int level, Queue *dq)
        continue;
       if (solv->decisionmap[p] == 0)
        {
        continue;
       if (solv->decisionmap[p] == 0)
        {
-         solv->decisionmap[p] = level;
+         solv->decisionmap[p] = level + 1;
          haveone = 1;
        }
     }
          haveone = 1;
        }
     }
@@ -1414,7 +1414,7 @@ reorder_dq_for_jobrules(Solver *solv, int level, Queue *dq)
       dq->elements[j++] = dq->elements[i];
   queue_truncate(dq, j);
   FOR_REPO_SOLVABLES(solv->installed, p, s)
       dq->elements[j++] = dq->elements[i];
   queue_truncate(dq, j);
   FOR_REPO_SOLVABLES(solv->installed, p, s)
-    if (solv->decisionmap[p] == level)
+    if (solv->decisionmap[p] == level + 1)
       solv->decisionmap[p] = 0;
 }
 
       solv->decisionmap[p] = 0;
 }
 
@@ -3093,7 +3093,7 @@ weaken_solvable_deps(Solver *solv, Id p)
   int i;
   Rule *r;
 
   int i;
   Rule *r;
 
-  for (i = 1, r = solv->rules + i; i < solv->rpmrules_end; i++, r++)
+  for (i = 1, r = solv->rules + i; i < solv->pkgrules_end; i++, r++)
     {
       if (r->p != -p)
        continue;
     {
       if (r->p != -p)
        continue;
@@ -3295,7 +3295,7 @@ addedmap2deduceq(Solver *solv, Map *addedmap)
   Rule *r;
 
   queue_empty(&solv->addedmap_deduceq);
   Rule *r;
 
   queue_empty(&solv->addedmap_deduceq);
-  for (i = 2, j = solv->rpmrules_end - 1; i < pool->nsolvables && j > 0; j--)
+  for (i = 2, j = solv->pkgrules_end - 1; i < pool->nsolvables && j > 0; j--)
     {
       r = solv->rules + j;
       if (r->p >= 0)
     {
       r = solv->rules + j;
       if (r->p >= 0)
@@ -3331,7 +3331,7 @@ deduceq2addedmap(Solver *solv, Map *addedmap)
   int j;
   Id p;
   Rule *r;
   int j;
   Id p;
   Rule *r;
-  for (j = solv->rpmrules_end - 1; j > 0; j--)
+  for (j = solv->pkgrules_end - 1; j > 0; j--)
     {
       r = solv->rules + j;
       if (r->d < 0 && r->p)
     {
       r = solv->rules + j;
       if (r->d < 0 && r->p)
@@ -3367,7 +3367,7 @@ solver_solve(Solver *solv, Queue *job)
   Repo *installed = solv->installed;
   int i;
   int oldnrules, initialnrules;
   Repo *installed = solv->installed;
   int i;
   int oldnrules, initialnrules;
-  Map addedmap;                       /* '1' == have rpm-rules for solvable */
+  Map addedmap;                       /* '1' == have pkg-rules for solvable */
   Map installcandidatemap;
   Id how, what, select, name, weak, p, pp, d;
   Queue q;
   Map installcandidatemap;
   Id how, what, select, name, weak, p, pp, d;
   Queue q;
@@ -3470,16 +3470,16 @@ solver_solve(Solver *solv, Queue *job)
   now = solv_timems(0);
   /*
    * create rules for all package that could be involved with the solving
   now = solv_timems(0);
   /*
    * create rules for all package that could be involved with the solving
-   * so called: rpm rules
+   * so called: pkg rules
    *
    */
    *
    */
-  initialnrules = solv->rpmrules_end ? solv->rpmrules_end : 1;
+  initialnrules = solv->pkgrules_end ? solv->pkgrules_end : 1;
   if (initialnrules > 1)
     deduceq2addedmap(solv, &addedmap);
   if (solv->nrules != initialnrules)
     solver_shrinkrules(solv, initialnrules);
   solv->nrules = initialnrules;
   if (initialnrules > 1)
     deduceq2addedmap(solv, &addedmap);
   if (solv->nrules != initialnrules)
     solver_shrinkrules(solv, initialnrules);
   solv->nrules = initialnrules;
-  solv->rpmrules_end = 0;
+  solv->pkgrules_end = 0;
 
   if (installed)
     {
 
   if (installed)
     {
@@ -3593,12 +3593,12 @@ solver_solve(Solver *solv, Queue *job)
 
       oldnrules = solv->nrules;
       FOR_REPO_SOLVABLES(installed, p, s)
 
       oldnrules = solv->nrules;
       FOR_REPO_SOLVABLES(installed, p, s)
-       solver_addrpmrulesforsolvable(solv, s, &addedmap);
-      POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules for installed solvables\n", solv->nrules - oldnrules);
+       solver_addpkgrulesforsolvable(solv, s, &addedmap);
+      POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules for installed solvables\n", solv->nrules - oldnrules);
       oldnrules = solv->nrules;
       FOR_REPO_SOLVABLES(installed, p, s)
       oldnrules = solv->nrules;
       FOR_REPO_SOLVABLES(installed, p, s)
-       solver_addrpmrulesforupdaters(solv, s, &addedmap, 1);
-      POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules for updaters of installed solvables\n", solv->nrules - oldnrules);
+       solver_addpkgrulesforupdaters(solv, s, &addedmap, 1);
+      POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules for updaters of installed solvables\n", solv->nrules - oldnrules);
     }
 
   /*
     }
 
   /*
@@ -3619,7 +3619,7 @@ solver_solve(Solver *solv, Queue *job)
          FOR_JOB_SELECT(p, pp, select, what)
            {
              MAPSET(&installcandidatemap, p);
          FOR_JOB_SELECT(p, pp, select, what)
            {
              MAPSET(&installcandidatemap, p);
-             solver_addrpmrulesforsolvable(solv, pool->solvables + p, &addedmap);
+             solver_addpkgrulesforsolvable(solv, pool->solvables + p, &addedmap);
            }
          break;
        case SOLVER_DISTUPGRADE:
            }
          break;
        case SOLVER_DISTUPGRADE:
@@ -3637,24 +3637,24 @@ solver_solve(Solver *solv, Queue *job)
          break;
        }
     }
          break;
        }
     }
-  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules for packages involved in a job\n", solv->nrules - oldnrules);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules for packages involved in a job\n", solv->nrules - oldnrules);
 
 
   /*
    * add rules for suggests, enhances
    */
   oldnrules = solv->nrules;
 
 
   /*
    * add rules for suggests, enhances
    */
   oldnrules = solv->nrules;
-  solver_addrpmrulesforweak(solv, &addedmap);
-  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules because of weak dependencies\n", solv->nrules - oldnrules);
+  solver_addpkgrulesforweak(solv, &addedmap);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules because of weak dependencies\n", solv->nrules - oldnrules);
 
 #ifdef ENABLE_LINKED_PKGS
   oldnrules = solv->nrules;
 
 #ifdef ENABLE_LINKED_PKGS
   oldnrules = solv->nrules;
-  solver_addrpmrulesforlinked(solv, &addedmap);
-  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules because of linked packages\n", solv->nrules - oldnrules);
+  solver_addpkgrulesforlinked(solv, &addedmap);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules because of linked packages\n", solv->nrules - oldnrules);
 #endif
 
   /*
 #endif
 
   /*
-   * first pass done, we now have all the rpm rules we need.
+   * first pass done, we now have all the pkg rules we need.
    * unify existing rules before going over all job rules and
    * policy rules.
    * at this point the system is always solvable,
    * unify existing rules before going over all job rules and
    * policy rules.
    * at this point the system is always solvable,
@@ -3675,14 +3675,14 @@ solver_solve(Solver *solv, Queue *job)
     }
 
   if (solv->nrules > initialnrules)
     }
 
   if (solv->nrules > initialnrules)
-    solver_unifyrules(solv);                   /* remove duplicate rpm rules */
-  solv->rpmrules_end = solv->nrules;           /* mark end of rpm rules */
+    solver_unifyrules(solv);                   /* remove duplicate pkg rules */
+  solv->pkgrules_end = solv->nrules;           /* mark end of pkg rules */
 
   if (solv->nrules > initialnrules)
     addedmap2deduceq(solv, &addedmap);         /* so that we can recreate the addedmap */
 
 
   if (solv->nrules > initialnrules)
     addedmap2deduceq(solv, &addedmap);         /* so that we can recreate the addedmap */
 
-  POOL_DEBUG(SOLV_DEBUG_STATS, "rpm rule memory used: %d K\n", solv->nrules * (int)sizeof(Rule) / 1024);
-  POOL_DEBUG(SOLV_DEBUG_STATS, "rpm rule creation took %d ms\n", solv_timems(now));
+  POOL_DEBUG(SOLV_DEBUG_STATS, "pkg rule memory used: %d K\n", solv->nrules * (int)sizeof(Rule) / 1024);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "pkg rule creation took %d ms\n", solv_timems(now));
 
   /* create dup maps if needed. We need the maps early to create our
    * update rules */
 
   /* create dup maps if needed. We need the maps early to create our
    * update rules */
@@ -3995,7 +3995,7 @@ solver_solve(Solver *solv, Queue *job)
   map_free(&installcandidatemap);
   queue_free(&q);
 
   map_free(&installcandidatemap);
   queue_free(&q);
 
-  POOL_DEBUG(SOLV_DEBUG_STATS, "%d rpm rules, 2 * %d update rules, %d job rules, %d infarch rules, %d dup rules, %d choice rules, %d best rules\n", solv->rpmrules_end - 1, solv->updaterules_end - solv->updaterules, solv->jobrules_end - solv->jobrules, solv->infarchrules_end - solv->infarchrules, solv->duprules_end - solv->duprules, solv->choicerules_end - solv->choicerules, solv->bestrules_end - solv->bestrules);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "%d pkg rules, 2 * %d update rules, %d job rules, %d infarch rules, %d dup rules, %d choice rules, %d best rules\n", solv->pkgrules_end - 1, solv->updaterules_end - solv->updaterules, solv->jobrules_end - solv->jobrules, solv->infarchrules_end - solv->infarchrules, solv->duprules_end - solv->duprules, solv->choicerules_end - solv->choicerules, solv->bestrules_end - solv->bestrules);
   POOL_DEBUG(SOLV_DEBUG_STATS, "overall rule memory used: %d K\n", solv->nrules * (int)sizeof(Rule) / 1024);
 
   /* create weak map */
   POOL_DEBUG(SOLV_DEBUG_STATS, "overall rule memory used: %d K\n", solv->nrules * (int)sizeof(Rule) / 1024);
 
   /* create weak map */
index 49ccec8..2a7f060 100644 (file)
@@ -39,7 +39,7 @@ struct _Solver {
   Repo *installed;                     /* copy of pool->installed */
 
   /* list of rules, ordered
   Repo *installed;                     /* copy of pool->installed */
 
   /* list of rules, ordered
-   * rpm rules first, then features, updates, jobs, learnt
+   * pkg rules first, then features, updates, jobs, learnt
    * see start/end offsets below
    */
   Rule *rules;                         /* all rules */
    * see start/end offsets below
    */
   Rule *rules;                         /* all rules */
@@ -49,7 +49,7 @@ struct _Solver {
 
   /* start/end offset for rule 'areas' */
 
 
   /* start/end offset for rule 'areas' */
 
-  Id rpmrules_end;                      /* [Offset] rpm rules end */
+  Id pkgrules_end;                      /* [Offset] dep rules end */
 
   Id featurerules;                     /* feature rules start/end */
   Id featurerules_end;
 
   Id featurerules;                     /* feature rules start/end */
   Id featurerules_end;
@@ -189,7 +189,7 @@ struct _Solver {
 
   Queue *installsuppdepq;              /* deps from the install namespace provides hack */
 
 
   Queue *installsuppdepq;              /* deps from the install namespace provides hack */
 
-  Queue addedmap_deduceq;              /* deduce addedmap from rpm rules */
+  Queue addedmap_deduceq;              /* deduce addedmap from pkg rules */
   Id *instbuddy;                       /* buddies of installed packages */
   int keep_orphans;                    /* how to treat orphans */
   int break_orphans;                   /* how to treat orphans */
   Id *instbuddy;                       /* buddies of installed packages */
   int keep_orphans;                    /* how to treat orphans */
   int break_orphans;                   /* how to treat orphans */