Mailinglist Archive: zypp-commit (171 mails)

< Previous Next >
[zypp-commit] <libzypp-testsuite> master : Remove dependency to satsolver/repo_helix.h.
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Mon, 22 Jun 2009 15:38:32 +0200
  • Message-id: <E1MIjkN-0003UB-Ao@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 18809bbd412e0fcdd61804baf819183a6eb03f4d
Author: Michael Andres <ma@xxxxxxx>
Date: Mon Jun 22 15:38:32 2009 +0200

Remove dependency to satsolver/repo_helix.h.
---
solver/src/deptestomatic.cc | 22 +++-------------------
1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/solver/src/deptestomatic.cc b/solver/src/deptestomatic.cc
index 6883667..f04d044 100644
--- a/solver/src/deptestomatic.cc
+++ b/solver/src/deptestomatic.cc
@@ -86,7 +86,6 @@

#include "KeyRingCallbacks.h"
#include "XmlNode.h"
-#include "satsolver/repo_helix.h"

#define YUILogComponent "example"
#include "YUILog.h"
@@ -629,7 +628,7 @@ load_source (const string & alias, const string & filename,
const string & type,

RepoInfo nrepo;
nrepo.setAlias ( alias );
- nrepo.setName ( "namen sind schall und rauch" );
+ nrepo.setName ( alias );
nrepo.setEnabled ( true );
nrepo.setAutorefresh( false );
nrepo.setPriority ( priority );
@@ -662,30 +661,15 @@ load_source (const string & alias, const string &
filename, const string & type,
RepoInfo nrepo;

nrepo.setAlias ( alias );
- nrepo.setName ( "namen sind schall und rauch" );
+ nrepo.setName ( alias );
nrepo.setEnabled ( true );
nrepo.setAutorefresh( false );
nrepo.setPriority ( priority );
nrepo.addBaseUrl ( pathname.asUrl() );

satRepo.setInfo (nrepo);
- _Repo *intSatRepo = satRepo.get();
- string command;
-
- if (str::endsWith(filename, ".gz")) {
- command = "zcat " + filename;
- } else {
- command = "cat " + filename;
- }
- FILE *fpHelix = popen( command.c_str(), "r" );
- if (!fpHelix)
- {
- cout << "Couldn't load packages from XML file '" << filename <<
"'" << endl;
- return false;
- }
- repo_add_helix(intSatRepo, fpHelix, 0);
+ satRepo.addHelix( filename );
cout << "Loaded " << satRepo.solvablesSize() << " resolvables from "
<< (filename.empty()?pathname.asString():filename) << "." << endl;
- pclose( fpHelix );
}
catch ( Exception & excpt_r ) {
ZYPP_CAUGHT (excpt_r);
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages