Skip to content

Commit

Permalink
Pkg::SourceGeneralData() - return also the raw URL (bsc#941563)
Browse files Browse the repository at this point in the history
(URL without expanded variables)

Conflicts:
	package/yast2-pkg-bindings.changes
  • Loading branch information
lslezak committed Aug 27, 2015
1 parent 19a69ea commit bbe5342
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions package/yast2-pkg-bindings.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Aug 27 11:39:14 UTC 2015 - lslezak@suse.cz

- Pkg::SourceGeneralData() - return also the raw URL (without
expanding the variables), needed for bsc#941563

-------------------------------------------------------------------
Mon Jul 27 14:29:44 UTC 2015 - lslezak@suse.cz

Expand Down
6 changes: 4 additions & 2 deletions src/Source_Get.cc
Expand Up @@ -109,6 +109,7 @@ PkgFunctions::SourceGetCurrent (const YCPBoolean& enabled)
* "product_dir": YCPString,
* "type" : YCPString,
* "url" : YCPString (without password, but see SourceURL),
* "raw_url" : YCPString (without password, but see SourceURL, raw URL without variable replacement),
* "alias" : YCPString,
* "name" : YCPString,
* "service" : YCPString, (service to which the repo belongs, empty if there is no service assigned)
Expand Down Expand Up @@ -138,9 +139,10 @@ PkgFunctions::SourceGeneralData (const YCPInteger& id)
data->add( YCPString("product_dir"), YCPString(repo->repoInfo().path().asString()));

// check if there is an URL
if (repo->repoInfo().baseUrlsBegin() != repo->repoInfo().baseUrlsEnd())
if (!repo->repoInfo().baseUrlsEmpty())
{
data->add( YCPString("url"), YCPString(repo->repoInfo().baseUrlsBegin()->asString()));
data->add( YCPString("url"), YCPString(repo->repoInfo().url().asString()));
data->add( YCPString("raw_url"), YCPString(repo->repoInfo().rawUrl().asString()));
}

data->add( YCPString("alias"), YCPString(repo->repoInfo().alias()));
Expand Down

0 comments on commit bbe5342

Please sign in to comment.