Skip to content

Commit

Permalink
[license feature] Use Stackage.license_ field (that was added in ros#66
Browse files Browse the repository at this point in the history
…).
  • Loading branch information
130s committed Jun 11, 2017
1 parent 153de99 commit 9eec8b1
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/rospack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,22 +499,7 @@ void Rosstackage::licenses(std::vector<std::string>& deps,
continue; // Is this way good enough to return this function?
}

// Parsing xml file. Copied from computeDepsInternal
XMLElement* root;
root = get_manifest_root(stackage);

TiXmlNode *dep_node = NULL;
const char* license_from_dependedPkg;
std::vector<std::string> licenses_dependedPkg;
while ((dep_node = root->IterateChildren(xmlelem_license, dep_node))) // Iterate per depended pkg.
{
XMLElement *dep_ele = dep_node->ToElement();
license_from_dependedPkg = dep_ele->GetText();
// TODO need to obtain as many license declarations as possible per pkg
// (in the case of multiple-license).
licenses_dependedPkg.push_back(license_from_dependedPkg);
}
licenses.insert(std::pair<std::string, std::vector<std::string> >(pkg_name.c_str(), licenses_dependedPkg));
licenses.insert(std::pair<std::string, std::vector<std::string> >(pkg_name.c_str(), stackage->licenses_));
}
}

Expand Down

0 comments on commit 9eec8b1

Please sign in to comment.