SET( CMAKE_MODULE_PATH ${LIBZYPP_SOURCE_DIR}/cmake/modules )
cmake_minimum_required(VERSION 2.6)
+OPTION (ENABLE_BUILD_DOCS "Build documentation by default?" OFF)
+OPTION (ENABLE_BUILD_TRANS "Build translation files by default?" OFF)
+OPTION (ENABLE_BUILD_TESTS "Build and run test suite by default?" OFF)
OPTION (DISABLE_LIBPROXY "Build without libproxy support even if package is installed?" OFF)
OPTION (DISABLE_AUTODOCS "Do not require doxygen being installed (required to build autodocs)?" OFF)
+#--------------------------------------------------------------------------------
+SET (have_system x)
+
+IF (DEBIAN)
+ MESSAGE (STATUS "Building for Debian")
+ SET (ENABLE_BUILD_DOCS ON)
+ SET (ENABLE_BUILD_TRANS ON)
+ SET (ENABLE_BUILD_TESTS ON)
+ SET (have_system ${have_system}x)
+ENDIF (DEBIAN)
+
+IF (${have_system} STREQUAL x)
+ MESSAGE (STATUS "Building for SUSE")
+ENDIF (${have_system} STREQUAL x)
+
+IF (${have_system} STRGREATER xx)
+ MESSAGE (FATAL_ERROR "Can only build for one system type.")
+ENDIF (${have_system} STRGREATER xx)
+#--------------------------------------------------------------------------------
+
# allow name libraries by name mixed with full
# paths
if(COMMAND cmake_policy)
####################################################################
ADD_SUBDIRECTORY( zypp )
-#ADD_SUBDIRECTORY( zypp2 )
# do not build devel by default
ADD_SUBDIRECTORY( devel EXCLUDE_FROM_ALL )
ADD_SUBDIRECTORY( tools )
ADD_SUBDIRECTORY( examples )
-ADD_SUBDIRECTORY( po EXCLUDE_FROM_ALL )
ADD_SUBDIRECTORY( doc )
ADD_SUBDIRECTORY( vendor )
-ADD_SUBDIRECTORY( tests EXCLUDE_FROM_ALL )
+IF ( ENABLE_BUILD_TRANS )
+ ADD_SUBDIRECTORY( po )
+ELSE ( ENABLE_BUILD_TRANS )
+ ADD_SUBDIRECTORY( po EXCLUDE_FROM_ALL )
+ENDIF ( ENABLE_BUILD_TRANS )
+
+IF ( ENABLE_BUILD_TESTS )
+ ADD_SUBDIRECTORY( tests )
+ELSE ( ENABLE_BUILD_TESTS )
+ ADD_SUBDIRECTORY( tests EXCLUDE_FROM_ALL )
+ENDIF ( ENABLE_BUILD_TESTS )
INCLUDE(CTest)
ENABLE_TESTING()
# See './mkChangelog -h' for help.
#
SET(LIBZYPP_MAJOR "14")
-SET(LIBZYPP_COMPATMINOR "29")
-SET(LIBZYPP_MINOR "29")
-SET(LIBZYPP_PATCH "4")
+SET(LIBZYPP_COMPATMINOR "30")
+SET(LIBZYPP_MINOR "30")
+SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 14.29.4 (29)
+# LAST RELEASED: 14.30.0 (30)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
ENDIF ( DEFINED LIB )
MESSAGE(STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}" )
+# Headers
+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}")
# system configuration dir (etc)
IF( NOT DEFINED SYSCONFDIR )
-ADD_SUBDIRECTORY( autodoc EXCLUDE_FROM_ALL)
+IF ( ENABLE_BUILD_DOCS )
+ ADD_SUBDIRECTORY( autodoc )
+ELSE ( ENABLE_BUILD_DOCS )
+ ADD_SUBDIRECTORY( autodoc EXCLUDE_FROM_ALL )
+ENDIF ( ENABLE_BUILD_DOCS )
-INSTALL(
- FILES locks.5
- DESTINATION ${MANDIR}/man5
+
+SET (libzypp_MAN1
+ zypp-CheckAccessDeleted.1 zypp-NameReqPrv.1)
+
+SET (libzypp_MAN5
+ locks.5)
+
+SET (libzypp_MAN
+ ${libzypp_MAN1} ${libzypp_MAN5})
+
+ADD_CUSTOM_TARGET( man ALL
+ DEPENDS ${libzypp_MAN}
)
+FOREACH (libzypp_MANIDX 1 2 3 4 5 6 7 8)
+ INSTALL (FILES
+ ${libzypp_MAN${libzypp_MANIDX}}
+ DESTINATION ${MANDIR}/man${libzypp_MANIDX}
+ )
+ENDFOREACH (libzypp_MANIDX)
+
+#
+# If a2x is installed, auto update manpage from asciidoc manpage.txt:
+#
+FIND_PROGRAM(A2X a2x)
+FOREACH (libzypp_MANTARGET ${libzypp_MAN})
+ IF (A2X)
+ ADD_CUSTOM_COMMAND (
+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${libzypp_MANTARGET}
+ COMMAND ${A2X} -f manpage ${libzypp_MANTARGET}.txt
+ DEPENDS ${libzypp_MANTARGET}.txt
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ )
+ ELSE (A2X)
+ ADD_CUSTOM_COMMAND (
+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${libzypp_MANTARGET}
+ DEPENDS ${libzypp_MANTARGET}.txt
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMENT "Forgott to fix manpage after changing ascidoc? Install a2x for automated creation or 'touch ${libzypp_MANTARGET}'"
+ )
+ ENDIF (A2X)
+ENDFOREACH (libzypp_MANTARGET)
+
+
DESTINATION ${DOC_INSTALL_DIR}/libzypp/libzypp.doxytag
)
-# We could use the thing below but it wont work with cmake older than 2.4.4
-FILE(GLOB docfiles ${CMAKE_CURRENT_BINARY_DIR}/html/*)
-INSTALL( FILES
- ${docfiles}
- DESTINATION ${DOC_INSTALL_DIR}/libzypp/html
+INSTALL( DIRECTORY
+ ${CMAKE_CURRENT_BINARY_DIR}/html
+ DESTINATION ${DOC_INSTALL_DIR}/libzypp
)
-
-#INSTALL( DIRECTORY
-# ${CMAKE_CURRENT_BINARY_DIR}/html
-# DESTINATION ${DOC_INSTALL_DIR}
-#)
### ##################################################
ENDIF ( DOXYGEN )
### ##################################################
+++ /dev/null
-
-Downloaders and MediaSet
-========================
-dmacvicar@suse.de
-.TH "locks" "5" "4.25.0" "libzypp" "System Tools"
+'\" t
+.\" Title: locks
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 10/02/2014
+.\" Manual: LIBZYPP
+.\" Source: libzypp
+.\" Language: English
+.\"
+.TH "LOCKS" "5" "10/02/2014" "libzypp" "LIBZYPP"
+.\" -----------------------------------------------------------------
+.\" * 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"
-.LP
-locks - libzypp locking file
-
+locks \- libzypp locking file
.SH "DESCRIPTION"
-.LP
-The file \fI/etc/zypp/locks\fR is read by libzypp at startup if
-\fIzypp.conf\fR allows it. The entries are used for initial locking of
-packages. Locking a package means not allowing to install or uninstall
-it. Valid entries are
-.TP
-\fI attribute\fR\fB:\fR \fIvalue\fR
-Where attributes and their values are described below.
-.br
-Locks are separated by empty lines.
-
+.sp
+The file \fI/etc/zypp/locks\fR is read by libzypp at start\-up if \fIzypp\&.conf\fR allows it\&. The entries are used for initial locking of packages\&. Locking a package means not allowing to install or uninstall it\&.
+.sp
+Valid entries are of the form:
+.PP
+\fIattribute\fR\fB:\fR \fIvalue\fR
+.RS 4
+Where attributes and their values are described below\&.
+.RE
+.sp
+Locks are separated by an empty lines\&.
.SH "ATTRIBUTES"
-.LP
-All attributes are lower-case.
-
-.TP
-.B repo
-specifies repository restriction. Only alias is accepted.
-.br
-By default all repositories match.
+.sp
+All attributes are lower\-case\&.
+.PP
+\fBrepo\fR
+.RS 4
+specifies repository restriction\&. Only alias is accepted\&.
-.TP
-.B type
-resolvable type restriction
-.br
-The values can be \fBpackage\fR, \fBpatch\fR, \fBpattern\fR, \fBproduct\fR and \fBsrcpackage\fR.
-.br
-By default all types match.
+By default all repositories match\&.
+.RE
+.PP
+\fBtype\fR
+.RS 4
+resolvable type restriction\&. The values can be
+\fBpackage\fR,
+\fBpatch\fR,
+\fBpattern\fR,
+\fBproduct\fR
+and
+\fBsrcpackage\fR\&.
-.TP
-.B case_sensitive
-if strings are matched case sensitive.
-The values are \fBtrue\fR, \fBfalse\fR, \fBon\fR, \fBoff\fR.
-.br
-The default is case insensitive.
+By default all types match\&.
+.RE
+.PP
+\fBcase_sensitive\fR
+.RS 4
+if strings are matched case sensitive\&. The values are
+\fBtrue\fR,
+\fBfalse\fR,
+\fBon\fR,
+\fBoff\fR\&.
-.TP
-.B install_status
-status of object. Possible states are \fBinstalled\fR,
-\fBnot-installed\fR and \fBall\fR. If more install statuses are
-specified then the last one is used.
-.br
-The values are \fBinstalled\fR for all packages which are installed, \fBnon-installed\fR for packages which can be installed or reinstalled and \fBall\fR for both.
-.br
-The default is \fBall\fR.
+The default is case insensitive\&.
+.RE
+.PP
+\fBinstall_status\fR
+.RS 4
+status of object\&. Possible states are
+\fBinstalled\fR,
+\fBnot\-installed\fR
+and
+\fBall\fR\&. If more install statuses are specified then the last one is used\&. The values are
+\fBinstalled\fR
+for all packages which are installed,
+\fBnon\-installed\fR
+for packages which can be installed or reinstalled and
+\fBall\fR
+for both\&.
-.TP
-.B match_type
-type of string matching in values. Does not affect \fBtype\fR and \fBrepo\fR which must be specified exactly.
-.br
-The values are \fBexact\fR, \fBsubstring\fR, \fBregex\fR for regular
-expressions, \fBglob\fR for matching as on the command line, and \fBword\fR.
-.br
-The default is \fBsubstring\fR.
+The default is
+\fBall\fR\&.
+.RE
+.PP
+\fBmatch_type\fR
+.RS 4
+type of string matching in values\&. Does not affect
+\fBtype\fR
+and
+\fBrepo\fR
+which must be specified exactly\&. The values are
+\fBexact\fR,
+\fBsubstring\fR,
+\fBregex\fR
+for regular expressions,
+\fBglob\fR
+for matching as on the command line, and
+\fBword\fR\&.
-.TP
-.B query_string
-String to be matched in multiple attributes. Should be restricted by
-another attribute with empty value ( it is recommended, because without restriction expect some performance problems ).
+The default is
+\fBsubstring\fR\&.
+.RE
+.PP
+\fBquery_string\fR
+.RS 4
+String to be matched in multiple attributes\&. Should be restricted by another attribute with empty value (it is recommended, because without restriction expect some performance problems)\&.
+.RE
+.PP
+\fBversion\fR
+.RS 4
+Restrict the lock only to some versions\&. It contains two parts: an optional operator and the version\&.
-.TP
-.B version
-Restrict the lock only to some versions. It contains two parts: an
-optional operator and the version.
-.br
-The operator is \fB==\fR,\fB!=\fR,\fB<\fR,\fB>\fR,\fB<=\fR,\fB>=\fR. If operator is not specified then \fB==\fR is used.
-.br
-The version has the format
-.RB [ epoch: ] version [ -release ].
-.br
-Example: version: < 0:0.11.4-2
+The operator is
+\fB==\fR,
+\fB!=\fR,
+\fB<\fR,
+\fB>\fR,
+\fB⇐\fR,
+\fB>=\fR\&. If operator is not specified then
+\fB==\fR
+is used\&.
-.TP
-.B solvable_name
-name of object (e.g. zypper)
+The version has the format [\fIepoch\fR\fB:\fR]\fIversion\fR[\fB\-\fR\fIrelease\fR]\&.
-.TP
-.B solvable_summary
+Example:
+\fBversion: < 0:0\&.11\&.4\-2\fR
+.RE
+.PP
+\fBsolvable_name\fR
+.RS 4
+name of object (e\&.g\&. zypper)
+.RE
+.PP
+\fBsolvable_summary\fR
+.RS 4
summary of object
-
-.TP
-.B solvable_arch
-architecture of object (e.g. x86_64, i586)
-
-.TP
-.B solvable_description
-description of object
-
-.TP
-.B solvable_eula
+.RE
+.PP
+\fBsolvable_arch\fR
+.RS 4
+architecture of object (e\&.g\&. x86_64, i586)
+.RE
+.PP
+\fBsolvable_description\fR
+.RS 4
+description of object
+.RE
+.PP
+\fBsolvable_eula\fR
+.RS 4
license text of objects which request accepting license by user
-
-.TP
-.B solvable_license
-license of package (only for package) (e.g. GPL2)
-
-.TP
-.B solvable_keywords
+.RE
+.PP
+\fBsolvable_license\fR
+.RS 4
+license of package (only for package) (e\&.g\&. GPL2)
+.RE
+.PP
+\fBsolvable_keywords\fR
+.RS 4
keywords which specify package (only for package)
-
-.TP
-.B solvable_authors
+.RE
+.PP
+\fBsolvable_authors\fR
+.RS 4
authors of package (only for package)
-
-.TP
-.B solvable_group
-package group (only for package) (e.g. Development/Tools/Version Control )
-
-.TP
-.B update_reference_type
-reference for update (e.g. bugzilla,cve) (only for patches)
-
+.RE
+.PP
+\fBsolvable_group\fR
+.RS 4
+package group (only for package) (e\&.g\&. Development/Tools/Version Control )
+.RE
+.PP
+\fBupdate_reference_type\fR
+.RS 4
+reference for update (e\&.g\&. bugzilla,cve) (only for patches)
+.RE
.SH "EXAMPLES"
-.LP
-
-.TP
-.B Exact Package
-This is the way YaST UI does it. Lock k3b (e.g. you don't want to update it).
-.br
------locks-----
-.br
+.PP
+\fBExact Package\fR
+.RS 4
+This is the way YaST UI does it\&. Lock k3b (e\&.g\&. you don\(cqt want to update it)\&.
+.RE
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\-\-\-\-\-locks\-\-\-\-\-
type: package
-.br
solvable_name: k3b
-.br
match_type: exact
-.br
case_sensitive: on
-
-.TP
-.B Package Wildcard
-This is the way "zypper addlock cross-*-gcc-icecream-backend" does it.
-.br
------locks-----
-.br
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+\fBPackage Wildcard\fR
+.RS 4
+This is the way "zypper addlock cross\-*\-gcc\-icecream\-backend" does it\&.
+.RE
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\-\-\-\-\-locks\-\-\-\-\-
type: package
-.br
-solvable_name: cross-*-gcc-icecream-backend
-.br
+solvable_name: cross\-*\-gcc\-icecream\-backend
match_type: glob
-.br
case_sensitive: on
-
-.TP
-.B Versioned Lock
-Do not install new GCC. This format is used when converting from the
-openSUSE-10.3 lock format.
-.br
------locks-----
-.br
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+\fBVersioned Lock\fR
+.RS 4
+Do not install new GCC\&. This format is used when converting from the openSUSE\-10\&.3 lock format\&.
+.RE
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\-\-\-\-\-locks\-\-\-\-\-
solvable_name: gcc
-.br
match_type: glob
-.br
-version: > 4.2
-
-.TP
-.B Anything named KDE
-Locks everything which contains kde in the name.
-.br
------locks-----
-.br
+version: > 4\&.2
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+\fBAnything named KDE\fR
+.RS 4
+Locks everything which contains kde in the name\&.
+.RE
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\-\-\-\-\-locks\-\-\-\-\-
solvable_name: kde
-
-.TP
-.B Anything mentioning KDE
-Locks everything which contains kde in the name, summary, or description.
-.br
------locks-----
-.br
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+\fBAnything mentioning KDE\fR
+.RS 4
+Locks everything which contains kde in the name, summary, or description\&.
+.RE
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\-\-\-\-\-locks\-\-\-\-\-
query_string: kde
-.br
solvable_name:
-.br
solvable_summary:
-.br
solvable_description:
-
+.fi
+.if n \{\
+.RE
+.\}
.SH "HOMEPAGE"
-
-This manual page only covers the most important attributes. The
-complete list is available at
-http://en.opensuse.org/Libzypp/Locksfile
-
+.sp
+This manual page only covers the most important attributes\&. The complete list is available at http://en\&.opensuse\&.org/Libzypp/Locksfile
.SH "AUTHORS"
-.LP
-Josef Reidinger <jreidinger@suse.cz>
-.br
-Manual page contributions by Martin Vidner <mvidner@suse.cz>.
-
+.sp
+Josef Reidinger <jreidinger@suse\&.cz> Manual page contributions by Martin Vidner <mvidner@suse\&.cz>\&.
.SH "SEE ALSO"
-.LP
+.sp
zypper(8)
--- /dev/null
+locks(5)
+========
+:man manual: LIBZYPP
+:man source: libzypp
+
+
+NAME
+----
+locks - libzypp locking file
+
+
+DESCRIPTION
+-----------
+The file '/etc/zypp/locks' is read by libzypp at start-up if 'zypp.conf' allows it. The entries are used for initial locking of packages. Locking a package means not allowing to install or uninstall it.
+
+Valid entries are of the form:
+
+'attribute'*:* 'value'::
+ Where attributes and their values are described below.
+
+Locks are separated by an empty lines.
+
+
+ATTRIBUTES
+----------
+All attributes are lower-case.
+
+*repo*::
+ specifies repository restriction. Only alias is accepted. +
+ By default all repositories match.
+
+*type*::
+ resolvable type restriction. The values can be *package*, *patch*, *pattern*, *product* and *srcpackage*. +
+ By default all types match.
+
+
+*case_sensitive*::
+ if strings are matched case sensitive. The values are *true*, *false*, *on*, *off*. +
+ The default is case insensitive.
+
+
+*install_status*::
+ status of object. Possible states are *installed*, *not-installed* and *all*. If more install statuses are specified then the last one is used. The values are *installed* for all packages which are installed, *non-installed* for packages which can be installed or reinstalled and *all* for both. +
+ The default is *all*.
+
+
+*match_type*::
+ type of string matching in values. Does not affect *type* and *repo* which must be specified exactly. The values are *exact*, *substring*, *regex* for regular expressions, *glob* for matching as on the command line, and *word*. +
+ The default is *substring*.
+
+*query_string*::
+ String to be matched in multiple attributes. Should be restricted by another attribute with empty value (it is recommended, because without restriction expect some performance problems).
+
+*version*::
+ Restrict the lock only to some versions. It contains two parts: an optional operator and the version. +
+ The operator is *==*, *!=*, *<*, *>*, *<=*, *>=*. If operator is not specified then *==* is used. +
+ The version has the format ['epoch'*:*+]+'version'[*-*'release']. +
+ Example: *version: < 0:0.11.4-2*
+
+*solvable_name*::
+ name of object (e.g. zypper)
+
+*solvable_summary*::
+ summary of object
+
+*solvable_arch*::
+ architecture of object (e.g. x86_64, i586)
+
+*solvable_description*::
+ description of object
+
+*solvable_eula*::
+ license text of objects which request accepting license by user
+
+*solvable_license*::
+ license of package (only for package) (e.g. GPL2)
+
+*solvable_keywords*::
+ keywords which specify package (only for package)
+
+*solvable_authors*::
+ authors of package (only for package)
+
+*solvable_group*::
+ package group (only for package) (e.g. Development/Tools/Version Control )
+
+*update_reference_type*::
+ reference for update (e.g. bugzilla,cve) (only for patches)
+
+
+EXAMPLES
+--------
+*Exact Package*::
+ This is the way YaST UI does it. Lock k3b (e.g. you don't want to update it).
+--------------------
+-----locks-----
+type: package
+solvable_name: k3b
+match_type: exact
+case_sensitive: on
+--------------------
+
+*Package Wildcard*::
+ This is the way "zypper addlock cross-*-gcc-icecream-backend" does it.
+--------------------
+-----locks-----
+type: package
+solvable_name: cross-*-gcc-icecream-backend
+match_type: glob
+case_sensitive: on
+--------------------
+
+*Versioned Lock*::
+ Do not install new GCC. This format is used when converting from the openSUSE-10.3 lock format.
+--------------------
+-----locks-----
+solvable_name: gcc
+match_type: glob
+version: > 4.2
+--------------------
+
+*Anything named KDE*::
+ Locks everything which contains kde in the name.
+--------------------
+-----locks-----
+solvable_name: kde
+--------------------
+
+*Anything mentioning KDE*::
+ Locks everything which contains kde in the name, summary, or description.
+--------------------
+-----locks-----
+query_string: kde
+solvable_name:
+solvable_summary:
+solvable_description:
+--------------------
+
+
+HOMEPAGE
+--------
+This manual page only covers the most important attributes. The complete list is available at http://en.opensuse.org/Libzypp/Locksfile
+
+
+AUTHORS
+-------
+Josef Reidinger <jreidinger@suse.cz>
+Manual page contributions by Martin Vidner <mvidner@suse.cz>.
+
+
+SEE ALSO
+--------
+zypper(8)
+++ /dev/null
-digraph solver_states {
-
- size="8,5";
-
- graph [fontsize=14];
- edge [fontsize=12];
- node [fontsize=12];
- node [shape=doublecircle]; Installed Uninstalled;
- node [shape=circle]; Satisfied Incomplete;
- node [shape=box];
-// ranksep = 1.5;
-// rankdir = LR;
-// nodesep = 0.5;
- edge [style="setlinewidth(1)"];
-
- Installed [label="Installed"];
- Uninstalled [label="Uninstalled"];
- Satisfied [label="Satisfied"];
- Incomplete [label="Incomplete"];
-
- Uninstalled -> To_be_installed [ label ="install,explicit"];
- Uninstalled -> To_be_installed [ label ="install,implicit"];
- Installed -> To_be_removed [ label ="remove,explicit"];
- Installed -> To_be_removed [ label ="remove,implicit"];
- To_be_installed -> Installed [ label ="commit"];
- To_be_removed -> Uninstalled [ label ="commit"];
-
- Uninstalled -> Satisfied [ label="establish,good" ];
- Uninstalled -> Incomplete [ label="establish,bad" ];
-
- Installed -> Incomplete [ label="establish,bad" ];
-
- Incomplete -> To_be_installed [ label="resolve" ];
- Incomplete -> To_be_removed [ label="remove" ];
-
- Satisfied -> Installed [ label="install" ];
-}
--- /dev/null
+'\" t
+.\" Title: zypp-CheckAccessDeleted
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 10/02/2014
+.\" Manual: LIBZYPP
+.\" Source: libzypp
+.\" Language: English
+.\"
+.TH "ZYPP\-CHECKACCESSDEL" "1" "10/02/2014" "libzypp" "LIBZYPP"
+.\" -----------------------------------------------------------------
+.\" * 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"
+zypp-CheckAccessDeleted \- List processes which access deleted files
+.SH "SYNOPSIS"
+.sp
+\fBzypp\-CheckAccessDeleted\fR [\fIOPTION\fR]\&...
+.SH "DESCRIPTION"
+.sp
+List running processes which access deleted files\&. This may help to identify services and processes which need to be restarted after an update, e\&.g\&. if they still refer to meanwhile deleted libraries\&. The output is similar to \(oq\fBzypper ps\fR\(cq but does not sort out processes accessing normal files only\&.
+.SH "OPTIONS"
+.PP
+\fB\-\-help\fR
+.RS 4
+display help and exit
+.RE
+.SH "AUTHORS"
+.sp
+Michael Andres <ma@suse\&.de>
+.SH "SEE ALSO"
+.sp
+zypper(8)
--- /dev/null
+zypp-CheckAccessDeleted(1)
+==========================
+:man manual: LIBZYPP
+:man source: libzypp
+
+
+NAME
+----
+zypp-CheckAccessDeleted - List processes which access deleted files
+
+
+SYNOPSIS
+--------
+*zypp-CheckAccessDeleted* [_OPTION_]...
+
+
+DESCRIPTION
+-----------
+List running processes which access deleted files. This may help to identify services and processes which need to be restarted after an update, e.g. if they still refer to meanwhile deleted libraries. The output is similar to `*zypper ps*' but does not sort out processes accessing normal files only.
+
+
+OPTIONS
+-------
+*--help*::
+ display help and exit
+
+
+AUTHORS
+-------
+Michael Andres <ma@suse.de>
+
+
+SEE ALSO
+--------
+zypper(8)
--- /dev/null
+'\" t
+.\" Title: zypp-NameReqPrv
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 10/02/2014
+.\" Manual: LIBZYPP
+.\" Source: libzypp
+.\" Language: English
+.\"
+.TH "ZYPP\-NAMEREQPRV" "1" "10/02/2014" "libzypp" "LIBZYPP"
+.\" -----------------------------------------------------------------
+.\" * 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"
+zypp-NameReqPrv \- Investigate packages and dependencies in solver test\-cases
+.SH "SYNOPSIS"
+.sp
+\fBzypp\-NameReqPrv\fR [\fB\-\-root\fR \fIDIR\fR] [[\fIOPTIONS\fR] \fINAME\fR\&...]\&...
+.SH "DESCRIPTION"
+.sp
+Load all enabled repositories (without refresh) and search for occurrences of regular expression \fINAME\fR in package names or dependencies\&. In case \fIDIR\fR denotes a directory containing a solver test\-case, repositories and settings provided by the test\-case are loaded instead\&.
+.sp
+A solver test\-case is an abstract of repositories, packages, hardware and dependency resolution related settings which can be created by using zyppers \fB\-\-debug\-solver\fR option\&. Attached to a bug report the test\-case helps investigating the reported behavior\&. Options and output of this command are tailored to this use\-case and may change as needed\&.
+.sp
+Reported matches show the packages \fIinternal id\fR, \fIname\fR, \fIversion\fR and \fIarchitecture\fR, \fIpriority\fR and name of the providing \fIrepository\fR, \fIvendor\fR, \fIbuildtime\fR and the locations matching \fINAME\fR\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+2431 zypper\-1\&.9\&.16\-22\&.2\&.x86_64 (99)@System openSUSE 1400499579
+ nam: zypper
+40947 zypper\-1\&.9\&.3\-1\&.1\&.x86_64 (99)repo\-oss (13\&.1) openSUSE 1383049437
+ nam: zypper
+56140 zypper\-1\&.9\&.16\-22\&.2\&.x86_64 (99)repo\-oss\-update (13\&.1) openSUSE 1400499579
+ nam: zypper
+.fi
+.if n \{\
+.RE
+.\}
+.SH "OPTIONS"
+.PP
+\fB\-\-root\fR \fIDIR\fR
+.RS 4
+Load repos from the system located below
+\fIDIR\fR\&. If
+\fIDIR\fR
+denotes a solver test\-case, the test\-case is loaded\&.
+.RE
+.PP
+\fB\-\-installed\fR
+.RS 4
+Process installed packages only\&.
+.RE
+.PP
+\fB\-i\fR/\fB\-I\fR
+.RS 4
+Turn on/off case insensitive search (default on)
+.RE
+.PP
+\fB\-n\fR/\fB\-N\fR
+.RS 4
+Turn on/off looking for names (default on)
+.RE
+.PP
+\fB\-p\fR/\fB\-P\fR
+.RS 4
+Turn on/off looking for provides (default off)
+.RE
+.PP
+\fB\-r\fR/\fB\-R\fR
+.RS 4
+Turn on/off looking for requires (default off)
+.RE
+.PP
+\fB\-c\fR/\fB\-C\fR
+.RS 4
+Turn on/off looking for conflicts (default off)
+.RE
+.PP
+\fB\-o\fR/\fB\-O\fR
+.RS 4
+Turn on/off looking for obsoletes (default off)
+.RE
+.PP
+\fB\-m\fR/\fB\-M\fR
+.RS 4
+Turn on/off looking for recommends (default off)
+.RE
+.PP
+\fB\-s\fR/\fB\-S\fR
+.RS 4
+Turn on/off looking for supplements (default off)
+.RE
+.PP
+\fB\-a\fR
+.RS 4
+Short for
+\fB\-n \-p \-r\fR
+.RE
+.PP
+\fB\-A\fR
+.RS 4
+Short for
+\fB\-n \-P \-R\fR
+.RE
+.PP
+\fB\-D\fR \fIPKG\fR
+.RS 4
+Dump dependencies of package
+\fIPKG\fR
+(exact name)\&.
+.RE
+.SH "AUTHORS"
+.sp
+Michael Andres <ma@suse\&.de>
+.SH "SEE ALSO"
+.sp
+zypper(8)
--- /dev/null
+zypp-NameReqPrv(1)
+==================
+:man manual: LIBZYPP
+:man source: libzypp
+
+
+NAME
+----
+zypp-NameReqPrv - Investigate packages and dependencies in solver test-cases
+
+
+SYNOPSIS
+--------
+*zypp-NameReqPrv* [*--root* 'DIR'] [['OPTIONS'] 'NAME'...]...
+
+
+DESCRIPTION
+-----------
+Load all enabled repositories (without refresh) and search for occurrences of regular expression 'NAME' in package names or dependencies. In case 'DIR' denotes a directory containing a solver test-case, repositories and settings provided by the test-case are loaded instead.
+
+A solver test-case is an abstract of repositories, packages, hardware and dependency resolution related settings which can be created by using zyppers *--debug-solver* option. Attached to a bug report the test-case helps investigating the reported behavior. Options and output of this command are tailored to this use-case and may change as needed.
+
+Reported matches show the packages 'internal id', 'name', 'version' and 'architecture', 'priority' and name of the providing 'repository', 'vendor', 'buildtime' and the locations matching 'NAME'.
+
+--------------------
+2431 zypper-1.9.16-22.2.x86_64 (99)@System openSUSE 1400499579
+ nam: zypper
+40947 zypper-1.9.3-1.1.x86_64 (99)repo-oss (13.1) openSUSE 1383049437
+ nam: zypper
+56140 zypper-1.9.16-22.2.x86_64 (99)repo-oss-update (13.1) openSUSE 1400499579
+ nam: zypper
+--------------------
+
+
+OPTIONS
+-------
+*--root* 'DIR'::
+ Load repos from the system located below 'DIR'. If 'DIR' denotes a solver test-case, the test-case is loaded.
+*--installed*::
+ Process installed packages only.
+*-i*/*-I*::
+ Turn on/off case insensitive search (default on)
+*-n*/*-N*::
+ Turn on/off looking for names (default on)
+*-p*/*-P*::
+ Turn on/off looking for provides (default off)
+*-r*/*-R*::
+ Turn on/off looking for requires (default off)
+*-c*/*-C*::
+ Turn on/off looking for conflicts (default off)
+*-o*/*-O*::
+ Turn on/off looking for obsoletes (default off)
+*-m*/*-M*::
+ Turn on/off looking for recommends (default off)
+*-s*/*-S*::
+ Turn on/off looking for supplements (default off)
+*-a*::
+ Short for *-n -p -r*
+*-A*::
+ Short for *-n -P -R*
+*-D* 'PKG'::
+ Dump dependencies of package 'PKG' (exact name).
+
+
+AUTHORS
+-------
+Michael Andres <ma@suse.de>
+
+
+SEE ALSO
+--------
+zypper(8)
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@LIB_INSTALL_DIR@/zypp
libdir=@LIB_INSTALL_DIR@
-includedir=@CMAKE_INSTALL_PREFIX@/include
+includedir=@INCLUDE_INSTALL_DIR@
Name: @PACKAGE@
Version: @VERSION@
%{_datadir}/zypp
%{_bindir}/*
%{_libdir}/libzypp*so.*
-%doc %{_mandir}/man5/locks.5.*
+%doc %{_mandir}/man1/*.1.*
+%doc %{_mandir}/man5/*.5.*
%files devel
%defattr(-,root,root)
-------------------------------------------------------------------
+Wed Oct 15 15:07:09 CEST 2014 - ma@suse.de
+
+- Store baseurls in list as order expresses preference
+- Support parsing multiple baseurls from a repo file (bnc#899510)
+- Fix handling local mirrorlist= files in .repo (bnc#899510)
+- Provide missing man pages (fixes #33)
+- Enable building autodocs, translations and test per default on debian
+- Fix several typos in output messages and comments (fixes #29)
+- Make the include dir path configurable (fixes #27)
+- version 14.30.0 (30)
+
+-------------------------------------------------------------------
+Fri Oct 10 16:01:31 CEST 2014 - ma@suse.de
+
+- Update zypp-po.tar.bz2 (bnc#899603)
+
+-------------------------------------------------------------------
+Thu Oct 9 01:13:15 CEST 2014 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
+Sun Oct 5 01:14:42 CEST 2014 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
+Sun Sep 28 01:13:30 CEST 2014 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
Thu Sep 25 17:59:06 CEST 2014 - ma@suse.de
- Trigger appdata plugin when system repos have changed (bnc#866257)
ADD_SUBDIRECTORY( sat )
ADD_CUSTOM_TARGET( ctest
- COMMAND ctest -a
+ COMMAND ctest -VV -a
)
WebServer.cc
)
-TARGET_LINK_LIBRARIES(zypp_test_utils mongoose zypp boost_thread-mt)
+TARGET_LINK_LIBRARIES(zypp_test_utils mongoose zypp boost_thread)
// it should throw because unsigned file throws
BOOST_CHECK_THROW( fetcher.start( dest.path(), media ), FileCheckException);
fetcher.reset();
- // the target file was NOT transfered
+ // the target file was NOT transferred
BOOST_CHECK( ! PathInfo(dest.path() + "/images/images.xml").isExist() );
fetcher.reset();
}
BOOST_CHECK( ! PathInfo(dest.path() + "/complexdir-broken/subdir2/subdir2-file1.txt").isExist() );
- // this one got transfered before the failure, so it is there
+ // this one got transferred before the failure, so it is there
BOOST_CHECK( PathInfo(dest.path() + "/complexdir-broken/subdir1/subdir1-file1.txt").isExist() );
BOOST_CHECK( ! PathInfo(dest.path() + "/complexdir-broken/subdir1/subdir1-file2.txt").isExist() );
virtual void trustedKeyAdded( const zypp::PublicKey &key )
{
- MIL << "TEST: trusted key added to zypp Keyring. Syncronizing keys with fake rpm keyring" << std::endl;
+ MIL << "TEST: trusted key added to zypp Keyring. Synchronizing keys with fake rpm keyring" << std::endl;
_trusted_key_added_called = true;
- //std::cout << "trusted key added to zypp Keyring. Syncronizing keys with rpm keyring" << std::endl;
+ //std::cout << "trusted key added to zypp Keyring. Synchronizing keys with rpm keyring" << std::endl;
//_rpmdb.importZyppKeyRingTrustedKeys();
//_rpmdb.exportTrustedKeysInZyppKeyRing();
}
BOOST_CHECK_EQUAL( one, url.asString() );
BOOST_CHECK_EQUAL( two, url.asCompleteString() );
+ // absolute path defaults to 'file://'
+ str = "/some/local/path";
+ BOOST_CHECK_EQUAL( zypp::Url(str).asString(), "file://"+str );
+
str = "file:./srv/ftp";
BOOST_CHECK_EQUAL( zypp::Url(str).asString(), str );
}
cerr << "Usage: " << appname << " [--root ROOTDIR] [OPTIONS] NAME... [[OPTIONS] NAME...]..." << endl;
cerr << " Load all enabled repositories (no refresh) and search for" << endl;
- cerr << " occurrences of NAME (regex) in package names, provides or" << endl;
- cerr << " requires." << endl;
+ cerr << " occurrences of NAME (regex) in package names or dependencies" << endl;
cerr << " --root Load repos from the system located below ROOTDIR. If ROOTDIR" << endl;
cerr << " denotes a sover testcase, the testcase is loaded." << endl;
cerr << " --installed Process installed packages only." << endl;
ZYpp.h
)
-INSTALL( FILES ${zypp_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/zypp" )
+INSTALL( FILES ${zypp_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/zypp" )
SET( zypp_base_SRCS
base/InterProcessMutex.cc
INSTALL( FILES
${zypp_base_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/base
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/base
)
SET( zypp_media_SRCS
INSTALL( FILES
${zypp_media_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/media
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/media
)
IF ( LIBPROXY_FOUND )
INSTALL( FILES
${zypp_media_proxyinfo_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/media/proxyinfo
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/media/proxyinfo
)
SET( zypp_parser_SRCS
INSTALL( FILES
${zypp_parser_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser
)
SET( zypp_parser_susetags_SRCS
INSTALL( FILES
${zypp_parser_susetags_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/susetags
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/susetags
)
SET( zypp_parser_xml_SRCS
INSTALL( FILES
${zypp_parser_xml_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/xml
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/xml
)
SET( zypp_parser_yum_SRCS
INSTALL( FILES
${zypp_parser_yum_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/yum
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/yum
)
SET( zypp_parser_ws_SRCS
INSTALL( FILES
${zypp_parser_ws_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/ws
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/ws
)
INSTALL( FILES
${zypp_pool_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/pool
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/pool
)
SET( zypp_solver_detail_SRCS
INSTALL( FILES
${zypp_solver_detail_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/solver/detail
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/solver/detail
)
SET( zypp_sat_SRCS
INSTALL( FILES
${zypp_sat_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/sat
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/sat
)
SET( zypp_sat_detail_SRCS
INSTALL( FILES
${zypp_sat_detail_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/sat/detail
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/sat/detail
)
INSTALL( FILES
${zypp_target_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/target
)
IF(NOT UDEV_FOUND)
INSTALL( FILES
${zypp_target_modalias_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target/modalias
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/target/modalias
)
SET( zypp_target_rpm_SRCS
INSTALL( FILES
${zypp_target_rpm_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target/rpm
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/target/rpm
)
SET( zypp_thread_SRCS
INSTALL( FILES
${zypp_thread_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/thread
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/thread
)
SET( zypp_ui_SRCS
INSTALL( FILES
${zypp_ui_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/ui
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/ui
)
SET( zypp_url_SRCS
INSTALL( FILES
${zypp_url_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/url
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/url
)
SET( zypp_zypp_detail_SRCS
INSTALL( FILES
${zypp_zypp_detail_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/zypp_detail
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/zypp_detail
)
SET( zypp_repo_SRCS
INSTALL( FILES
${zypp_repo_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/repo
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/repo
)
SET( zypp_repo_yum_SRCS
INSTALL( FILES
${zypp_misc_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/misc
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/misc
)
####################################################################
#include <iosfwd>
#include <string>
+#include <stdexcept>
///////////////////////////////////////////////////////////////////
namespace zypp
if ( resource.optional() )
{
ZYPP_CAUGHT(excpt_r);
- WAR << "optional resource " << resource << " could not be transfered" << endl;
+ WAR << "optional resource " << resource << " could not be transferred" << endl;
return;
}
else
provideToDest(media, (*it_res)->location, dest_dir, (*it_res)->deltafile);
- // if the file was not transfered, and no exception, just
+ // if the file was not transferred, and no exception, just
// return, as it was an optional file
if ( ! PathInfo(dest_dir + (*it_res)->location.filename()).isExist() )
return;
* checksums ) that will be retrieved and read
* before the job processing starts.
*
- * Nothing will be transfered or checked
+ * Nothing will be transferred or checked
* until \ref start() is called.
*
* The index is relative to the media path, and
/**
* Enqueue a object for transferal, they will not
- * be transfered until \ref start() is called
+ * be transferred until \ref start() is called
*
*/
void enqueue( const OnMediaLocation &resource,
/**
* Enqueue a object for transferal, they will not
- * be transfered until \ref start() is called
+ * be transferred until \ref start() is called
*
* \note As \ref OnMediaLocation contains the digest information,
* a \ref ChecksumFileChecker is automatically added to the
* in each subdirectory.
*
* \note Every file CHECKSUMS.* except of CHECKSUMS.(asc|key|(void)) will
- * not be transfered and will be ignored.
+ * not be transferred and will be ignored.
*
*/
void enqueueDir( const OnMediaLocation &resource,
* in each subdirectory.
*
* \note Every file CHECKSUMS.* except of CHECKSUMS.(asc|key|(void)) will
- * not be transfered and will be ignored.
+ * not be transferred and will be ignored.
*
*/
void enqueueDigestedDir( const OnMediaLocation &resource,
Url &setmirrorListUrl()
{ return mirrorlist_url; }
- const std::set<Url> &baseUrls() const
+ const url_set & baseUrls() const
{
- if ( _baseUrls.empty() && ! (getmirrorListUrl().asString().empty()) )
+ if ( _baseUrls.empty() && ! getmirrorListUrl().asString().empty() )
{
emptybaseurls = true;
- repo::RepoMirrorList *rmirrorlist = NULL;
-
DBG << "MetadataPath: " << metadatapath << endl;
- if( metadatapath.empty() )
- rmirrorlist = new repo::RepoMirrorList (getmirrorListUrl() );
- else
- rmirrorlist = new repo::RepoMirrorList (getmirrorListUrl(), metadatapath );
-
- std::vector<Url> rmurls = rmirrorlist->getUrls();
- delete rmirrorlist;
- rmirrorlist = NULL;
- _baseUrls.insert(rmurls.begin(), rmurls.end());
+ const std::vector<Url> & rmurls( ( metadatapath.empty()
+ ? repo::RepoMirrorList( getmirrorListUrl() )
+ : repo::RepoMirrorList( getmirrorListUrl(), metadatapath ) ).getUrls() );
+ _baseUrls.insert( _baseUrls.end(), rmurls.begin(), rmurls.end() );
}
return _baseUrls;
}
- std::set<Url> &baseUrls()
+ url_set & baseUrls()
{ return _baseUrls; }
bool baseurl2dump() const
private:
Url mirrorlist_url;
- mutable std::set<Url> _baseUrls;
+ mutable url_set _baseUrls;
mutable std::set<std::string> _keywords;
friend Impl * rwcowClone<Impl>( const Impl * rhs );
void RepoInfo::setGpgCheck( bool check )
{ _pimpl->gpgcheck = check; }
- void RepoInfo::setMirrorListUrl( const Url &url )
- { _pimpl->setmirrorListUrl() = url; }
+ void RepoInfo::setMirrorListUrl( const Url & url_r )
+ { _pimpl->setmirrorListUrl() = url_r; }
- void RepoInfo::setGpgKeyUrl( const Url &url )
- { _pimpl->gpgkey_url = url; }
+ void RepoInfo::setGpgKeyUrl( const Url & url_r )
+ { _pimpl->gpgkey_url = url_r; }
- void RepoInfo::addBaseUrl( const Url &url )
- { _pimpl->baseUrls().insert(url); }
+ void RepoInfo::addBaseUrl( const Url & url_r )
+ {
+ for ( const auto & url : _pimpl->baseUrls() ) // unique!
+ if ( url == url_r )
+ return;
+ _pimpl->baseUrls().push_back( url_r );
+ }
- void RepoInfo::setBaseUrl( const Url &url )
+ void RepoInfo::setBaseUrl( const Url & url_r )
{
_pimpl->baseUrls().clear();
- addBaseUrl(url);
+ _pimpl->baseUrls().push_back( url_r );
}
void RepoInfo::setPath( const Pathname &path )
Url RepoInfo::gpgKeyUrl() const
{ return _pimpl->gpgkey_url; }
- std::set<Url> RepoInfo::baseUrls() const
- {
- RepoInfo::url_set replaced_urls;
- for ( url_set::const_iterator it = _pimpl->baseUrls().begin();
- it != _pimpl->baseUrls().end();
- ++it )
- {
- replaced_urls.insert(_pimpl->replacer(*it));
- }
- return replaced_urls;
- }
+ RepoInfo::url_set RepoInfo::baseUrls() const
+ { return url_set( baseUrlsBegin(), baseUrlsEnd() ); } // Variables replaced!
Pathname RepoInfo::path() const
{ return _pimpl->path; }
{
return make_transform_iterator( _pimpl->baseUrls().begin(),
_pimpl->replacer );
- //return _pimpl->baseUrls.begin();
}
RepoInfo::urls_const_iterator RepoInfo::baseUrlsEnd() const
{
- //return _pimpl->baseUrls.end();
return make_transform_iterator( _pimpl->baseUrls().end(),
_pimpl->replacer );
}
bool RepoInfo::hasLicense() const
{
Pathname licenseTgz( _pimpl->licenseTgz() );
- SEC << licenseTgz << endl;
- SEC << PathInfo(licenseTgz) << endl;
-
return ! licenseTgz.empty() && PathInfo(licenseTgz).isFile();
}
RepoInfoBase::dumpOn(str);
if ( _pimpl->baseurl2dump() )
{
- for ( urls_const_iterator it = baseUrlsBegin();
- it != baseUrlsEnd();
- ++it )
+ for ( const auto & url : _pimpl->baseUrls() )
{
- str << "- url : " << *it << std::endl;
+ str << "- url : " << url << std::endl;
}
}
if ( _pimpl->baseurl2dump() )
{
str << "baseurl=";
- for ( url_set::const_iterator it = _pimpl->baseUrls().begin();
- it != _pimpl->baseUrls().end();
- ++it )
+ std::string indent;
+ for ( const auto & url : _pimpl->baseUrls() )
{
- str << *it << endl;
+ str << indent << url << endl;
+ if ( indent.empty() ) indent = " "; // "baseurl="
}
}
if ( _pimpl->baseurl2dump() )
{
- for (RepoInfo::urls_const_iterator urlit = baseUrlsBegin();
- urlit != baseUrlsEnd(); ++urlit)
- str << "<url>" << escape(urlit->asString()) << "</url>" << endl;
+ for ( const auto & url : _pimpl->baseUrls() )
+ str << "<url>" << escape(url.asString()) << "</url>" << endl;
}
str << "</repo>" << endl;
* name=Ruby repository (openSUSE_10.2)
* type=rpm-md
* baseurl=http://software.opensuse.org/download/ruby/openSUSE_10.2/
+ * http://some.opensuse.mirror/ruby/openSUSE_10.2/
* gpgcheck=1
* gpgkey=http://software.opensuse.org/openSUSE-Build-Service.asc
* enabled=1
*/
void setPriority( unsigned newval_r );
- typedef std::set<Url> url_set;
+ typedef std::list<Url> url_set;
typedef url_set::size_type urls_size_type;
typedef transform_iterator<repo::RepoVariablesUrlReplacer, url_set::const_iterator> urls_const_iterator;
/**
* This can't be empty in order the repository to be valid
* unless the download of the mirror list succeeds and it
* contains a valid url.
- *
- * \deprecated IMO superfluous as we provide begin/end iterator.
*/
- std::set<Url> baseUrls() const;
+ url_set baseUrls() const;
/**
* Add a base url. \see baseUrls
* \param url The base url for the repository.
/**
* \short Simple callback to collect the results
*
- * Classes like RepoFileParser call the callback
+ * Classes like RepoFileReader call the callback
* once per each repo in a file.
*
* Passing this functor as callback, you can collect
// TranslatorExplanation '%s' is a filename
ZYPP_THROW(RepoException( todelete, str::form( _("Can't delete '%s'"), todelete.filepath().c_str() )));
}
- MIL << todelete.alias() << " sucessfully deleted." << endl;
+ MIL << todelete.alias() << " successfully deleted." << endl;
}
else
{
cleanMetadata( todelete, mSubprogrcv );
cleanPackages( todelete, pSubprogrcv );
reposManip().erase(todelete);
- MIL << todelete.alias() << " sucessfully deleted." << endl;
+ MIL << todelete.alias() << " successfully deleted." << endl;
HistoryLog(_options.rootDir).removeRepository(todelete);
return;
} // else filepath is empty
// TranslatorExplanation '%s' is a filename
ZYPP_THROW(ServiceException( service, str::form( _("Can't delete '%s'"), location.c_str() ) ));
}
- MIL << alias << " sucessfully deleted." << endl;
+ MIL << alias << " successfully deleted." << endl;
}
else
{
it->dumpAsIniOn(file);
}
- MIL << alias << " sucessfully deleted from file " << location << endl;
+ MIL << alias << " successfully deleted from file " << location << endl;
}
// now remove all repositories added by this service
namespace parser
{ /////////////////////////////////////////////////////////////////
+ namespace {
+ inline const std::string & keyGarbage()
+ {
+ static const std::string & _val( ",|/\\" );
+ return _val;
+ }
+ } //namespace
+
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : IniParser::IniParser
void IniParser::endParse()
{}
+void IniParser::garbageLine( const std::string §ion, const std::string &line )
+{
+ std::string msg = str::form("%s: Section [%s]: Line %d contains garbage (no '=' or '%s' in key)",
+ _inputname.c_str(), section.c_str(), _line_nr, keyGarbage().c_str());
+ ZYPP_THROW(ParseException(msg));
+}
+
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : IniParser::parse
if (trimmed[0] == '[')
{
- std::string section = trimmed.substr(1, trimmed.find(']')-1);
- consume(section);
- section.swap(_current_section);
+ std::string::size_type pos = trimmed.find(']');
+ if ( pos != std::string::npos )
+ {
+ std::string section = trimmed.substr(1, pos-1);
+ consume(section);
+ section.swap(_current_section);
+ }
+ else
+ {
+ _line_nr = line.lineNo();
+ garbageLine( _current_section, trimmed );
+ }
continue;
}
std::string::size_type pos = trimmed.find('=');
-
- if (pos != std::string::npos)
+ if ( pos == std::string::npos || trimmed.find_first_of( keyGarbage() ) < pos )
{
- std::string key = str::rtrim(trimmed.substr(0, pos));
- if(key.find_first_of(" \t") != std::string::npos) {
- std::string msg = str::form("%s: Key in line %d contains whitespace", _inputname.c_str(), line.lineNo());
- ZYPP_THROW(ParseException(msg));
- }
- std::string value = str::ltrim(trimmed.substr(pos+1));
- consume( _current_section, key, value);
+ _line_nr = line.lineNo();
+ garbageLine( _current_section, trimmed ); // may or may not throw
}
else
{
- std::string msg = str::form("%s: Line %d is missing '=' sign", _inputname.c_str(), line.lineNo());
- ZYPP_THROW(ParseException(msg));
+ std::string key = str::rtrim(trimmed.substr(0, pos));
+ std::string value = str::ltrim(trimmed.substr(pos+1));
+ consume( _current_section, key, value);
}
// set progress and allow cancel
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : IniParser
-//
-/** Basic SUSEtags parser.
- * Will replace parser/tagfile/ and parser/taggedfile/ stuff.
-*/
+/// \class IniParser
+/// \brief Simple INI-file parser
+///
+/// Lines staring with \c ; or \c # are treated as comment. Section
+/// names are enclosed by <tt>[]</tt>. Key and value are separated by \c =.
+///
+/// Lines without \c = or with a key containing any of "<tt>,|\\/</tt>"
+/// or section lines without closing \c ] are considered garbage.
+///
class IniParser : private base::NonCopyable
{
public:
virtual void consume( const std::string §ion, const std::string &key, const std::string &value );
/** Called when the parse is done. */
virtual void endParse();
+
+ /** Called whenever a garbage line is found.
+ *
+ * \throw ParseException if not overloaded.
+ *
+ * Derived parsers may overload this to examine the line
+ * and call this method to actually throw the exception.
+ *
+ * Used by some parsers to accept multi-line entires.
+ */
+ virtual void garbageLine( const std::string §ion, const std::string &line );
+
public:
/** Name of the current InputStream. */
const std::string & inputname() const
*
*/
#include <iostream>
-#include "zypp/base/Logger.h"
+#include "zypp/base/LogTools.h"
#include "zypp/base/String.h"
#include "zypp/base/Regex.h"
#include "zypp/base/InputStream.h"
#include "zypp/parser/RepoFileReader.h"
using std::endl;
-using zypp::parser::IniDict;
///////////////////////////////////////////////////////////////////
namespace zypp
-{ /////////////////////////////////////////////////////////////////
+{
///////////////////////////////////////////////////////////////////
namespace parser
- { /////////////////////////////////////////////////////////////////
+ {
+ ///////////////////////////////////////////////////////////////////
+ namespace {
+
+ ///////////////////////////////////////////////////////////////////
+ /// \class RepoFileParser
+ /// \brief Modified \ref IniDict to allow parsing multiple 'baseurl=' entries
+ ///////////////////////////////////////////////////////////////////
+ class RepoFileParser : public IniDict
+ {
+ public:
+ RepoFileParser( const InputStream & is_r )
+ { read( is_r ); }
+
+ using IniDict::consume; // don't hide overloads we don't redefine here
+
+ virtual void consume( const std::string & section_r, const std::string & key_r, const std::string & value_r )
+ {
+ if ( key_r == "baseurl" )
+ {
+ setInBaseurls( true );
+ _baseurls[section_r].push_back( Url(value_r) );
+ }
+ else
+ {
+ setInBaseurls( false );
+ IniDict::consume( section_r, key_r, value_r );
+ }
+ }
+
+ virtual void garbageLine( const std::string & section_r, const std::string & line_r )
+ {
+ if ( _inBaseurls )
+ _baseurls[section_r].push_back( Url(line_r) );
+ else
+ IniDict::garbageLine( section_r, line_r ); // throw
+ }
+
+ std::list<Url> & baseurls( const std::string & section_r )
+ { return _baseurls[section_r]; }
+
+ private:
+ void setInBaseurls( bool yesno_r )
+ { if ( _inBaseurls != yesno_r ) _inBaseurls = yesno_r; }
+
+ DefaultIntegral<bool,false> _inBaseurls;
+ std::map<std::string,std::list<Url>> _baseurls;
+ };
+
+ } //namespace
+ ///////////////////////////////////////////////////////////////////
/**
* \short List of RepoInfo's from a file.
const RepoFileReader::ProcessRepo &callback,
const ProgressData::ReceiverFnc &progress )
{
- parser::IniDict dict(is);
- for ( parser::IniDict::section_const_iterator its = dict.sectionsBegin();
- its != dict.sectionsEnd();
- ++its )
+ RepoFileParser dict(is);
+ for_( its, dict.sectionsBegin(), dict.sectionsEnd() )
{
RepoInfo info;
info.setAlias(*its);
- Url url;
+ std::string proxy;
+ std::string proxyport;
- for ( IniDict::entry_const_iterator it = dict.entriesBegin(*its);
- it != dict.entriesEnd(*its);
- ++it )
+ for_( it, dict.entriesBegin(*its), dict.entriesEnd(*its) )
{
//MIL << (*it).first << endl;
if (it->first == "name" )
info.setEnabled( str::strToTrue( it->second ) );
else if ( it->first == "priority" )
info.setPriority( str::strtonum<unsigned>( it->second ) );
- else if ( it->first == "baseurl" && !it->second.empty())
- url = it->second;
else if ( it->first == "path" )
info.setPath( Pathname(it->second) );
else if ( it->first == "type" )
else if ( it->first == "service" )
info.setService( it->second );
else if ( it->first == "proxy" )
- {
- if (it->second != "_none_" )
- {
- str::regex ex("^(.*):([0-9]+)$");
- str::smatch what;
- if(str::regex_match(it->second, what, ex)){
- url.setQueryParam("proxy", what[1]);
- url.setQueryParam("proxyport", what[2]);
- }
- }
- } else
+ {
+ // Translate it into baseurl queryparams
+ // NOTE: The hack here does not add proxy to mirrorlist urls but the
+ // original code worked without complains, so keep it for now.
+ static const str::regex ex( ":[0-9]+$" ); // portspec
+ str::smatch what;
+ if ( str::regex_match( it->second, what, ex ) )
+ {
+ proxy = it->second.substr( 0, it->second.size() - what[0].size() );
+ proxyport = what[0].substr( 1 );
+ }
+ else
+ {
+ proxy = it->second;
+ }
+ }
+ else
ERR << "Unknown attribute in [" << *its << "]: " << it->first << "=" << it->second << " ignored" << endl;
}
- if (url.isValid())
- info.addBaseUrl(url);
+
+ USR << dict.baseurls( *its ) << endl;
+ for ( auto & url : dict.baseurls( *its ) )
+ {
+ if ( ! proxy.empty() && url.getQueryParam( "proxy" ).empty() )
+ {
+ url.setQueryParam( "proxy", proxy );
+ url.setQueryParam( "proxyport", proxyport );
+ }
+ info.addBaseUrl( url );
+ }
+
info.setFilepath(is.path());
MIL << info << endl;
// add it to the list.
return str;
}
- /////////////////////////////////////////////////////////////////
} // namespace parser
///////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
* The \ref _callback is provided on construction.
*
* \code
- * RepoFileReader reader(repo_file,
+ * RepoFileReader reader(repo_file,
* bind( &SomeClass::callbackfunc, &SomeClassInstance, _1, _2 ) );
* \endcode
+ *
+ * \note Multiple baseurls in a repo file are supported using this style:
+ * \code
+ * baseurl=http://server.a/path/to/repo
+ * http://server.b/path/to/repo
+ * http://server.c/path/to/repo
+ * \endcode
+ * Repeating the \c baseurl= tag on each line is also accepted, but when the
+ * file has to be written, the preferred style is used.
*/
class RepoFileReader
{
friend std::ostream & operator<<( std::ostream & str, const RepoFileReader & obj );
public:
-
+
/**
* Callback definition.
* First parameter is a \ref RepoInfo object with the resource
* to be thrown and the processing to be cancelled.
*/
typedef function< bool( const RepoInfo & )> ProcessRepo;
-
+
/** Implementation */
class Impl;
RepoFileReader( const InputStream &is,
const ProcessRepo & callback,
const ProgressData::ReceiverFnc &progress = ProgressData::ReceiverFnc() );
-
+
/**
* Dtor
*/
namespace repo
{ /////////////////////////////////////////////////////////////////
- RepoMirrorList::RepoMirrorList( const Url &url, const Pathname &metadatapath )
+ ///////////////////////////////////////////////////////////////////
+ namespace
{
- std::vector<Url> my_urls;
- Pathname tmpfile, cachefile;
-
- if ( url.asString().find("/metalink") != string::npos )
- cachefile = metadatapath / "mirrorlist.xml";
- else
- cachefile = metadatapath / "mirrorlist.txt";
- //cachefile = ZConfig::instance().repoMetadataPath() / Pathname(escaped_alias) / "mirrorlist.txt";
-
- zypp::filesystem::PathInfo cacheinfo (cachefile);
-
- if ( !cacheinfo.isFile() || cacheinfo.mtime() < time(NULL) - (long) ZConfig::instance().repo_refresh_delay() * 60 )
+ /** Provide mirrorlist in a local file */
+ Pathname RepoMirrorListProvide( const Url & url_r )
{
- Pathname filepath (url.getPathName());
- Url abs_url (url);
-
- DBG << "Getting MirrorList from URL: " << abs_url << endl;
-
- abs_url.setPathName("");
- abs_url.setQueryParam("mediahandler", "curl");
-
- MediaSetAccess access (abs_url);
- tmpfile = access.provideFile(filepath);
-
- // Create directory, if not existing
- zypp::filesystem::assert_dir(metadatapath);
-
- DBG << "Copy MirrorList file to " << cachefile << endl;
- zypp::filesystem::copy(tmpfile, cachefile);
+ Url abs_url( url_r );
+ abs_url.setPathName( "/" );
+ abs_url.setQueryParam( "mediahandler", "curl" );
+ MediaSetAccess access( abs_url );
+ return access.provideFile( url_r.getPathName() );
}
- if ( url.asString().find("/metalink") != string::npos )
+ inline std::vector<Url> RepoMirrorListParseXML( const Pathname &tmpfile )
{
- my_urls = parseXML(cachefile);
+ InputStream tmpfstream (tmpfile);
+ media::MetaLinkParser metalink;
+ metalink.parse(tmpfstream);
+ return metalink.getUrls();
}
- else
+
+ inline std::vector<Url> RepoMirrorListParseTXT( const Pathname &tmpfile )
{
- my_urls = parseTXT(cachefile);
+ InputStream tmpfstream (tmpfile);
+ std::vector<Url> my_urls;
+ string tmpurl;
+ while (getline(tmpfstream.stream(), tmpurl))
+ {
+ my_urls.push_back(Url(tmpurl));
+ }
+ return my_urls;
}
- setUrls( my_urls );
- if( urls.empty() )
+ /** Parse a local mirrorlist \a listfile_r and return usable URLs */
+ inline std::vector<Url> RepoMirrorListParse( const Url & url_r, const Pathname & listfile_r )
{
- DBG << "Removing Cachefile as it contains no URLs" << endl;
- zypp::filesystem::unlink(cachefile);
+ std::vector<Url> mirrorurls;
+ if ( url_r.asString().find( "/metalink" ) != string::npos )
+ mirrorurls = RepoMirrorListParseXML( listfile_r );
+ else
+ mirrorurls = RepoMirrorListParseTXT( listfile_r );
+
+
+ std::vector<Url> ret;
+ for ( auto & murl : mirrorurls )
+ {
+ if ( murl.getScheme() != "rsync" )
+ {
+ size_t delpos = murl.getPathName().find("repodata/repomd.xml");
+ if( delpos != string::npos )
+ {
+ murl.setPathName( murl.getPathName().erase(delpos) );
+ }
+ ret.push_back( murl );
+
+ if ( ret.size() >= 4 ) // why 4?
+ break;
+ }
+ }
+ return ret;
}
- }
-
- RepoMirrorList::RepoMirrorList( const Url &url )
- {
- std::vector<Url> my_urls;
- Pathname tmpfile;
-
- Pathname filepath (url.getPathName());
- Url abs_url (url);
-
- DBG << "Getting MirrorList from URL: " << abs_url << endl;
- abs_url.setPathName("");
- abs_url.setQueryParam("mediahandler", "curl");
+ } // namespace
+ ///////////////////////////////////////////////////////////////////
- MediaSetAccess access (abs_url);
- tmpfile = access.provideFile(filepath);
- if ( url.asString().find("/metalink") != string::npos )
+ RepoMirrorList::RepoMirrorList( const Url & url_r, const Pathname & metadatapath_r )
+ {
+ if ( url_r.getScheme() == "file" )
{
- my_urls = parseXML(tmpfile);
+ // no cache for local mirrorlist
+ _urls = RepoMirrorListParse( url_r, url_r.getPathName() );
}
else
{
- my_urls = parseTXT(tmpfile);
- }
-
- setUrls( my_urls );
- }
-
- void RepoMirrorList::setUrls( std::vector<Url> my_urls )
- {
- int valid_urls = 0;
- for (std::vector<Url>::iterator it = my_urls.begin() ; it != my_urls.end() and valid_urls < 4 ; ++it)
- {
- if ( it->getScheme() != "rsync" )
- {
- size_t delpos = it->getPathName().find("repodata/repomd.xml");
- if( delpos != string::npos )
- {
- it->setPathName( it->getPathName().erase(delpos) );
- }
- urls.push_back(*it);
- ++valid_urls;
- }
+ Pathname cachefile( metadatapath_r );
+ if ( url_r.asString().find( "/metalink" ) != string::npos )
+ cachefile /= "mirrorlist.xml";
+ else
+ cachefile /= "mirrorlist.txt";
+
+ zypp::filesystem::PathInfo cacheinfo( cachefile );
+ if ( !cacheinfo.isFile() || cacheinfo.mtime() < time(NULL) - (long) ZConfig::instance().repo_refresh_delay() * 60 )
+ {
+ DBG << "Getting MirrorList from URL: " << url_r << endl;
+ Pathname localfile( RepoMirrorListProvide( url_r ) );
+
+ // Create directory, if not existing
+ DBG << "Copy MirrorList file to " << cachefile << endl;
+ zypp::filesystem::assert_dir( metadatapath_r );
+ zypp::filesystem::hardlinkCopy( localfile, cachefile );
+ }
+
+ _urls = RepoMirrorListParse( url_r, cachefile );
+ if( _urls.empty() )
+ {
+ DBG << "Removing Cachefile as it contains no URLs" << endl;
+ zypp::filesystem::unlink( cachefile );
+ }
}
}
- std::vector<Url> RepoMirrorList::parseXML( const Pathname &tmpfile ) const
+ RepoMirrorList::RepoMirrorList( const Url & url_r )
{
- InputStream tmpfstream (tmpfile);
- media::MetaLinkParser metalink;
- metalink.parse(tmpfstream);
- return metalink.getUrls();
+ DBG << "Getting MirrorList from URL: " << url_r << endl;
+ Pathname localfile( url_r.getScheme() == "file"
+ ? url_r.getPathName()
+ : RepoMirrorListProvide( url_r ) );
+ _urls = RepoMirrorListParse( url_r, localfile );
}
- std::vector<Url> RepoMirrorList::parseTXT( const Pathname &tmpfile ) const
- {
- InputStream tmpfstream (tmpfile);
- std::vector<Url> my_urls;
- string tmpurl;
- while (getline(tmpfstream.stream(), tmpurl))
- {
- my_urls.push_back(Url(tmpurl));
- }
- return my_urls;
- }
-
- std::vector<Url> RepoMirrorList::getUrls() const
- {
- return urls;
- }
-
- RepoMirrorList::~RepoMirrorList()
- {}
-
- /////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
} // namespace repo
///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
class RepoMirrorList
{
public:
- RepoMirrorList( const Url &url );
- RepoMirrorList( const Url &url, const Pathname &metadatapath );
- virtual ~RepoMirrorList();
-
- std::vector<Url> getUrls() const;
+ RepoMirrorList( const Url & url_r );
+ RepoMirrorList( const Url & url_r, const Pathname & metadatapath_r );
+
+ const std::vector<Url> & getUrls() const
+ { return _urls; }
private:
- std::vector<Url> urls;
- void setUrls( std::vector<Url> my_urls );
- std::vector<Url> parseXML( const Pathname &tmpfile ) const;
- std::vector<Url> parseTXT( const Pathname &tmpfile ) const;
+ std::vector<Url> _urls;
};
} // ns repo
os << " distupgrade_removeunsupported = " << _distupgrade_removeunsupported << endl;
os << " solveSrcPackages = " << _solveSrcPackages << endl;
os << " cleandepsOnRemove = " << _cleandepsOnRemove << endl;
+ os << " fixsystem = " << _fixsystem << endl;
} else {
os << "<NULL>";
}
}
}
- MIL << "Syncronizing keys with zypp keyring" << endl;
+ MIL << "Synchronizing keys with zypp keyring" << endl;
syncTrustedKeys();
// Close the database in case any write acces (create/convert)
* If the specified candidate is not already installed (\ref identicalInstalled),
* and the \a causer_r has sufficient permisssion, then \a newCandidate_r is set as the new
* candidate (\ref setCandidate) and selected for installation.
- * \returns \c True if \a newCandidate_r is already installed or sucessfully selected for installation.
+ * \returns \c True if \a newCandidate_r is already installed or successfully selected for installation.
*/
bool setOnSystem( const PoolItem & newCandidate_r, ResStatus::TransactByValue causer_r = ResStatus::USER );
const std::string &querystr,
const std::string &fragment)
{
- setScheme(scheme);
+ if ( scheme.empty() && *pathdata.c_str() == '/' )
+ setScheme("file");
+ else
+ setScheme(scheme);
+
setAuthority(authority);
setPathData(pathdata);
setQueryString(querystr);