Merge "init: Skip interface duplicates if service is an override"

This commit is contained in:
David Anderson 2022-03-08 02:56:09 +00:00 committed by Gerrit Code Review
commit 8c7cbf01a9

View file

@ -202,7 +202,7 @@ Result<void> ServiceParser::ParseInterface(std::vector<std::string>&& args) {
const std::string fullname = interface_name + "/" + instance_name;
for (const auto& svc : *service_list_) {
if (svc->interfaces().count(fullname) > 0) {
if (svc->interfaces().count(fullname) > 0 && !service_->is_override()) {
return Error() << "Interface '" << fullname << "' redefined in " << service_->name()
<< " but is already defined by " << svc->name();
}