From 29356b264e88f298bac2da07be9d54e7503422ff Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Mon, 13 Nov 2006 14:49:37 +0000 Subject: [PATCH] Fixed service-rename leaving the old name around. --- VERSION | 2 +- doc/TODO | 1 - doc/zypper.8 | 1 - package/zypper.changes | 6 ++++++ src/zmart-sources.cc | 8 +++++++- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 9c05ec8..ed4c14c 100644 --- a/VERSION +++ b/VERSION @@ -10,5 +10,5 @@ dnl phase) dnl ================================================== m4_define([ZYPPER_MAJOR], [0]) m4_define([ZYPPER_MINOR], [6]) -m4_define([ZYPPER_PATCH], [8]) +m4_define([ZYPPER_PATCH], [9]) dnl ================================================== diff --git a/doc/TODO b/doc/TODO index 827a19a..4d72376 100644 --- a/doc/TODO +++ b/doc/TODO @@ -5,7 +5,6 @@ General - script progress: does the output contain newline?? - installation and deletion notifications - --dry-run (use ZYppCommitPolicy.h) -- FIXME zypper service-rename creates duplicates in sources list - confirm license: more user friendly (see confirm_licenses() comment) - FIXME zypper search ignores target packages that were not installed from sources diff --git a/doc/zypper.8 b/doc/zypper.8 index c4e059f..4ca4e52 100644 --- a/doc/zypper.8 +++ b/doc/zypper.8 @@ -202,7 +202,6 @@ rug compatibility mode: if \fI-r\fR global option is set, zypper doesn't include .TP .B service-rename (sr) Rename a service (installation source). -BUG: the old name is not removed and shares a cache - danger! .TP .B refresh (ref) diff --git a/package/zypper.changes b/package/zypper.changes index ea0d210..8b5a2eb 100644 --- a/package/zypper.changes +++ b/package/zypper.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Nov 13 15:47:50 CET 2006 - mvidner@suse.cz + +- Fixed service-rename leaving the old name around. +- 0.6.9 + +------------------------------------------------------------------- Mon Nov 13 14:07:59 CET 2006 - jkupec@suse.cz - license confirmation upon installation/update added diff --git a/src/zmart-sources.cc b/src/zmart-sources.cc index bfa6b61..99d8be7 100644 --- a/src/zmart-sources.cc +++ b/src/zmart-sources.cc @@ -381,6 +381,10 @@ void remove_source( const std::string& anystring ) //! rename a source, identified in any way: alias, url, id void rename_source( const std::string& anystring, const std::string& newalias ) { +#ifdef LIBZYPP_1xx + // renameSource is recent + cerr << "Sorry, not implemented yet for libzypp-1.x.x" << endl; +#else cerr_vv << "Constructing SourceManager" << endl; SourceManager_Ptr manager = SourceManager::sourceManager(); cerr_vv << "Restoring SourceManager" << endl; @@ -437,11 +441,13 @@ void rename_source( const std::string& anystring, const std::string& newalias ) } if (src) { - src.setAlias (newalias); + // getting Source_Ref is useless if we only can use an id + manager->renameSource (src.numericId (), newalias); } cerr_vv << "Storing source data" << endl; manager->store( "/", true /*metadata_cache*/ ); +#endif } void refresh_sources() -- 2.7.4