Author: lslezak
Date: Mon Mar 30 16:32:58 2009
New Revision: 56467
URL: http://svn.opensuse.org/viewcvs/yast?rev=56467&view=rev
Log:
- return "is_update_repo" flag in Pkg::SourceGeneralData() call
(requires loaded pool) (bnc#459527)
Modified:
trunk/pkg-bindings/src/Source_Get.cc
Modified: trunk/pkg-bindings/src/Source_Get.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Get.cc?rev=56467&r1=56466&r2=56467&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Source_Get.cc (original)
+++ trunk/pkg-bindings/src/Source_Get.cc Mon Mar 30 16:32:58 2009
@@ -30,6 +30,7 @@
#include "ycpTools.h"
#include
+#include
#include
#include
@@ -112,6 +113,7 @@
* "name" : YCPString,
* "service" : YCPString, (service to which the repo belongs, empty if there is no service assigned)
* "keeppackages" : YCPBoolean,
+ * "is_update_repo" : YCPBoolean, (true if this is an update repo - this requires loaded objects in pool otherwise the flag is not returned! The value is stored in repo metadata, not in .repo file!)
* ];
*
* </code>
@@ -159,6 +161,15 @@
data->add( YCPString("keeppackages"), YCPBoolean(repo->repoInfo().keepPackages()));
+ // add Repository data
+ zypp::Repository repository(zypp::ResPool::instance().reposFind(repo->repoInfo().alias()));
+
+ if (repository != zypp::Repository::noRepository)
+ {
+ y2debug("adding zypp::Repository info");
+ data->add( YCPString("is_update_repo"), YCPBoolean(repository.isUpdateRepo()));
+ }
+
return data;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org