Hello community,
here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2014-08-30 18:55:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
and /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2014-08-13 17:19:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2014-08-30 18:56:01.000000000 +0200
@@ -1,0 +2,20 @@
+Fri Aug 29 14:46:25 CEST 2014 - ma(a)suse.de
+
+- PackageProvider: consider toplevel cache if --root or --pkg-cachedir
+ is used.
+- 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)
+
+-------------------------------------------------------------------
+Sun Aug 24 01:16:00 CEST 2014 - ma(a)suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
+Mon Aug 18 14:01:06 CEST 2014 - ma(a)suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
Old:
----
libzypp-14.27.1.tar.bz2
New:
----
libzypp-14.27.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.QOD5TT/_old 2014-08-30 18:56:02.000000000 +0200
+++ /var/tmp/diff_new_pack.QOD5TT/_new 2014-08-30 18:56:02.000000000 +0200
@@ -23,7 +23,7 @@
Summary: Package, Patch, Pattern, and Product Management
License: GPL-2.0+
Group: System/Packages
-Version: 14.27.1
+Version: 14.27.2
Release: 0
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
++++++ libzypp-14.27.1.tar.bz2 -> libzypp-14.27.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.27.1/VERSION.cmake new/libzypp-14.27.2/VERSION.cmake
--- old/libzypp-14.27.1/VERSION.cmake 2014-07-31 19:25:11.000000000 +0200
+++ new/libzypp-14.27.2/VERSION.cmake 2014-08-29 14:49:37.000000000 +0200
@@ -61,8 +61,8 @@
SET(LIBZYPP_MAJOR "14")
SET(LIBZYPP_COMPATMINOR "27")
SET(LIBZYPP_MINOR "27")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_PATCH "2")
#
-# LAST RELEASED: 14.27.1 (27)
+# LAST RELEASED: 14.27.2 (27)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.27.1/devel/devel.ma/Basic.cc new/libzypp-14.27.2/devel/devel.ma/Basic.cc
--- old/libzypp-14.27.1/devel/devel.ma/Basic.cc 2014-07-01 11:30:28.000000000 +0200
+++ new/libzypp-14.27.2/devel/devel.ma/Basic.cc 2014-08-29 14:49:37.000000000 +0200
@@ -153,32 +153,6 @@
USR << __PRETTY_FUNCTION__ << endl;
}
- // Dowmload patch rpm:
- // - path below url reported on start()
- // - expected download size (0 if unknown)
- // - download is interruptable
- virtual void startPatchDownload( const Pathname & /*filename*/, const ByteCount & /*downloadsize*/ )
- {
- USR << __PRETTY_FUNCTION__ << endl;
- }
-
- virtual bool progressPatchDownload( int /*value*/ )
- {
- USR << __PRETTY_FUNCTION__ << endl;
- return true;
- }
-
- virtual void problemPatchDownload( const std::string &/*description*/ )
- {
- USR << __PRETTY_FUNCTION__ << endl;
- }
-
- virtual void finishPatchDownload()
- {
- USR << __PRETTY_FUNCTION__ << endl;
- }
-
-
// return false if the download should be aborted right now
virtual bool progress(int value, Resolvable::constPtr resolvable_ptr)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.27.1/package/libzypp.changes new/libzypp-14.27.2/package/libzypp.changes
--- old/libzypp-14.27.1/package/libzypp.changes 2014-07-31 19:25:11.000000000 +0200
+++ new/libzypp-14.27.2/package/libzypp.changes 2014-08-29 14:49:37.000000000 +0200
@@ -1,4 +1,24 @@
-------------------------------------------------------------------
+Fri Aug 29 14:46:25 CEST 2014 - ma(a)suse.de
+
+- PackageProvider: consider toplevel cache if --root or --pkg-cachedir
+ is used.
+- 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)
+
+-------------------------------------------------------------------
+Sun Aug 24 01:16:00 CEST 2014 - ma(a)suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
+Mon Aug 18 14:01:06 CEST 2014 - ma(a)suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
Thu Jul 31 19:22:56 CEST 2014 - ma(a)suse.de
- Fix gpg key creation/modification date computation to properly
Files old/libzypp-14.27.1/po/zypp-po.tar.bz2 and new/libzypp-14.27.2/po/zypp-po.tar.bz2 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.27.1/zypp/RepoManager.cc new/libzypp-14.27.2/zypp/RepoManager.cc
--- old/libzypp-14.27.1/zypp/RepoManager.cc 2014-07-14 17:49:15.000000000 +0200
+++ new/libzypp-14.27.2/zypp/RepoManager.cc 2014-08-29 14:49:37.000000000 +0200
@@ -399,6 +399,21 @@
return ret;
}
+ std:: ostream & operator<<( std::ostream & str, const RepoManagerOptions & obj )
+ {
+#define OUTS(X) str << " " #X "\t" << obj.X << endl
+ str << "RepoManagerOptions (" << obj.rootDir << ") {" << endl;
+ OUTS( repoRawCachePath );
+ OUTS( repoSolvCachePath );
+ OUTS( repoPackagesCachePath );
+ OUTS( knownReposPath );
+ OUTS( knownServicesPath );
+ OUTS( pluginsPath );
+ str << "}" << endl;
+#undef OUTS
+ return str;
+ }
+
///////////////////////////////////////////////////////////////////
/// \class RepoManager::Impl
/// \brief RepoManager implementation.
@@ -630,6 +645,37 @@
repo::PluginServices(_options.pluginsPath/"services", ServiceCollector(_services));
}
+ ///////////////////////////////////////////////////////////////////
+ namespace {
+ /** Delete \a cachePath_r subdirs not matching known aliases in \a repoEscAliases_r (must be sorted!)
+ * \note bnc#891515: Auto-cleanup only zypp.conf default locations. Otherwise
+ * we'd need some magic file to identify zypp cache directories. Without this
+ * we may easily remove user data (zypper --pkg-cache-dir . download ...)
+ */
+ inline void cleanupNonRepoMetadtaFolders( const Pathname & cachePath_r,
+ const Pathname & defaultCachePath_r,
+ const std::list<std::string> & repoEscAliases_r )
+ {
+ if ( cachePath_r != defaultCachePath_r )
+ return;
+
+ std::list<std::string> entries;
+ if ( filesystem::readdir( entries, cachePath_r, false ) == 0 )
+ {
+ entries.sort();
+ std::set<std::string> oldfiles;
+ set_difference( entries.begin(), entries.end(), repoEscAliases_r.begin(), repoEscAliases_r.end(),
+ std::inserter( oldfiles, oldfiles.end() ) );
+ for ( const std::string & old : oldfiles )
+ {
+ if ( old == Repository::systemRepoAlias() ) // don't remove the @System solv file
+ continue;
+ filesystem::recursive_rmdir( cachePath_r / old );
+ }
+ }
+ }
+ } // namespace
+ ///////////////////////////////////////////////////////////////////
void RepoManager::Impl::init_knownRepositories()
{
MIL << "start construct known repos" << endl;
@@ -682,25 +728,15 @@
}
// delete metadata folders without corresponding repo (e.g. old tmp directories)
+ //
+ // bnc#891515: Auto-cleanup only zypp.conf default locations. Otherwise
+ // we'd need somemagic file to identify zypp cache directories. Without this
+ // we may easily remove user data (zypper --pkg-cache-dir . download ...)
repoEscAliases.sort();
- for ( const Pathname & cachePath : { _options.repoRawCachePath
- , _options.repoSolvCachePath } )
- {
- std::list<std::string> entries;
- if ( filesystem::readdir( entries, cachePath, false ) == 0 )
- {
- entries.sort();
- std::set<std::string> oldfiles;
- set_difference( entries.begin(), entries.end(), repoEscAliases.begin(), repoEscAliases.end(),
- std::inserter( oldfiles, oldfiles.end() ) );
- for ( const std::string & old : oldfiles )
- {
- if ( old == Repository::systemRepoAlias() ) // don't remove the @System solv file
- continue;
- filesystem::recursive_rmdir( cachePath / old );
- }
- }
- }
+ RepoManagerOptions defaultCache( _options.rootDir );
+ cleanupNonRepoMetadtaFolders( _options.repoRawCachePath, defaultCache.repoRawCachePath, repoEscAliases );
+ cleanupNonRepoMetadtaFolders( _options.repoSolvCachePath, defaultCache.repoSolvCachePath, repoEscAliases );
+ cleanupNonRepoMetadtaFolders( _options.repoPackagesCachePath, defaultCache.repoPackagesCachePath, repoEscAliases );
}
MIL << "end construct known repos" << endl;
}
@@ -838,9 +874,6 @@
}
}
- // To test the new matadta create temp dir as sibling of mediarootpath
- filesystem::TmpDir tmpdir( filesystem::TmpDir::makeSibling( mediarootpath ) );
-
repo::RepoType repokind = info.type();
// if unknown: probe it
if ( repokind == RepoType::NONE )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.27.1/zypp/ZYppCallbacks.h new/libzypp-14.27.2/zypp/ZYppCallbacks.h
--- old/libzypp-14.27.1/zypp/ZYppCallbacks.h 2014-07-25 12:58:04.000000000 +0200
+++ new/libzypp-14.27.2/zypp/ZYppCallbacks.h 2014-08-29 14:49:37.000000000 +0200
@@ -157,20 +157,20 @@
virtual void finishDeltaApply()
{}
- // Dowmload patch rpm:
- // - path below url reported on start()
- // - expected download size (0 if unknown)
- // - download is interruptable
- virtual void startPatchDownload( const Pathname & /*filename*/, const ByteCount & /*downloadsize*/ )
+ /** \deprecated Unused since 2008 */
+ virtual ZYPP_DEPRECATED void startPatchDownload( const Pathname & /*filename*/, const ByteCount & /*downloadsize*/ )
{}
- virtual bool progressPatchDownload( int /*value*/ )
+ /** \deprecated Unused since 2008 */
+ virtual ZYPP_DEPRECATED bool progressPatchDownload( int /*value*/ )
{ return true; }
- virtual void problemPatchDownload( const std::string &/*description*/ )
+ /** \deprecated Unused since 2008 */
+ virtual ZYPP_DEPRECATED void problemPatchDownload( const std::string &/*description*/ )
{}
- virtual void finishPatchDownload()
+ /** \deprecated Unused since 2008 */
+ virtual ZYPP_DEPRECATED void finishPatchDownload()
{}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.27.1/zypp/repo/PackageProvider.cc new/libzypp-14.27.2/zypp/repo/PackageProvider.cc
--- old/libzypp-14.27.1/zypp/repo/PackageProvider.cc 2014-07-01 11:30:28.000000000 +0200
+++ new/libzypp-14.27.2/zypp/repo/PackageProvider.cc 2014-08-29 14:49:37.000000000 +0200
@@ -10,6 +10,7 @@
*
*/
#include <iostream>
+#include <fstream>
#include <sstream>
#include "zypp/repo/PackageDelta.h"
#include "zypp/base/Logger.h"
@@ -23,6 +24,7 @@
#include "zypp/TmpPath.h"
#include "zypp/ZConfig.h"
#include "zypp/RepoInfo.h"
+#include "zypp/RepoManager.h"
using std::endl;
@@ -219,8 +221,37 @@
return ret; // <-- cache hit
}
- // HERE: cache misss, do download:
+ // HERE: cache misss, check toplevel cache or do download:
RepoInfo info = _package->repoInfo();
+
+ // Check toplevel cache
+ {
+ RepoManagerOptions topCache;
+ if ( info.packagesPath().dirname() != topCache.repoPackagesCachePath ) // not using toplevel cache
+ {
+ const OnMediaLocation & loc( _package->location() );
+ if ( ! loc.checksum().empty() ) // no cache hit without checksum
+ {
+ PathInfo pi( topCache.repoPackagesCachePath / info.packagesPath().basename() / loc.filename() );
+ if ( pi.isExist() && loc.checksum() == CheckSum( loc.checksum().type(), std::ifstream( pi.c_str() ) ) )
+ {
+ report()->start( _package, pi.path().asFileUrl() );
+ const Pathname & dest( info.packagesPath() / loc.filename() );
+ if ( filesystem::assert_dir( dest.dirname() ) == 0 && filesystem::hardlinkCopy( pi.path(), dest ) == 0 )
+ {
+ ret = ManagedFile( dest );
+ if ( ! info.keepPackages() )
+ ret.setDispose( filesystem::unlink );
+
+ MIL << "provided Package from toplevel cache " << _package << " at " << ret << endl;
+ report()->finish( _package, repo::DownloadResolvableReport::NO_ERROR, std::string() );
+ return ret; // <-- toplevel cache hit
+ }
+ }
+ }
+ }
+ }
+
// FIXME we only support the first url for now.
if ( info.baseUrlsEmpty() )
ZYPP_THROW(Exception("No url in repository."));
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org