From 3951fa524e52a9a890ed06ce9df69aa8027caaa2 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Fri, 6 Nov 2009 19:49:17 +0100 Subject: [PATCH] Fix zypper to use up-to-date RepoInfos. (bnc #544432) --- src/Zypper.h | 5 +++++ src/repos.cc | 1 + 2 files changed, 6 insertions(+) diff --git a/src/Zypper.h b/src/Zypper.h index ad37aef..c6b7d36 100644 --- a/src/Zypper.h +++ b/src/Zypper.h @@ -87,6 +87,11 @@ struct GlobalOptions bool changedRoot; }; +/** + * \bug The RepoInfo lists kept herein may lack housekeeping data added by the + * zypp::RepoManager. Consider using your own RepoInfos only for those not + * maintained by zypp::RepoManager. (bnc #544432) +*/ struct RuntimeData { RuntimeData() diff --git a/src/repos.cc b/src/repos.cc index f02aaa1..7c285fe 100644 --- a/src/repos.cc +++ b/src/repos.cc @@ -1359,6 +1359,7 @@ void add_repo(Zypper & zypper, RepoInfo & repo) struct Bye { ~Bye() { Zypper::instance()->runtimeData().current_repo = RepoInfo(); } } reset __attribute__ ((__unused__)); manager.addRepository(repo); + repo = manager.getRepo(repo); } catch (const RepoAlreadyExistsException & e) { -- 2.7.4