Hello community,
here is the log from the commit of package libzypp
checked in at Mon Aug 27 17:08:02 CEST 2007.
--------
--- libzypp/libzypp.changes 2007-08-23 16:26:58.000000000 +0200
+++ /mounts/work_src_done/STABLE/libzypp/libzypp.changes 2007-08-26 16:27:53.794037000 +0200
@@ -1,0 +2,21 @@
+Sun Aug 26 15:49:27 CEST 2007 - kkaempf@suse.de
+
+- pass location to plaindir package (#303751)
+- Add name of file in question to checksum/signature related
+ exceptions.
+- pass basename of file to verifyFileSignatureWorkflow (instead of
+ empty string).
+- filter out incompatible architectures when parsing sustags
+ repos (first half of #301286)
+- r 6882
+
+-------------------------------------------------------------------
+Fri Aug 24 11:52:27 CEST 2007 - duncan@suse.de
+
+- don't run source migration if yast is running in
+ intsys mode (#297136)
+- signature and checksum verification fixes. Still pending
+ problem ZYpp getting no output from gpg when running from zypper.
+ (#302059)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.b30743/_old 2007-08-27 17:07:24.000000000 +0200
+++ /var/tmp/diff_new_pack.b30743/_new 2007-08-27 17:07:24.000000000 +0200
@@ -17,7 +17,7 @@
Autoreqprov: on
Summary: Package, Patch, Pattern, and Product Management
Version: 3.18.4
-Release: 1
+Release: 4
Source: libzypp-3.18.4.tar.bz2
Source1: libzypp-rpmlintrc
Prefix: /usr
@@ -125,6 +125,21 @@
%{_libdir}/pkgconfig/libzypp.pc
%changelog
+* Sun Aug 26 2007 - kkaempf@suse.de
+- pass location to plaindir package (#303751)
+- Add name of file in question to checksum/signature related
+ exceptions.
+- pass basename of file to verifyFileSignatureWorkflow (instead of
+ empty string).
+- filter out incompatible architectures when parsing sustags
+ repos (first half of #301286)
+- r 6882
+* Fri Aug 24 2007 - duncan@suse.de
+- don't run source migration if yast is running in
+ intsys mode (#297136)
+- signature and checksum verification fixes. Still pending
+ problem ZYpp getting no output from gpg when running from zypper.
+ (#302059)
* Thu Aug 23 2007 - schubi@suse.de
- Do not strip resolvables which have the same name but different kind
(ResolverInfo*)
++++++ libzypp-3.18.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/package/libzypp.changes new/libzypp-3.18.4/package/libzypp.changes
--- old/libzypp-3.18.4/package/libzypp.changes 2007-08-23 16:08:43.000000000 +0200
+++ new/libzypp-3.18.4/package/libzypp.changes 2007-08-26 16:26:51.000000000 +0200
@@ -1,4 +1,25 @@
-------------------------------------------------------------------
+Sun Aug 26 15:49:27 CEST 2007 - kkaempf@suse.de
+
+- pass location to plaindir package (#303751)
+- Add name of file in question to checksum/signature related
+ exceptions.
+- pass basename of file to verifyFileSignatureWorkflow (instead of
+ empty string).
+- filter out incompatible architectures when parsing sustags
+ repos (first half of #301286)
+- r 6882
+
+-------------------------------------------------------------------
+Fri Aug 24 11:52:27 CEST 2007 - duncan@suse.de
+
+- don't run source migration if yast is running in
+ intsys mode (#297136)
+- signature and checksum verification fixes. Still pending
+ problem ZYpp getting no output from gpg when running from zypper.
+ (#302059)
+
+-------------------------------------------------------------------
Thu Aug 23 13:51:41 CEST 2007 - schubi@suse.de
- Do not strip resolvables which have the same name but different kind
@@ -30,12 +51,12 @@
proper errmessage.
- Testcase : solution-tests/vendor-test.xml
- r 6812
+- 3.18.4
-------------------------------------------------------------------
-Tue Aug 21 15:59:48 CEST 2007 - dmacvicar@suse.de
+Tue Aug 21 15:38:08 CEST 2007 - dmacvicar@suse.de
-- Don't download files listed in tag HASH (#300982)
-- 3.18.4
+- ignore HASH key for download (#300982)
-------------------------------------------------------------------
Tue Aug 21 15:17:23 CEST 2007 - schubi@suse.de
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/repo/susetags/CMakeLists.txt new/libzypp-3.18.4/tests/repo/susetags/CMakeLists.txt
--- old/libzypp-3.18.4/tests/repo/susetags/CMakeLists.txt 2007-08-23 16:08:41.000000000 +0200
+++ new/libzypp-3.18.4/tests/repo/susetags/CMakeLists.txt 2007-08-26 16:26:51.000000000 +0200
@@ -1,4 +1,7 @@
-ADD_EXECUTABLE( Downloader Downloader_test.cc )
+ADD_EXECUTABLE(
+ Downloader
+ Downloader_test.cc
+)
TARGET_LINK_LIBRARIES( Downloader zypp boost_unit_test_framework )
ADD_TEST(Downloader ${CMAKE_CURRENT_BINARY_DIR}/Downloader ${CMAKE_CURRENT_SOURCE_DIR}/data )
\ No newline at end of file
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/repo/susetags/data/stable-x86-subset/content.asc new/libzypp-3.18.4/tests/repo/susetags/data/stable-x86-subset/content.asc
--- old/libzypp-3.18.4/tests/repo/susetags/data/stable-x86-subset/content.asc 2007-08-23 16:08:42.000000000 +0200
+++ new/libzypp-3.18.4/tests/repo/susetags/data/stable-x86-subset/content.asc 2007-08-26 16:26:51.000000000 +0200
@@ -1,32 +1,7 @@
------BEGIN PGP MESSAGE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.9.22 (GNU/Linux)
-owGdVjuPG1UU3iRCIEsUaaCguYIiEort+35EvLxr70Mx6+CxQ6BZ3eeuWXtsecba
-3TR0CLr0FKmJhKBBoqZBlCAigQQVLRI/AAlxZr1LvAEUKZI9V55zvu/e833njOfe
-81fWLl/99Pdvvvr1S3X70ufPRfesn+ZlzMvN7+69cavfaw83Bmg6i3k2zDr1ZH05
-nZ/Ubnf62U5vFxHcYLX2TjY4z8wWkNUd5YvjejZorXc79TtanmasQGiD0xWq3Xav
-jyp61N3ZHd5Bt+bTsPBlgbYmbvs62l3Eee7ifP862orzic1Pav1Od7c36GTDfhcd
-lOXsRrN5dHTUKBZFbPjppDmP43xaxqI5Ylo2z0/f3GxtDHr996pwtEWsn+Y05rNJ
-rdXf2G4ca7knOTpbRlJLNBLVhVcXYE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+zfXaHg
-1uoQg2QAkNFrIQ22gtgkK4dTijCCUDHMTfVfPp+OG8eT8QoelCCJKJgYnrAPLHmY
-JJgBoqpWhA5TyRtBYfpHeVHa8dhWj6THSKSGSQfXwMtKIE2j1ozDSWDlNoH+ShCq
-YXgmMYxsgzRHeZo2yuOyVvv4zSvPrFUvGOdvHlcv7369dv/mg2voz8/ev/Ti7R+u
-vfyFunb8x88frd133z544eFPv3y49v3ll1595bcf//rkrYd/Aw==
-=/aaM
------END PGP MESSAGE-----
+iD8DBQBGzZ7Im+zCtd2wN1YRAvQ2AJ9S5chSnjnFR0P2IZO7485uodmb1QCeJzuj
+Ta+M4yWexFiqyaFmWRjdAuQ=
+=lrpc
+-----END PGP SIGNATURE-----
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/repo/susetags/data/stable-x86-subset-gz/content.asc new/libzypp-3.18.4/tests/repo/susetags/data/stable-x86-subset-gz/content.asc
--- old/libzypp-3.18.4/tests/repo/susetags/data/stable-x86-subset-gz/content.asc 2007-08-23 16:08:42.000000000 +0200
+++ new/libzypp-3.18.4/tests/repo/susetags/data/stable-x86-subset-gz/content.asc 2007-08-26 16:26:51.000000000 +0200
@@ -1,32 +1,7 @@
------BEGIN PGP MESSAGE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.9.22 (GNU/Linux)
-owGdlsuLI1UUxtsZRAkozMaNm4sLQZxU7vvRjkjSST8wdsZUMs64ae4zHTupCqkK
-3T1LF4PuZi+I4MKV6MY/QBcD7gSX4sqtGxFEXHkr6XaSVhkYSKpInXN+de93vlOp
-hy9c37p245Nfv/vm56/FnWe+fP7UPGfzrPRZufv9w+ntfq893BmAfOazdJh26kHb
-Mp+f1+50+ulB7xAgmJBa+yAdXGami5jVHWeLs3o6aLa6nfpdyZcZayU4oXgNddju
-9UGFB92Dw+FdcHueu4UtC7A3Nfs3weHCzzPj56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r6xQ6CTnxV/bOSEQpT5APwlAcZWBRDGOocgpRrIQ00Spsg6mRQjhaPK6T
-ayiVWjL3m+n+hW8ENsQGITCXgXIfRzB+NWdEwcjnxBqFvIqCTsY2Pi98Uup5ZZ3H
-CKq1dN5xEgu4t5JxBTVDOvCqwyHEoYotqgao+nef55PkbDpZq49KxIEX1gsaoHUk
-WE1lNXqismJ0mAhWMewAGGdFqScTXT2krkC4dMrErsVeVgJJ7KUkNK4knqkOUX/B
-EJYCgKl3Y52gxjgLeVKelbXaR29df3areuW4fBe5ce2Hl7c+fe2P7Qfdvx7RVz9P
-XvntpW97b4wfgK3PPvzqxdGDax8//OLR77+8//pPZ7daf/74Nw==
-=3cih
------END PGP MESSAGE-----
+iD8DBQBGzZ7Vm+zCtd2wN1YRAvrYAJ4or9MtpTiRk57EiGkd3YBvgoIN5QCfX969
+j0d5j3iteCP3nR/N39nrdMo=
+=w2Lh
+-----END PGP SIGNATURE-----
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/repo/susetags/Downloader_test.cc new/libzypp-3.18.4/tests/repo/susetags/Downloader_test.cc
--- old/libzypp-3.18.4/tests/repo/susetags/Downloader_test.cc 2007-08-23 16:08:41.000000000 +0200
+++ new/libzypp-3.18.4/tests/repo/susetags/Downloader_test.cc 2007-08-26 16:26:51.000000000 +0200
@@ -13,6 +13,7 @@
#include "zypp/TmpPath.h"
#include "zypp/repo/susetags/Downloader.h"
+#include "tests/zypp/KeyRingTestReceiver.h"
using std::cout;
using std::endl;
@@ -24,6 +25,9 @@
void susetags_download_test(const string &dir)
{
+ KeyRingTestReceiver keyring_callbacks;
+ keyring_callbacks.answerTrustKey(true);
+
Pathname p = dir + "/stable-x86-subset";
Url url("dir:" + p.asString());
MediaSetAccess media(url);
@@ -77,6 +81,9 @@
void susetags_gz_download_test(const string &dir)
{
+ KeyRingTestReceiver keyring_callbacks;
+ keyring_callbacks.answerTrustKey(true);
+
Pathname p = dir + "/stable-x86-subset-gz";
Url url("dir:" + p.asString());
MediaSetAccess media(url);
Files old/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/primary.xml.gz and new/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/primary.xml.gz differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/repomd.xml new/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/repomd.xml
--- old/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/repomd.xml 2007-08-23 16:08:41.000000000 +0200
+++ new/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/repomd.xml 2007-08-26 16:26:51.000000000 +0200
@@ -14,7 +14,7 @@
</data>
<data type="primary">
<location href="repodata/primary.xml.gz"/>
- <checksum type="sha">3b8d548402966490f6679b9ef01d5786d75d3332</checksum>
+ <checksum type="sha">73588a1c655a58b2251146675ab64cce8cb45a26</checksum>
<timestamp>1176468284</timestamp>
<open-checksum type="sha">68e66f72b932235eeee5d5638d3cba2ec674c208</open-checksum>
</data>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/repomd.xml.asc new/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/repomd.xml.asc
--- old/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/repomd.xml.asc 2007-08-23 16:08:41.000000000 +0200
+++ new/libzypp-3.18.4/tests/repo/yum/data/10.2-updates-subset/repodata/repomd.xml.asc 2007-08-26 16:26:51.000000000 +0200
@@ -1,7 +1,7 @@
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
+Version: GnuPG v1.9.22 (GNU/Linux)
-iD8DBQBGI2e8m+zCtd2wN1YRAiG0AJ9//Mi7mEKglR1x6s7Cg5peOWjxAwCeP5R6
-/nO1uU76r8SdVOGew9itD+M=
-=+B+Z
+iD8DBQBGzqIbm+zCtd2wN1YRAslJAJ9eQ+6wpaKRVkr5nrQ4vij6ge0QpgCfRoT2
+clYiEftDMuaEpZeRaBQodyc=
+=I83X
-----END PGP SIGNATURE-----
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/repo/yum/YUMDownloader_test.cc new/libzypp-3.18.4/tests/repo/yum/YUMDownloader_test.cc
--- old/libzypp-3.18.4/tests/repo/yum/YUMDownloader_test.cc 2007-08-23 16:08:41.000000000 +0200
+++ new/libzypp-3.18.4/tests/repo/yum/YUMDownloader_test.cc 2007-08-26 16:26:51.000000000 +0200
@@ -7,12 +7,12 @@
#include
#include
+#include "zypp/base/Logger.h"
#include "zypp/Url.h"
#include "zypp/PathInfo.h"
#include "zypp/TmpPath.h"
#include "zypp/repo/yum/Downloader.h"
-
using std::cout;
using std::endl;
using std::string;
@@ -21,8 +21,13 @@
using namespace zypp::repo;
+#include "tests/zypp/KeyRingTestReceiver.h"
+
void yum_download_test(const string &dir)
{
+ KeyRingTestReceiver keyring_callbacks;
+ keyring_callbacks.answerTrustKey(true);
+
Pathname p = dir + "/10.2-updates-subset";
Url url("dir:" + p.asString());
MediaSetAccess media(url);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/zypp/KeyRing.cc new/libzypp-3.18.4/tests/zypp/KeyRing.cc
--- old/libzypp-3.18.4/tests/zypp/KeyRing.cc 2007-08-23 16:08:42.000000000 +0200
+++ new/libzypp-3.18.4/tests/zypp/KeyRing.cc 2007-08-26 16:26:51.000000000 +0200
@@ -28,6 +28,8 @@
{
PublicKey key( Pathname(dir) + "public.asc" );
+
+
/**
* scenario #1
* import a not trusted key
@@ -40,7 +42,7 @@
// base sandbox for playing
TmpDir tmp_dir;
KeyRing keyring( tmp_dir.path() );
-
+
BOOST_CHECK_EQUAL( keyring.publicKeys().size(), (unsigned) 0 );
BOOST_CHECK_EQUAL( keyring.trustedPublicKeys().size(), (unsigned) 0 );
@@ -189,6 +191,20 @@
//keyring.importKey( key, true );
//BOOST_CHECK_EQUAL( receiver._trusted_key_added_called, true );
//BOOST_CHECK_EQUAL( keyring.trustedPublicKeys().size(), 1 );
+
+ /* check signature id can be extracted */
+ {
+ KeyRingTestReceiver keyring_callbacks;
+ KeyRingTestSignalReceiver receiver;
+ // base sandbox for playing
+ TmpDir tmp_dir;
+ KeyRing keyring( tmp_dir.path() );
+
+ BOOST_CHECK_EQUAL( keyring.readSignatureKeyId( Pathname(dir) + "repomd.xml.asc" ), "BD61D89BD98821BE" );
+ BOOST_CHECK_THROW( keyring.readSignatureKeyId(Pathname()), Exception );
+ TmpFile tmp;
+ BOOST_CHECK_EQUAL( keyring.readSignatureKeyId(tmp.path()), "" );
+ }
}
test_suite*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tools/migrate-sources/migrate-sources.cc new/libzypp-3.18.4/tools/migrate-sources/migrate-sources.cc
--- old/libzypp-3.18.4/tools/migrate-sources/migrate-sources.cc 2007-08-23 16:08:43.000000000 +0200
+++ new/libzypp-3.18.4/tools/migrate-sources/migrate-sources.cc 2007-08-26 16:26:51.000000000 +0200
@@ -35,12 +35,22 @@
static void migrate_sources( const Options &opt )
{
+ if ( string(getenv("YAST_IS_RUNNING")) == "instsys" )
+ {
+ MIL << "YaST is running in instsys. Not migrating old sources. YaST will do it." << endl;
+ return;
+ }
+ else
+ {
+ MIL << "YaST not running in instsys." << endl;
+ }
+
zypp::zypp_readonly_hack::IWantIt();
ZYpp::Ptr Z = zypp::getZYpp();
RepoManager manager;
Pathname source_p = opt.root + opt.sources_dir;
-
+
if ( ! PathInfo(source_p).isExist() )
{
cout << "No sources to migrate." << endl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/Fetcher.cc new/libzypp-3.18.4/zypp/Fetcher.cc
--- old/libzypp-3.18.4/zypp/Fetcher.cc 2007-08-23 16:08:35.000000000 +0200
+++ new/libzypp-3.18.4/zypp/Fetcher.cc 2007-08-26 16:26:52.000000000 +0200
@@ -13,6 +13,7 @@
#include <list>
#include "zypp/base/Logger.h"
+#include "zypp/base/PtrTypes.h"
#include "zypp/base/DefaultIntegral.h"
#include "zypp/Fetcher.h"
#include "zypp/base/UserRequestException.h"
@@ -32,13 +33,21 @@
FetcherJob( const OnMediaLocation &loc )
: location(loc)
{
+ //MIL << location << endl;
+ }
+ ~FetcherJob()
+ {
+ //MIL << location << " | * " << checkers.size() << endl;
}
OnMediaLocation location;
- CompositeFileChecker checkers;
+ //CompositeFileChecker checkers;
+ list<FileChecker> checkers;
};
+ typedef shared_ptr<FetcherJob> FetcherJob_Ptr;
+
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Fetcher::Impl
@@ -70,7 +79,7 @@
Impl * clone() const
{ return new Impl( *this ); }
- std::list<FetcherJob> _resources;
+ std::list _resources;
std::list<Pathname> _caches;
};
///////////////////////////////////////////////////////////////////
@@ -78,17 +87,22 @@
void Fetcher::Impl::enqueueDigested( const OnMediaLocation &resource, const FileChecker &checker )
{
- CompositeFileChecker composite;
- composite.add(ChecksumFileChecker(resource.checksum()));
- composite.add(checker);
- enqueue(resource, composite);
+ FetcherJob_Ptr job;
+ job.reset(new FetcherJob(resource));
+ ChecksumFileChecker digest_check(resource.checksum());
+ job->checkers.push_back(digest_check);
+ if ( checker )
+ job->checkers.push_back(checker);
+ _resources.push_back(job);
}
void Fetcher::Impl::enqueue( const OnMediaLocation &resource, const FileChecker &checker )
{
- FetcherJob job(resource);
- job.checkers.add(checker);
- _resources.push_back(resource);
+ FetcherJob_Ptr job;
+ job.reset(new FetcherJob(resource));
+ if ( checker )
+ job->checkers.push_back(checker);
+ _resources.push_back(job);
}
void Fetcher::Impl::reset()
@@ -118,25 +132,25 @@
ProgressData progress(_resources.size());
progress.sendTo(progress_receiver);
- for ( list<FetcherJob>::const_iterator it_res = _resources.begin(); it_res != _resources.end(); ++it_res )
+ for ( list::const_iterator it_res = _resources.begin(); it_res != _resources.end(); ++it_res )
{
bool got_from_cache = false;
for ( list<Pathname>::const_iterator it_cache = _caches.begin(); it_cache != _caches.end(); ++it_cache )
{
// does the current file exists in the current cache?
- Pathname cached_file = *it_cache + (*it_res).location.filename();
+ Pathname cached_file = *it_cache + (*it_res)->location.filename();
if ( PathInfo( cached_file ).isExist() )
{
// check the checksum
- if ( is_checksum( cached_file, (*it_res).location.checksum() ) && (! (*it_res).location.checksum().empty() ) )
+ if ( is_checksum( cached_file, (*it_res)->location.checksum() ) && (! (*it_res)->location.checksum().empty() ) )
{
// cached
- MIL << "file " << (*it_res).location.filename() << " found in previous cache. Using cached copy." << endl;
+ MIL << "file " << (*it_res)->location.filename() << " found in previous cache. Using cached copy." << endl;
// checksum is already checked.
// we could later implement double failover and try to download if file copy fails.
// replicate the complete path in the target directory
- Pathname dest_full_path = dest_dir + (*it_res).location.filename();
+ Pathname dest_full_path = dest_dir + (*it_res)->location.filename();
if ( assert_dir( dest_full_path.dirname() ) != 0 )
ZYPP_THROW( Exception("Can't create " + dest_full_path.dirname().asString()));
@@ -159,8 +173,8 @@
// try to get the file from the net
try
{
- Pathname tmp_file = media.provideFile((*it_res).location);
- Pathname dest_full_path = dest_dir + (*it_res).location.filename();
+ Pathname tmp_file = media.provideFile((*it_res)->location);
+ Pathname dest_full_path = dest_dir + (*it_res)->location.filename();
if ( assert_dir( dest_full_path.dirname() ) != 0 )
ZYPP_THROW( Exception("Can't create " + dest_full_path.dirname().asString()));
if ( filesystem::copy(tmp_file, dest_full_path ) != 0 )
@@ -172,10 +186,10 @@
}
catch (const Exception & excpt_r)
{
- ZYPP_CAUGHT(excpt_r);
- Exception nexcpt("Can't provide " + (*it_res).location.filename().asString() + " : " + excpt_r.msg());
- nexcpt.remember(excpt_r);
- ZYPP_THROW(nexcpt);
+ ZYPP_CAUGHT(excpt_r);
+ Exception nexcpt("Can't provide " + (*it_res)->location.filename().asString() + " : " + excpt_r.msg());
+ nexcpt.remember(excpt_r);
+ ZYPP_THROW(nexcpt);
}
}
else
@@ -186,10 +200,24 @@
}
// no matter where did we got the file, try to validate it:
- Pathname localfile = dest_dir + (*it_res).location.filename();
+ Pathname localfile = dest_dir + (*it_res)->location.filename();
// call the checker function
try {
- (*it_res).checkers(localfile);
+ MIL << "Checking job [" << localfile << "] (" << (*it_res)->checkers.size() << " checkers )" << endl;
+ for ( list<FileChecker>::const_iterator it = (*it_res)->checkers.begin();
+ it != (*it_res)->checkers.end();
+ ++it )
+ {
+ if (*it)
+ {
+ (*it)(localfile);
+ }
+ else
+ {
+ ERR << "Invalid checker for '" << localfile << "'" << endl;
+ }
+ }
+
}
catch ( const FileCheckException &e )
{
@@ -201,7 +229,7 @@
}
catch (...)
{
- ZYPP_THROW(Exception("Unknown error while validating " + (*it_res).location.filename().asString()));
+ ZYPP_THROW(Exception("Unknown error while validating " + (*it_res)->location.filename().asString()));
}
if ( ! progress.incr() )
@@ -240,7 +268,7 @@
void Fetcher::enqueueDigested( const OnMediaLocation &resource, const FileChecker &checker )
{
- _pimpl->enqueue(resource, checker);
+ _pimpl->enqueueDigested(resource, checker);
}
void Fetcher::enqueue( const OnMediaLocation &resource, const FileChecker &checker )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/Fetcher.h new/libzypp-3.18.4/zypp/Fetcher.h
--- old/libzypp-3.18.4/zypp/Fetcher.h 2007-08-23 16:08:34.000000000 +0200
+++ new/libzypp-3.18.4/zypp/Fetcher.h 2007-08-26 16:26:53.000000000 +0200
@@ -82,7 +82,7 @@
*
*/
void enqueue( const OnMediaLocation &resource,
- const FileChecker &checker = NullFileChecker() );
+ const FileChecker &checker = FileChecker() );
/**
* Enqueue a object for transferal, they will not
@@ -96,7 +96,7 @@
* \todo FIXME implement checker == operator to avoid this.
*/
void enqueueDigested( const OnMediaLocation &resource,
- const FileChecker &checker = NullFileChecker() );
+ const FileChecker &checker = FileChecker() );
/**
* adds a directory to the list of directories
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/FileChecker.cc new/libzypp-3.18.4/zypp/FileChecker.cc
--- old/libzypp-3.18.4/zypp/FileChecker.cc 2007-08-23 16:08:34.000000000 +0200
+++ new/libzypp-3.18.4/zypp/FileChecker.cc 2007-08-26 16:26:52.000000000 +0200
@@ -29,6 +29,7 @@
void ChecksumFileChecker::operator()( const Pathname &file ) const
{
+ MIL << "checking " << file << " file against checksum '" << _checksum << "'" << endl;
callback::SendReport<DigestReport> report;
CheckSum real_checksum( _checksum.type(), filesystem::checksum( file, _checksum.type() ));
@@ -42,7 +43,7 @@
}
else
{
- ZYPP_THROW(FileCheckException("No checksum available"));
+ ZYPP_THROW( FileCheckException( "No checksum available for " + file.basename() ) );
}
}
else
@@ -56,7 +57,7 @@
}
else
{
- ZYPP_THROW(FileCheckException("Wrong checksum"));
+ ZYPP_THROW( FileCheckException( "Wrong checksum for " + file.basename() ) );
}
}
}
@@ -64,20 +65,33 @@
void NullFileChecker::operator()(const Pathname &file ) const
{
+ MIL << "+ null check on " << file << endl;
return;
}
void CompositeFileChecker::operator()(const Pathname &file ) const
{
+ //MIL << _checkers.size() << " checkers" << endl;
for ( list<FileChecker>::const_iterator it = _checkers.begin(); it != _checkers.end(); ++it )
{
- (*it)(file);
+ if ( *it )
+ {
+ //MIL << "+ chk" << endl;
+ (*it)(file);
+ }
+ else
+ {
+ ERR << "Invalid checker" << endl;
+ }
}
}
void CompositeFileChecker::add( const FileChecker &checker )
{
+ //MIL << "||# " << _checkers.size() << endl;
_checkers.push_back(checker);
+ //MIL << "||* " << _checkers.size() << endl;
+
}
SignatureFileChecker::SignatureFileChecker( const Pathname &signature )
@@ -98,10 +112,16 @@
void SignatureFileChecker::operator()(const Pathname &file ) const
{
ZYpp::Ptr z = getZYpp();
+
+ if ( (! PathInfo(_signature).isExist()) && (!_signature.empty()))
+ {
+ ZYPP_THROW(FileCheckException("Signature " + _signature.asString() + " not found."));
+ }
+
MIL << "checking " << file << " file validity using digital signature.." << endl;
- bool valid = z->keyRing()->verifyFileSignatureWorkflow( file, string(), _signature);
+ bool valid = z->keyRing()->verifyFileSignatureWorkflow( file, file.basename(), _signature);
if (!valid)
- ZYPP_THROW(FileCheckException("Signature verification failed"));
+ ZYPP_THROW( FileCheckException( "Signature verification failed for " + file.basename() ) );
}
/******************************************************************
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/FileChecker.h new/libzypp-3.18.4/zypp/FileChecker.h
--- old/libzypp-3.18.4/zypp/FileChecker.h 2007-08-23 16:08:39.000000000 +0200
+++ new/libzypp-3.18.4/zypp/FileChecker.h 2007-08-26 16:26:52.000000000 +0200
@@ -145,6 +145,8 @@
* \throws FileCheckException if validation fails
*/
void operator()( const Pathname &file ) const;
+
+ int checkersSize() const { return _checkers.size(); }
private:
std::list<FileChecker> _checkers;
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/KeyRing.cc new/libzypp-3.18.4/zypp/KeyRing.cc
--- old/libzypp-3.18.4/zypp/KeyRing.cc 2007-08-23 16:08:36.000000000 +0200
+++ new/libzypp-3.18.4/zypp/KeyRing.cc 2007-08-26 16:26:53.000000000 +0200
@@ -534,7 +534,10 @@
string KeyRing::Impl::readSignatureKeyId(const Pathname &signature )
{
- MIL << "Deetermining key id if signature " << signature << endl;
+ if ( ! PathInfo(signature).isFile() )
+ ZYPP_THROW(Exception("Signature file " + signature.asString() + " not found"));
+
+ MIL << "Determining key id if signature " << signature << endl;
// HACK create a tmp keyring with no keys
TmpDir dir(_base_dir, "fake-keyring");
TmpFile fakeData(_base_dir, "fake-data");
@@ -574,7 +577,17 @@
id = what[1];
//dumpRegexpResults(what);
}
+ else
+ {
+ MIL << "'" << line << "'" << endl;
+ }
}
+
+ if ( count == 0 )
+ {
+ MIL << "no output" << endl;
+ }
+
MIL << "Determined key id [" << id << "] for signature " << signature << endl;
prog.close();
return id;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/media/MediaDIR.cc new/libzypp-3.18.4/zypp/media/MediaDIR.cc
--- old/libzypp-3.18.4/zypp/media/MediaDIR.cc 2007-08-23 16:08:40.000000000 +0200
+++ new/libzypp-3.18.4/zypp/media/MediaDIR.cc 2007-08-26 16:26:52.000000000 +0200
@@ -28,7 +28,7 @@
// CLASS NAME : MediaDIR
//
///////////////////////////////////////////////////////////////////
-
+
///////////////////////////////////////////////////////////////////
//
//
@@ -84,7 +84,7 @@
else
{
ZYPP_THROW(MediaBadUrlException(url(),
- "Specified path '" + url().getPathName() + "' is and not allowed as media source"
+ "Specified path '" + url().getPathName() + "' is not allowed as media source"
));
}
}
@@ -178,7 +178,7 @@
bool MediaDIR::getDoesFileExist( const Pathname & filename ) const
{
return MediaHandler::getDoesFileExist( filename );
- }
-
+ }
+
} // namespace media
} // namespace zypp
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/plaindir/RepoParser.cc new/libzypp-3.18.4/zypp/parser/plaindir/RepoParser.cc
--- old/libzypp-3.18.4/zypp/parser/plaindir/RepoParser.cc 2007-08-23 16:08:37.000000000 +0200
+++ new/libzypp-3.18.4/zypp/parser/plaindir/RepoParser.cc 2007-08-26 16:26:52.000000000 +0200
@@ -136,7 +136,10 @@
// TranslatedText delnotify;
// RecordId repository;
-// Location repositoryLocation;
+// Location repositoryLocation;
+
+ pkg->repositoryLocation = location;
+
// std::string group;
// std::setstd::string keywords;
// Changelog changelog;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/susetags/ContentFileReader.cc new/libzypp-3.18.4/zypp/parser/susetags/ContentFileReader.cc
--- old/libzypp-3.18.4/zypp/parser/susetags/ContentFileReader.cc 2007-08-23 16:08:37.000000000 +0200
+++ new/libzypp-3.18.4/zypp/parser/susetags/ContentFileReader.cc 2007-08-26 16:26:52.000000000 +0200
@@ -382,7 +382,7 @@
pos != std::string::npos;
pos = value.find("%a") )
{
- value.replace( pos, 2, ZConfig::instance().systemArchitecture().asString() );
+ value.replace( pos, 2, sysarch.asString() );
}
try
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc new/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc
--- old/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc 2007-08-23 16:08:37.000000000 +0200
+++ new/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc 2007-08-26 16:26:52.000000000 +0200
@@ -11,6 +11,7 @@
*/
#include <iostream>
#include "zypp/base/Logger.h"
+#include "zypp/ZConfig.h"
#include "zypp/parser/susetags/PackagesFileReader.h"
#include "zypp/parser/susetags/FileReaderBaseImpl.h"
@@ -36,9 +37,12 @@
/** PackagesFileReader implementation. */
class PackagesFileReader::Impl : public BaseImpl
{
+ private:
+ Arch _sysarch;
public:
Impl( const PackagesFileReader & parent_r )
: BaseImpl( parent_r )
+ , _sysarch( ZConfig::instance().systemArchitecture() )
{}
virtual ~Impl()
@@ -91,13 +95,25 @@
}
else
{
- ++_c_pkg;
- _data = _pkgData = new data::Package;
+ Arch pkgarch( words[3] );
+ if ( pkgarch.compatibleWith( _sysarch ) )
+ {
+ ++_c_pkg;
+ _data = _pkgData = new data::Package;
+ _data->arch = Arch( words[3] );
+ }
+ else
+ {
+ _data = _pkgData = 0;
+ }
_srcpkgData = 0;
- _data->arch = Arch( words[3] );
}
- _data->name = words[0];
- _data->edition = Edition( words[1],words[2] );
+
+ if (_data)
+ {
+ _data->name = words[0];
+ _data->edition = Edition( words[1],words[2] );
+ }
}
/** Consume =Cks:. */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/yum/PrimaryFileReader.cc new/libzypp-3.18.4/zypp/parser/yum/PrimaryFileReader.cc
--- old/libzypp-3.18.4/zypp/parser/yum/PrimaryFileReader.cc 2007-08-23 16:08:36.000000000 +0200
+++ new/libzypp-3.18.4/zypp/parser/yum/PrimaryFileReader.cc 2007-08-26 16:26:52.000000000 +0200
@@ -10,6 +10,7 @@
* Implementation of primary.xml.gz file reader.
*/
#include "zypp/base/Logger.h"
+#include "zypp/ZConfig.h"
#include "zypp/parser/xml/Reader.h"
#include "zypp/data/ResolvableData.h"
@@ -87,6 +88,11 @@
* Progress reporting object.
*/
ProgressData _ticks;
+
+ /**
+ * system architecture, to filter out incompatible packages
+ */
+ Arch _sysarch;
};
///////////////////////////////////////////////////////////////////////////
@@ -97,6 +103,7 @@
const ProgressData::ReceiverFnc & progress)
:
_callback(callback)
+ , _sysarch( ZConfig::instance().systemArchitecture() )
{
_ticks.sendTo(progress);
@@ -126,7 +133,7 @@
return true;
}
- // xpath: /metdata/package (+)
+ // xpath: /metadata/package (+)
if (reader_r->name() == "package")
{
tag(tag_package);
@@ -139,12 +146,14 @@
else if ( reader_r->nodeType() == XML_READER_TYPE_END_ELEMENT )
{
- // xpath: /metdata/package (+)
+ // xpath: /metadata/package (+)
if (reader_r->name() == "package")
{
- if (_package && _callback)
+ if (_package && _callback
+ && _package->arch.compatibleWith( _sysarch ))
+ {
_callback(handoutPackage());
-
+ }
if (!_ticks.incr())
ZYPP_THROW(AbortRequestException());
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/target/store/XMLFilesBackend.cc new/libzypp-3.18.4/zypp/target/store/XMLFilesBackend.cc
--- old/libzypp-3.18.4/zypp/target/store/XMLFilesBackend.cc 2007-08-23 16:08:37.000000000 +0200
+++ new/libzypp-3.18.4/zypp/target/store/XMLFilesBackend.cc 2007-08-26 16:26:52.000000000 +0200
@@ -527,7 +527,7 @@
}
catch( std::exception &e )
{
- ZYPP_THROW (Exception( "Can't write flags to store") );
+ ZYPP_THROW(Exception("Can't write flags to store"));
}
updateTimestamp();
}
@@ -672,7 +672,8 @@
break;
}
}
- catch (const Exception & excpt_r) {
+ catch (const Exception & excpt_r)
+ {
ZYPP_CAUGHT( excpt_r );
WAR << "Skipping invalid patch file " << file_path << endl;
}
@@ -872,7 +873,9 @@
catch (const Exception & excpt_r)
{
ZYPP_CAUGHT(excpt_r);
- ZYPP_THROW(Exception("Cannot create patch object"));
+ Exception nexcpt("Cannot create patch object");
+ nexcpt.remember(excpt_r);
+ ZYPP_THROW(nexcpt);
}
return 0L;
}
@@ -909,7 +912,9 @@
catch (const Exception & excpt_r)
{
ZYPP_CAUGHT(excpt_r);
- ZYPP_THROW(Exception("Cannot create atom object"));
+ Exception nexcpt("Cannot create atom object");
+ nexcpt.remember(excpt_r);
+ ZYPP_THROW(nexcpt);
}
return 0L;
}
@@ -946,7 +951,9 @@
catch (const Exception & excpt_r)
{
ZYPP_CAUGHT(excpt_r);
- ZYPP_THROW(Exception("Cannot create message object"));
+ Exception nexcpt("Cannot create message object");
+ nexcpt.remember(excpt_r);
+ ZYPP_THROW(nexcpt);
}
return 0L;
}
@@ -985,7 +992,9 @@
catch (const Exception & excpt_r)
{
ZYPP_CAUGHT(excpt_r);
- ZYPP_THROW(Exception("Cannot create script object"));
+ Exception nexcpt("Cannot create script object");
+ nexcpt.remember(excpt_r);
+ ZYPP_THROW(nexcpt);
}
catch (const std::exception & excpt_r)
{
@@ -1005,7 +1014,9 @@
catch (const Exception & excpt_r)
{
ZYPP_CAUGHT(excpt_r);
- ZYPP_THROW(Exception("Cannot create language object"));
+ Exception nexcpt("Cannot create language object");
+ nexcpt.remember(excpt_r);
+ ZYPP_THROW(nexcpt);
}
return 0L;
}
@@ -1053,7 +1064,10 @@
}
catch ( const Exception &e )
{
- ZYPP_THROW(Exception("Error parsing update url: " + e.msg()));
+ ZYPP_CAUGHT(e);
+ Exception ne("Error parsing update url: " + e.msg());
+ ne.remember(e);
+ ZYPP_THROW(ne);
}
}
@@ -1068,7 +1082,10 @@
}
catch ( const Exception &e )
{
- ZYPP_THROW(Exception("Error parsing extra url: " + e.msg()));
+ ZYPP_CAUGHT(e);
+ Exception ne("Error parsing extra url: " + e.msg());
+ ne.remember(e);
+ ZYPP_THROW(ne);
}
}
@@ -1083,7 +1100,10 @@
}
catch ( const Exception &e )
{
- ZYPP_THROW(Exception("Error parsing optional url: " + e.msg()));
+ ZYPP_CAUGHT(e);
+ Exception ne("Error parsing optional url: " + e.msg());
+ ne.remember(e);
+ ZYPP_THROW(ne);
}
}
@@ -1150,7 +1170,9 @@
catch (const Exception & excpt_r)
{
ZYPP_CAUGHT(excpt_r);
- ZYPP_THROW(Exception("Cannot create product object"));
+ Exception nexcpt("Cannot create product object");
+ nexcpt.remember(excpt_r);
+ ZYPP_THROW(nexcpt);
}
return 0L;
}
@@ -1192,7 +1214,9 @@
catch (const Exception & excpt_r)
{
ZYPP_CAUGHT(excpt_r);
- ZYPP_THROW(Exception("Cannot create installation pattern object"));
+ Exception nexcpt("Cannot create installation pattern object");
+ nexcpt.remember(excpt_r);
+ ZYPP_THROW(nexcpt);
}
return 0L;
}
@@ -1233,7 +1257,9 @@
catch (const Exception & excpt_r)
{
ZYPP_CAUGHT(excpt_r);
- ZYPP_THROW(Exception("Cannot create installation selection object"));
+ Exception nexcpt("Cannot create installation selection object");
+ nexcpt.remember(excpt_r);
+ ZYPP_THROW(nexcpt);
}
return 0L;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org