Author: matz Date: Wed Oct 17 18:44:06 2007 New Revision: 7552 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7552&view=rev Log: Build system.solv in the cache dir, not in /tmp/ Modified: branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc Modified: branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc?rev=7552&r1=7551&r2=7552&view=diff ============================================================================== --- branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc (original) +++ branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc Wed Oct 17 18:44:06 2007 @@ -47,6 +47,7 @@ #include "zypp/CapSet.h" #include "zypp/CapFactory.h" #include "zypp/KeyRing.h" +#include "zypp/ZConfig.h" #include "zypp/ZYppFactory.h" #include "zypp/TmpPath.h" @@ -1266,8 +1267,14 @@ cerr << "trying " << dbpath << endl; if (dbpath != "//var/lib/rpm" && dbpath != "/var/lib/rpm") return false; - cerr << "Building system.solv" << endl; - system ("if test -f /tmp/system.solv; then rpmdb2solv /tmp/system.solv > /tmp/system.solv.new; else rpmdb2solv > /tmp/system.solv.new; fi; mv /tmp/system.solv.new /tmp/system.solv"); + Pathname name = ZConfig::instance().repoCachePath(); + name += "system.solv"; + cerr << "Building " << name.asString() << endl; + string cmd = "if test -s " + name.asString() + " && rpmdb2solv "; + cmd += name.asString() + " > " + name.asString() + ".new; then :; else "; + cmd += "rpmdb2solv > " + name.asString() + ".new; fi; mv " + name.asString(); + cmd += ".new " + name.asString(); + system (cmd.c_str()); return true; } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org