SET(LIBZYPP_MAJOR "14")
SET(LIBZYPP_COMPATMINOR "30")
SET(LIBZYPP_MINOR "30")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_PATCH "2")
#
-# LAST RELEASED: 14.30.1 (30)
+# LAST RELEASED: 14.30.2 (30)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
BuildRequires: pkg-config
%endif
-BuildRequires: libsolv-devel >= 0.6.5
+BuildRequires: libsolv-devel >= 0.6.6
%if 0%{?suse_version} >= 1100
BuildRequires: libsolv-tools
%requires_eq libsolv-tools
-------------------------------------------------------------------
+Tue Nov 11 17:09:28 CET 2014 - ma@suse.de
+
+- Call rpm with '--noglob' (bnc#892431)
+- Downloader: unify workflow downloading a (signed) master index file
+- Fix iostream includes (fixes #34)
+- Explicitly call libsolv:pool_setdisttype (fixes #36)
+- version 14.30.2 (30)
+
+-------------------------------------------------------------------
+Sun Nov 9 01:13:17 CET 2014 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
+Sun Nov 2 01:14:10 CET 2014 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
Mon Oct 27 11:38:00 CET 2014 - ma@suse.de
- doc: add hint to code 12 pattern packages
/** \file zypp/Package.cc
*
*/
+#include <iostream>
#include <fstream>
#include "zypp/base/Logger.h"
#include <fstream>
#include "zypp/base/String.h"
#include "zypp/base/Logger.h"
-#include "zypp/base/Function.h"
-
-#include "zypp/Date.h"
+#include "zypp/base/Gettext.h"
#include "Downloader.h"
-#include "zypp/repo/MediaInfoDownloader.h"
-#include "zypp/base/UserRequestException.h"
+#include "zypp/KeyContext.h"
+#include "zypp/ZYppCallbacks.h"
using namespace std;
{
}
Downloader::Downloader(const RepoInfo & repoinfo) : _repoinfo(repoinfo)
-{
+{
}
Downloader::~Downloader()
{
WAR << "Non implemented" << endl;
}
+void Downloader::defaultDownloadMasterIndex( MediaSetAccess & media_r, const Pathname & destdir_r, const Pathname & masterIndex_r )
+{
+ Pathname sigpath = masterIndex_r.extend( ".asc" );
+ Pathname keypath = masterIndex_r.extend( ".key" );
+
+ SignatureFileChecker sigchecker;
+
+ enqueue( OnMediaLocation( sigpath, 1 ).setOptional( true ) );
+ start( destdir_r, media_r );
+ reset();
+
+ // only add the signature if it exists
+ if ( PathInfo(destdir_r / sigpath).isExist() )
+ sigchecker = SignatureFileChecker( destdir_r / sigpath );
+
+ enqueue( OnMediaLocation( keypath, 1 ).setOptional( true ) );
+ start( destdir_r, media_r );
+ reset();
+
+ KeyContext context;
+ context.setRepoInfo( repoInfo() );
+ // only add the key if it exists
+ if ( PathInfo(destdir_r / keypath).isExist() )
+ sigchecker.addPublicKey( destdir_r / keypath, context );
+ else
+ // set the checker context even if the key is not known (unsigned repo, key
+ // file missing; bnc #495977)
+ sigchecker.setKeyContext( context );
+
+ if ( ! repoInfo().gpgCheck() )
+ {
+ WAR << "Signature checking disabled in config of repository " << repoInfo().alias() << endl;
+ }
+ enqueue( OnMediaLocation( masterIndex_r, 1 ),
+ repoInfo().gpgCheck() ? FileChecker(sigchecker) : FileChecker(NullFileChecker()) );
+ start( destdir_r, media_r );
+ reset();
+}
+
+
}// ns repo
} // ns zypp
/**
* \short Downloader base class
*
- * a Downloader encapsulates all the knowledge of
+ * a Downloader encapsulates all the knowledge of
* which files have to be downloaded to the local disk.
*
*/
const RepoInfo & repoInfo() const { return _repoinfo; }
+ protected:
+ /** Common workflow downloading a (signed) master index file */
+ void defaultDownloadMasterIndex( MediaSetAccess & media_r, const Pathname & destdir_r, const Pathname & masterIndex_r );
+
private:
RepoInfo _repoinfo;
};
#include <fstream>
#include "zypp/base/LogTools.h"
+#include "zypp/base/Gettext.h"
#include "zypp/base/String.h"
#include "zypp/base/Regex.h"
#include "zypp/OnMediaLocation.h"
#include "zypp/parser/ParseException.h"
#include "zypp/parser/susetags/RepoIndex.h"
#include "zypp/base/UserRequestException.h"
-#include "zypp/KeyContext.h" // for SignatureFileChecker
using namespace std;
using namespace zypp::parser;
return Pathname();
}
+
+/** \todo: Downloading/sigcheck of master index shoudl be common in base class */
void Downloader::download( MediaSetAccess &media,
const Pathname &dest_dir,
const ProgressData::ReceiverFnc & progress )
{
downloadMediaInfo( dest_dir, media );
- SignatureFileChecker sigchecker/*(repoInfo().name())*/;
-
- Pathname sig = repoInfo().path() + "/content.asc";
-
- enqueue( OnMediaLocation( sig, 1 ).setOptional(true) );
- start( dest_dir, media );
- // only if there is a signature in the destination directory
- if ( PathInfo(dest_dir / sig ).isExist() )
- sigchecker = SignatureFileChecker( dest_dir + sig/*, repoInfo().name() */);
- reset();
-
- Pathname key = repoInfo().path() + "/content.key";
-
- enqueue( OnMediaLocation( key, 1 ).setOptional(true) );
- start( dest_dir, media );
-
- KeyContext context;
- context.setRepoInfo(repoInfo());
- // only if there is a key in the destination directory
- if ( PathInfo(dest_dir / key).isExist() )
- sigchecker.addPublicKey(dest_dir + key, context);
- // set the checker context even if the key is not known (unsigned repo, key
- // file missing; bnc #495977)
- else
- sigchecker.setKeyContext(context);
-
- reset();
-
- if ( ! repoInfo().gpgCheck() )
- {
- WAR << "Signature checking disabled in config of repository " << repoInfo().alias() << endl;
- }
- enqueue( OnMediaLocation( repoInfo().path() + "/content", 1 ),
- repoInfo().gpgCheck() ? FileChecker(sigchecker) : FileChecker(NullFileChecker()) );
- start( dest_dir, media );
- reset();
-
- Pathname descr_dir;
+ Pathname masterIndex( repoInfo().path() / "/content" );
+ defaultDownloadMasterIndex( media, dest_dir, masterIndex );
// Content file first to get the repoindex
{
- Pathname inputfile( dest_dir + repoInfo().path() + "/content" );
+ Pathname inputfile( dest_dir / masterIndex );
ContentFileReader content;
content.setRepoIndexConsumer( bind( &Downloader::consumeIndex, this, _1 ) );
content.parse( inputfile );
}
// Prepare parsing
- descr_dir = _repoindex->descrdir; // path below reporoot
+ Pathname descr_dir = _repoindex->descrdir; // path below reporoot
//_datadir = _repoIndex->datadir; // path below reporoot
std::map<std::string,RepoIndex::FileChecksumMap::const_iterator> availablePackageTranslations;
#include "zypp/base/Logger.h"
#include "zypp/base/Function.h"
-#include "zypp/Date.h"
-
#include "zypp/parser/yum/RepomdFileReader.h"
#include "zypp/parser/yum/PatchesFileReader.h"
#include "Downloader.h"
#include "zypp/repo/MediaInfoDownloader.h"
#include "zypp/base/UserRequestException.h"
#include "zypp/parser/xml/Reader.h"
-#include "zypp/KeyContext.h"
using namespace std;
using namespace zypp::xml;
return true;
}
+/** \todo: Downloading/sigcheck of master index shoudl be common in base class */
void Downloader::download( MediaSetAccess &media,
const Pathname &dest_dir,
const ProgressData::ReceiverFnc & progressrcv )
{
- Pathname repomdpath = repoInfo().path() + "/repodata/repomd.xml";
- Pathname keypath = repoInfo().path() + "/repodata/repomd.xml.key";
- Pathname sigpath = repoInfo().path() + "/repodata/repomd.xml.asc";
+ Pathname masterIndex( repoInfo().path() / "/repodata/repomd.xml" );
+ defaultDownloadMasterIndex( media, dest_dir, masterIndex );
_media_ptr = (&media);
-
- ProgressData progress;
- progress.sendTo(progressrcv);
- progress.toMin();
-
- //downloadMediaInfo( dest_dir, _media );
-
_dest_dir = dest_dir;
-
-#warning Do we need SignatureFileChecker(string descr)?
- SignatureFileChecker sigchecker/*(repoInfo().name())*/;
-
- this->enqueue( OnMediaLocation(sigpath,1).setOptional(true) );
- this->start( dest_dir, *_media_ptr);
- // only add the signature if it exists
- if ( PathInfo(dest_dir / sigpath).isExist() )
- sigchecker = SignatureFileChecker(dest_dir / sigpath);
- this->reset();
-
- this->enqueue( OnMediaLocation(keypath,1).setOptional(true) );
- this->start( dest_dir, *_media_ptr);
-
- KeyContext context;
- context.setRepoInfo(repoInfo());
- // only add the key if it exists
- if ( PathInfo(dest_dir / keypath).isExist() )
- sigchecker.addPublicKey(dest_dir + keypath, context);
- // set the checker context even if the key is not known (unsigned repo, key
- // file missing; bnc #495977)
- else
- sigchecker.setKeyContext(context);
-
- this->reset();
-
- if ( ! progress.tick() )
- ZYPP_THROW(AbortRequestException());
-
- if ( ! repoInfo().gpgCheck() )
- WAR << "Signature checking disabled in config of repository " << repoInfo().alias() << endl;
-
- this->enqueue( OnMediaLocation(repomdpath,1),
- repoInfo().gpgCheck() ? FileChecker(sigchecker) : FileChecker(NullFileChecker()) );
- this->start( dest_dir, *_media_ptr);
-
- if ( ! progress.tick() )
- ZYPP_THROW(AbortRequestException());
-
- this->reset();
-
- RepomdFileReader( dest_dir + repoInfo().path() + "/repodata/repomd.xml", bind( &Downloader::repomd_Callback, this, _1, _2));
+ RepomdFileReader( dest_dir / masterIndex, bind( &Downloader::repomd_Callback, this, _1, _2));
// ready, go!
- this->start( dest_dir, *_media_ptr);
- progress.toMax();
+ start( dest_dir, media );
}
}// ns yum
{
ZYPP_THROW( Exception( _("Can not create sat-pool.") ) );
}
+ // by now we support only a RPM backend
+ ::pool_setdisttype(_pool, DISTTYPE_RPM );
+
// initialialize logging
if ( env::LIBSOLV_DEBUGMASK() )
{
/** \file zypp/target/TargetCallbackReceiver.cc
*
*/
+#include <iostream>
#include "zypp/target/TargetCallbackReceiver.h"
opts.push_back("-U");
opts.push_back("--percent");
+ opts.push_back("--noglob");
// ZConfig defines cross-arch installation
if ( ! ZConfig::instance().systemArchitecture().compatibleWith( ZConfig::instance().defaultSystemArchitecture() ) )