Author: jkupec
Date: Wed Sep 3 18:15:21 2008
New Revision: 10925
URL: http://svn.opensuse.org/viewcvs/zypp?rev=10925&view=rev
Log:
- targetDistro() added (only in-memory), will not be written out by dumpRepoOn(ostream)
Modified:
trunk/libzypp/zypp/RepoInfo.cc
trunk/libzypp/zypp/RepoInfo.h
Modified: trunk/libzypp/zypp/RepoInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.cc?rev=10925&r1=10924&r2=10925&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoInfo.cc (original)
+++ trunk/libzypp/zypp/RepoInfo.cc Wed Sep 3 18:15:21 2008
@@ -63,6 +63,7 @@
std::set<Url> baseUrls;
Pathname path;
std::string service;
+ std::string targetDistro;
Pathname metadatapath;
Pathname packagespath;
DefaultIntegral priority;
@@ -189,6 +190,12 @@
_pimpl->service = name;
return *this;
}
+
+ RepoInfo & RepoInfo::setTargetDistribution(
+ const std::string & targetDistribution)
+ {
+ _pimpl->targetDistro = targetDistribution;
+ }
bool RepoInfo::gpgCheck() const
{ return indeterminate(_pimpl->gpgcheck) ? true : (bool) _pimpl->gpgcheck; }
@@ -228,6 +235,9 @@
std::string RepoInfo::service() const
{ return _pimpl->service; }
+
+ std::string RepoInfo::targetDistribution() const
+ { return _pimpl->targetDistro; }
RepoInfo::urls_const_iterator RepoInfo::baseUrlsBegin() const
{
@@ -284,6 +294,9 @@
str << "- keeppackages: " << keepPackages() << std::endl;
str << "- service : " << service() << std::endl;
+ if (!targetDistribution().empty())
+ str << "- targetdistro: " << targetDistribution() << std::endl;
+
return str;
}
Modified: trunk/libzypp/zypp/RepoInfo.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.h?rev=10925&r1=10924&r2=10925&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoInfo.h (original)
+++ trunk/libzypp/zypp/RepoInfo.h Wed Sep 3 18:15:21 2008
@@ -200,6 +200,11 @@
*/
std::string service() const;
+ /**
+ * Distribution for which is this repository meant.
+ */
+ std::string targetDistribution() const;
+
public:
/**
* Add a base url. \see baseUrls
@@ -299,6 +304,13 @@
RepoInfo & setService( const std::string& name );
/**
+ * Sets the distribution for which is this repository meant. This is
+ * an in-memory value only, does not get written to the .repo file upon
+ * saving.
+ */
+ RepoInfo & setTargetDistribution(const std::string & targetDistribution);
+
+ /**
* Write a human-readable representation of this RepoInfo object
* into the \a str stream. Useful for logging.
*/
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org