Author: dmacvicar Date: Fri Aug 24 11:52:22 2007 New Revision: 6863 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6863&view=rev Log: - Check for YaST before doing anything Modified: trunk/libzypp/tools/migrate-sources/migrate-sources.cc Modified: trunk/libzypp/tools/migrate-sources/migrate-sources.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tools/migrate-sources/migrate-sources.cc?rev=6863&r1=6862&r2=6863&view=diff ============================================================================== --- trunk/libzypp/tools/migrate-sources/migrate-sources.cc (original) +++ trunk/libzypp/tools/migrate-sources/migrate-sources.cc Fri Aug 24 11:52:22 2007 @@ -35,12 +35,6 @@ static void migrate_sources( const Options &opt ) { - zypp::zypp_readonly_hack::IWantIt(); - ZYpp::Ptr Z = zypp::getZYpp(); - RepoManager manager; - - Pathname source_p = opt.root + opt.sources_dir; - if ( string(getenv("YAST_IS_RUNNING")) == "instsys" ) { MIL << "YaST is running in instsys. Not migrating old sources. YaST will do it." << endl; @@ -51,6 +45,12 @@ 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; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org