SET(LIBZYPP_MAJOR "14")
SET(LIBZYPP_COMPATMINOR "30")
SET(LIBZYPP_MINOR "30")
-SET(LIBZYPP_PATCH "0")
+SET(LIBZYPP_PATCH "1")
#
-# LAST RELEASED: 14.30.0 (30)
+# LAST RELEASED: 14.30.1 (30)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
--- /dev/null
+/**
+
+\page zypp-pattern-packages Code 12 Pattern Packages
+
+\author Michael Andres <ma@suse.de>
+
+<HR><!-- ====================================================================== -->
+
+\section zypp-pattern-packages_intro Intro
+
+Since Code12 (SLES-12) we utilizes a new method of defining patterns, as opposed to the older XML-based patterns files. A pattern and it's dependencies are now represented by an rpm package and the few pattern specific properties are provided by the package. No extra XML-file is needed.
+
+By convention a patterns package for a \c pattern:FOO is named \c patterns-*-FOO and is must provide \c pattern() \c = \c apparmor. The pattens content is expressed by dependencies to other packages and patterns-packages.
+
+The list of provides used for the new pattern pseudo-package autogeneration:
+
+\code
+ Provides: pattern-category() = STRING
+ Provides: pattern-category(de) = STRING
+ (... other languages ...)
+ Provides: pattern-includes() = STRING
+ Provides: pattern-extends() = STRING
+ Provides: pattern-icon() = STRING
+ Provides: pattern-order() = STRING
+ Provides: pattern-visible()
+
+ STRING must be url-hexencoded so that it does not contain any characters
+ that rpm provides can't have. E.g.:
+ ' ' => %20
+ ',' => %2C
+ '-' => %2D
+\endcode
+
+\code
+patterns-sles-Minimal-12-37.1.x86_64.rpm
+ PROVIDES {
+ pattern() == Minimal
+ pattern-icon() == pattern-basis
+ pattern-order() == 1099
+ pattern-visible()
+ pattern-category() == Base%20Technologies
+ pattern-category(ar) == %D8%A7%D9%84%D8%AA%D9%83%D9%86%D9%88%D9%84%D9%88%D8%AC%D9%8A%D8%A7%D8%AA%20%D8%A7%D9%84%D8%A3%D8%B3%D8%A7%D8%B3%D9%8A%D8%A9
+ pattern-category(ca) == Tecnologies%20de%20base
+ pattern-category(cs) == Z%C3%A1kladn%C3%AD%20technologie
+ pattern-category(da) == Basisteknologier
+ pattern-category(de) == Basistechnologien
+ ...
+}
+ REQUIRES {
+ systemd
+ coreutils
+ insserv
+ aaa_base
+ ...
+}
+ RECOMMENDS (22){
+ grub2
+ rpcbind
+ nfs-client
+ rsyslog
+ ...
+}
+\endcode
+
+
+*/
%define force_gcc_46 0
Name: @PACKAGE@
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Summary: Package, Patch, Pattern, and Product Management
-License: GPL-2.0+
-Group: System/Packages
Version: @VERSION@
Release: 0
+License: GPL-2.0+
+Url: git://gitorious.org/opensuse/libzypp.git
+Summary: Package, Patch, Pattern, and Product Management
+Group: System/Packages
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
Provides: yast2-packagemanager
Ladislav Slezak <lslezak@suse.cz>
%package devel
+Summary: Package, Patch, Pattern, and Product Management - developers files
+Group: Development/Libraries/C and C++
+Provides: yast2-packagemanager-devel
+Obsoletes: yast2-packagemanager-devel
Requires: boost-devel
Requires: bzip2
Requires: glibc-devel
%else
Requires: libsolv-devel
%endif
+
+%description devel
+Package, Patch, Pattern, and Product Management - developers files
+
+%package devel-doc
Summary: Package, Patch, Pattern, and Product Management - developers files
-Group: System/Packages
+Group: Documentation/HTML
Provides: yast2-packagemanager-devel
Obsoletes: yast2-packagemanager-devel
-%description -n libzypp-devel
+%description devel-doc
Package, Patch, Pattern, and Product Management - developers files
-Authors:
---------
- Michael Andres <ma@suse.de>
- Jiri Srain <jsrain@suse.cz>
- Stefan Schubert <schubi@suse.de>
- Duncan Mac-Vicar <dmacvicar@suse.de>
- Klaus Kaempf <kkaempf@suse.de>
- Marius Tomaschewski <mt@suse.de>
- Stanislav Visnovsky <visnov@suse.cz>
- Ladislav Slezak <lslezak@suse.cz>
-
%prep
%setup -q
%files devel
%defattr(-,root,root)
%{_libdir}/libzypp.so
-%{_docdir}/%{name}
%{_includedir}/zypp
%{_datadir}/cmake/Modules/*
%{_libdir}/pkgconfig/libzypp.pc
+%files devel-doc
+%defattr(-,root,root)
+%{_docdir}/%{name}
+
%changelog
+-------------------------------------------------------------------
+Mon Oct 27 11:38:00 CET 2014 - ma@suse.de
+
+- doc: add hint to code 12 pattern packages
+- MediaCurl: Fix URL path concatenation (bnc#901590)
+- Move doxygen html doc to libzypp-devel-doc (bnc#901691)
+- Remove non-breaking spaces from changes file
+- Control lifetime of downloaded mirrorlist
+- version 14.30.1 (30)
+
+-------------------------------------------------------------------
+Thu Oct 16 11:03:11 CEST 2014 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
-------------------------------------------------------------------
Wed Oct 15 15:07:09 CEST 2014 - ma@suse.de
- DiskUsageCounter: Set growonly on detetcted snapshotting btrfs
partitions (bnc#896176)
- DiskUsageCounter: Allow MountPoint to store fstype
-- DiskUsageCounter: Support setting 'growonly' partition hint
+- DiskUsageCounter: Support setting 'growonly' partition hint
(bnc#896176)
- version 14.29.0 (29)
- PackageProvider: consider toplevel cache if --root or --pkg-cachedir
is used.
-- Cleanup orpahned cache dirs only at zypp.conf default locations
+- Cleanup orpahned cache dirs only at zypp.conf default locations
(bnc#891515)
- Remove orphaned package caches on refresh (bnc#888919)
- version 14.27.2 (27)
-------------------------------------------------------------------
Tue May 27 16:31:21 CEST 2014 - ma@suse.de
-- Let ServiceRefresh en-/disable repos with respect to previous state
+- Let ServiceRefresh en-/disable repos with respect to previous state
and user modifications.
- RepoindexFileReader: support variable substitution
- Parse optional autorefresh attribute from repoindex.xml
-------------------------------------------------------------------
Thu May 8 18:54:25 CEST 2014 - ma@suse.de
-- KeyRingReport: New infoVerify callback showing the trusted key
+- KeyRingReport: New infoVerify callback showing the trusted key
that will be used for verification.
- version 14.19.0 (19)
-------------------------------------------------------------------
Tue Feb 25 13:42:13 CET 2014 - ma@suse.de
-- Remove duplicate code detecting known kinds and move it to
+- Remove duplicate code detecting known kinds and move it to
ResKind::explicitBuiltin.
- version 14.16.0 (16)
- Improve ProgressData reporting.
- Allow xml::escape directly dumping to a stream.
-- Add support for repo authentication using SSL client certificates
+- Add support for repo authentication using SSL client certificates
(bnc#683914)
- Enhance Queue to perform COW
- fix documentation
-------------------------------------------------------------------
Wed Dec 4 12:54:30 UTC 2013 - jreidinger@suse.com
-- Drop package-manager script as it is already deprecated and
+- Drop package-manager script as it is already deprecated and
packagekit usage in desktop invalidates it. If someone really
- need it, then place it to proper top level package which can
+ need it, then place it to proper top level package which can
decide what GUI is proper for given task.
-------------------------------------------------------------------
- Extend commit plugin to send the transaction list (Fate#316203)
- Add base/Json.h: JSON encoder for e.g. sending data to plugins
-- Re-evaluate dropped packages list on upgrade, even if product
+- Re-evaluate dropped packages list on upgrade, even if product
remains unchanged (bnc#849251).
- Add ppc64le architecture
- Add m68k architecture
- forward port 3924:3939
- Add explicit finish callbacks for subtasks during ProvidePackage
- to avoid UI confusion.
+ to avoid UI confusion.
- rev3957
-------------------------------------------------------------------
Tue Jul 18 12:56:17 CEST 2006 - dmacvicar@suse.de
- Digest: Don't read the stream character wise but reading blocks,
- as advised by matz profiling.
+ as advised by matz profiling.
- r3819
-------------------------------------------------------------------
- Fixes unneeded file download, and add download callbacks
(still need yast side) #181204 and #160206
- Fix stalle tmpdir due to cyclic references, using a master
- TmpDir for zypp. # 178292
+ TmpDir for zypp. # 178292
-------------------------------------------------------------------
Wed Jun 7 00:02:18 CEST 2006 - ma@suse.de
- dont pass root on init but before.
- implement rpm db modification timestamp
- not used yet
+ not used yet
- move Helix source to testsuite out of the solver
so we can use it for target, storage tests
- add Source_Ref::timestamp(), default to now()
- in order to implement smart sync of sources by zmd
+ in order to implement smart sync of sources by zmd
- don't parse desc and summary twice
- fix a segfault with tranlated text
- fix broken size tag introduced in rev 3427
Wed May 3 15:34:00 CEST 2006 - dmacvicar@suse.de
- use --no-default-keyring to avoid creating a
- default gpg dir in / (#171055)
+ default gpg dir in / (#171055)
- rev 3335
-------------------------------------------------------------------
ri.setMirrorListUrl(weburl);
- BOOST_CHECK(ri.url().asString() == "ftp://ftp-stud.hs-esslingen.de/pub/fedora/linux/updates/13/x86_64/");
+ BOOST_CHECK(ri.url().asString() == "http://ftp-stud.hs-esslingen.de/pub/fedora/linux/updates/13/x86_64/");
ostringstream ostr;
ri.dumpAsIniOn(ostr);
#include <fstream>
#include <iomanip>
-#include "zypp/base/Logger.h"
+#include "zypp/base/LogTools.h"
#include "zypp/base/String.h"
#include "zypp/base/IOStream.h"
#include "zypp/base/StrMatcher.h"
} );
}
+ std::ostream & operator<<( std::ostream & str, const DirContent & obj )
+ { return dumpRange( str, obj.begin(), obj.end() ); }
+
///////////////////////////////////////////////////////////////////
// is_empty_dir
///////////////////////////////////////////////////////////////////
bool operator==( const DirEntry &rhs ) const;
};
+ inline std::ostream & operator<<( std::ostream & str, const DirEntry & obj )
+ { return str << '[' << obj.type << "] " << obj.name; }
+
/** Returned by readdir. */
typedef std::list<DirEntry> DirContent;
+ std::ostream & operator<<( std::ostream & str, const DirContent & obj );
+
/**
* Return content of directory via retlist. If dots is false
* entries starting with '.' are not reported. "." and ".."
#include <iostream>
#include <vector>
-#include "zypp/base/Logger.h"
+#include "zypp/base/LogTools.h"
#include "zypp/base/DefaultIntegral.h"
#include "zypp/parser/xml/XmlEscape.h"
{
emptybaseurls = true;
DBG << "MetadataPath: " << metadatapath << endl;
- const std::vector<Url> & rmurls( ( metadatapath.empty()
- ? repo::RepoMirrorList( getmirrorListUrl() )
- : repo::RepoMirrorList( getmirrorListUrl(), metadatapath ) ).getUrls() );
- _baseUrls.insert( _baseUrls.end(), rmurls.begin(), rmurls.end() );
+ repo::RepoMirrorList rmurls( getmirrorListUrl(), metadatapath );
+ _baseUrls.insert( _baseUrls.end(), rmurls.getUrls().begin(), rmurls.getUrls().end() );
}
return _baseUrls;
}
std::ostream & operator<<( std::ostream & str, const std::vector<_Tp> & obj )
{ return dumpRange( str, obj.begin(), obj.end() ); }
- template<class _Tp>
- std::ostream & operator<<( std::ostream & str, const std::set<_Tp> & obj )
+ template<class _Tp, class _Cmp, class _Alloc>
+ std::ostream & operator<<( std::ostream & str, const std::set<_Tp,_Cmp,_Alloc> & obj )
{ return dumpRange( str, obj.begin(), obj.end() ); }
template<class _Tp>
Url MediaCurl::getFileUrl( const Pathname & filename_r ) const
{
- std::string path( _url.getPathName() );
// Simply extend the URLs pathname. An 'absolute' URL path
- // is achieved by encoding the 2nd '/' in the URL:
- // URL: ftp://user@server -> ~user
- // URL: ftp://user@server/ -> ~user
- // URL: ftp://user@server// -> /
+ // is achieved by encoding the leading '/' in an URL path:
+ // URL: ftp://user@server -> ~user
+ // URL: ftp://user@server/ -> ~user
+ // URL: ftp://user@server// -> ~user
+ // URL: ftp://user@server/%2F -> /
// ^- this '/' is just a separator
- if ( path.empty() || path == "/" ) // empty URL path; the '/' is just a separator
- {
- path = filename_r.absolutename().asString();
- }
- else if ( *path.rbegin() == '/' )
- {
- path += filename_r.absolutename().asString().substr(1);
- }
- else
- {
- path += filename_r.absolutename().asString();
- }
Url newurl( _url );
- newurl.setPathName( path );
+ newurl.setPathName( ( Pathname("./"+_url.getPathName()) / filename_r ).asString().substr(1) );
return newurl;
}
///////////////////////////////////////////////////////////////////
namespace
{
- /** Provide mirrorlist in a local file */
- Pathname RepoMirrorListProvide( const Url & url_r )
+ ///////////////////////////////////////////////////////////////////
+ /// \class RepoMirrorListTempProvider
+ /// \brief Provide access to downloaded mirror list (in temp space)
+ /// \ingroup g_RAII
+ ///
+ /// Tempspace (and mirror list) are deleted when provider goes out
+ /// of scope.
+ struct RepoMirrorListTempProvider
{
- Url abs_url( url_r );
- abs_url.setPathName( "/" );
- abs_url.setQueryParam( "mediahandler", "curl" );
- MediaSetAccess access( abs_url );
- return access.provideFile( url_r.getPathName() );
- }
+ RepoMirrorListTempProvider()
+ {}
+ RepoMirrorListTempProvider( const Pathname & localfile_r )
+ : _localfile( localfile_r )
+ {}
+ RepoMirrorListTempProvider( const Url & url_r )
+ {
+ Url abs_url( url_r );
+ abs_url.setPathName( "/" );
+ abs_url.setQueryParam( "mediahandler", "curl" );
+ _access.reset( new MediaSetAccess( abs_url ) );
+ _localfile = _access->provideFile( url_r.getPathName() );
+ }
+
+ const Pathname & localfile() const
+ { return _localfile; }
+
+ private:
+ shared_ptr<MediaSetAccess> _access;
+ Pathname _localfile;
+ };
+ ///////////////////////////////////////////////////////////////////
inline std::vector<Url> RepoMirrorListParseXML( const Pathname &tmpfile )
{
/** Parse a local mirrorlist \a listfile_r and return usable URLs */
inline std::vector<Url> RepoMirrorListParse( const Url & url_r, const Pathname & listfile_r )
{
+ USR << url_r << " " << listfile_r << endl;
+
std::vector<Url> mirrorurls;
if ( url_r.asString().find( "/metalink" ) != string::npos )
mirrorurls = RepoMirrorListParseXML( listfile_r );
{
if ( url_r.getScheme() == "file" )
{
- // no cache for local mirrorlist
+ // never cache for local mirrorlist
_urls = RepoMirrorListParse( url_r, url_r.getPathName() );
}
+ else if ( ! PathInfo( metadatapath_r).isDir() )
+ {
+ // no cachedir
+ RepoMirrorListTempProvider provider( url_r ); // RAII: lifetime of any downloaded files
+ _urls = RepoMirrorListParse( url_r, provider.localfile() );
+ }
else
{
+ // have cachedir
Pathname cachefile( metadatapath_r );
if ( url_r.asString().find( "/metalink" ) != string::npos )
cachefile /= "mirrorlist.xml";
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 ) );
+ RepoMirrorListTempProvider provider( url_r ); // RAII: lifetime of downloaded file
// Create directory, if not existing
DBG << "Copy MirrorList file to " << cachefile << endl;
zypp::filesystem::assert_dir( metadatapath_r );
- zypp::filesystem::hardlinkCopy( localfile, cachefile );
+ zypp::filesystem::hardlinkCopy( provider.localfile(), cachefile );
}
_urls = RepoMirrorListParse( url_r, cachefile );
}
}
- RepoMirrorList::RepoMirrorList( const Url & url_r )
- {
- 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 );
- }
-
/////////////////////////////////////////////////////////////////
} // namespace repo
///////////////////////////////////////////////////////////////////
class RepoMirrorList
{
public:
- RepoMirrorList( const Url & url_r );
- RepoMirrorList( const Url & url_r, const Pathname & metadatapath_r );
+ RepoMirrorList( const Url & url_r, const Pathname & metadatapath_r = Pathname() );
const std::vector<Url> & getUrls() const
{ return _urls; }
+ std::vector<Url> & getUrls()
+ { return _urls; }
+
private:
std::vector<Url> _urls;
};
-
} // ns repo
} // ns zypp