Support for reading compatible version attribute

This commit is contained in:
Ingo Weinhold 2011-06-27 03:58:18 +02:00
parent b2709d8a0a
commit ee9c9351a7
1 changed files with 13 additions and 0 deletions

View File

@ -199,6 +199,19 @@ ReaderImplBase::PackageResolvableAttributeHandler::HandleAttribute(
}
break;
case B_HPKG_ATTRIBUTE_ID_PACKAGE_PROVIDES_COMPATIBLE:
fPackageInfoValue.resolvable.haveCompatibleVersion = true;
fPackageInfoValue.resolvable.compatibleVersion.major = value.string;
if (_handler != NULL) {
*_handler
= new(std::nothrow) PackageVersionAttributeHandler(
fPackageInfoValue,
fPackageInfoValue.resolvable.compatibleVersion, false);
if (*_handler == NULL)
return B_NO_MEMORY;
}
break;
default:
context->errorOutput->PrintError("Error: Invalid package "
"attribute section: unexpected package attribute id %d "