Author: dmacvicar Date: Tue Jun 19 15:24:49 2007 New Revision: 5788 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5788&view=rev Log: remove repo Modified: trunk/zypper/src/zypper-sources.cc trunk/zypper/src/zypper-sources.h trunk/zypper/src/zypper.cc Modified: trunk/zypper/src/zypper-sources.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-sources.cc?rev=5788&r1=5787&r2=5788&view=diff ============================================================================== --- trunk/zypper/src/zypper-sources.cc (original) +++ trunk/zypper/src/zypper-sources.cc Tue Jun 19 15:24:49 2007 @@ -337,6 +337,14 @@ return false; } +void remove_repo( const std::string &alias ) +{ + RepoManager manager; + RepoInfo info; + info.setAlias(alias); + manager.removeRepository(info); +} + //! remove a source, identified in any way: alias, url, id // may throw: void remove_source( const std::string& anystring ) Modified: trunk/zypper/src/zypper-sources.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-sources.h?rev=5788&r1=5787&r2=5788&view=diff ============================================================================== --- trunk/zypper/src/zypper-sources.h (original) +++ trunk/zypper/src/zypper-sources.h Tue Jun 19 15:24:49 2007 @@ -59,7 +59,10 @@ //! calls init_system_sources if not disabled by user (or non-root) void cond_init_system_sources(); // OLD void init_system_sources(); // OLD + void remove_source( const std::string& anystring ); // OLD +void remove_repo( const std::string &alias ); + void rename_source( const std::string& anystring, const std::string& newalias ); // OLD void include_source_by_url( const zypp::Url &url ); // OLD Modified: trunk/zypper/src/zypper.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=5788&r1=5787&r2=5788&view=diff ============================================================================== --- trunk/zypper/src/zypper.cc (original) +++ trunk/zypper/src/zypper.cc Tue Jun 19 15:24:49 2007 @@ -643,7 +643,7 @@ warn_if_zmd (); try { // also stores it - remove_source(arguments[0]); + remove_repo(arguments[0]); } catch ( const Exception & excpt_r ) { -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org