Support for reading compatible version attribute

This commit is contained in:
Ingo Weinhold
2011-11-25 06:18:28 +01:00
parent 9e93bb4bfc
commit c719d46563
+13
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 "