Skip to content

defining multiple debuginfo packages doesn't work #348

@jmairboeck

Description

@jmairboeck

Although the implementation of defineDebugInfoPackage looks like it should support it almost, in practice it doesn't because the packageSuffix it uses is hardcoded to just "debuginfo", which causes a conflict when trying to invoke it multiple times.

Multiple debuginfo packages could be useful for example for recipes which define a separate "tools" package to also separate the debuginfos accordingly.

Additionally, as it is now, the first parameter of defineDebugInfoPackage (basePackageName) is a bit redundant because $portName could just be used for that. The printed usage error message says that it should be the packageSuffix instead (but not the comment and the actual implementation). Should we maybe change that so that it is consistent and multiple debuginfo packages can be defined?

Proposal: change the first parameter to the package suffix without the "debuginfo" part, i.e. the default would be an empty argument (""). This is a breaking change, but recipes could be fixed rather easily by a mass replacement. The existing basePackageName could be replaced by $portName if the suffix is empty or ${portName}_$packageSuffix otherwise (or $PACKAGE_NAME if that is defined).

if [ -z "$1" ]; then
	local basePackageName=$portName
	local packageSuffix=debuginfo
else
	local basePackageName=${portName}_$1 # TODO: support PACKAGE_NAME if defined
	local packageSuffix=${1}_debuginfo
fi
local packageName=${basePackageName}_debuginfo # TODO: support PACKAGE_NAME if defined

What do you think about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions