init: Skip interface duplicates if service is an override
These aren't actually duplicate interfaces because we are overriding the service so interfaces in the original definition will never be used. Test: Verify 'm dist' works without complaining about duplicate interfaces. Change-Id: Iab5e1d8bb4cb7d5b2608028c3cee73af94c47424
This commit is contained in:
parent
5acf7ceb93
commit
e5f05202c7
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue