Skip to content

defineDebugInfoPackage: change first argument to basePackageSuffix#349

Open
jmairboeck wants to merge 2 commits intohaikuports:masterfrom
jmairboeck:debuginfo
Open

defineDebugInfoPackage: change first argument to basePackageSuffix#349
jmairboeck wants to merge 2 commits intohaikuports:masterfrom
jmairboeck:debuginfo

Conversation

@jmairboeck
Copy link
Copy Markdown
Member

@jmairboeck jmairboeck commented Nov 9, 2025

This allows defining multiple debuginfo packages by not hard-coding the used packageSuffix for the debuginfo package any more but deriving it from the basePackageSuffix instead.

Note: This is a breaking change! All invocations of defineDebugInfoPackage in haikuports must be changed. The default case to define the main debuginfo package is to use an empty string (i.e. "") as the first argument now. To define a debuginfo package for a subpackage, use its package suffix instead (similar to packageEntries and getPackagePrefix).

Also adds support for PACKAGE_NAME and PACKAGE_VERSION overrides, both for the referenced base package and the debuginfo package itself. In both cases, they must be declared before defineDebugInfoPackage is called.

Fixes #348.


Question: should the debugInfoSuffix also be changed for subpackages? (i.e. the base package name and version that is added to debug info file names)

@jmairboeck
Copy link
Copy Markdown
Member Author

I changed the debugInfoSuffix as well in a separate commit. I think it makes the most sense this way.

jmairboeck added a commit to jmairboeck/haikuports that referenced this pull request Nov 10, 2025
This is a first test and to demonstrate haikuports/haikuporter#349.

Note: if this is going to be merged, all current usages of
defineDebugInfoPackage need to be changed like this. This should be
doable with a mass replacement.

No revision bump is needed because the output doesn't change, only the
input syntax.
@jmairboeck
Copy link
Copy Markdown
Member Author

Another question: should this handle inherited attributes (like SUMMARY, DESCRIPTION etc.) to automatically "inherit" them from the (non-default) base package, if they have been overridden for that?

(I guess this can get pretty complex if we really want to go that far ...)

@Begasus
Copy link
Copy Markdown
Member

Begasus commented Nov 10, 2025

Another question: should this handle inherited attributes (like SUMMARY, DESCRIPTION etc.) to automatically "inherit" them from the (non-default) base package, if they have been overridden for that?

(I guess this can get pretty complex if we really want to go that far ...)

I was fighting with this the other day, thinking about adding a SUMMARY for a doc package, haikuporter automatically adds a "documentation" suffix to the package just like it's done for the "development" suffix, so I guess it should follow that order (should check how this is done for tools packages?).

jmairboeck added a commit to jmairboeck/haikuports that referenced this pull request Nov 10, 2025
This is another, more complex example of haikuports/haikuporter#349 to
also split the debuginfo package.
@jmairboeck
Copy link
Copy Markdown
Member Author

Another question: should this handle inherited attributes (like SUMMARY, DESCRIPTION etc.) to automatically "inherit" them from the (non-default) base package, if they have been overridden for that?

(I guess this can get pretty complex if we really want to go that far ...)

I think this is easier to be handled in the recipes. Let's say: if you override these variables for the debuginfo base package, you also have to do it for the debuginfo package manually for consistency.

I'll add that to the glib recipe in the example PR.

jmairboeck added a commit to jmairboeck/haikuports that referenced this pull request Nov 10, 2025
This is another, more complex example of haikuports/haikuporter#349 to
also split the debuginfo package.
jmairboeck added a commit to jmairboeck/haikuports that referenced this pull request Nov 11, 2025
jmairboeck added a commit to jmairboeck/haikuports that referenced this pull request Nov 11, 2025
jmairboeck added a commit to jmairboeck/haikuports that referenced this pull request Nov 11, 2025
This allows defining multiple debuginfo packages by not hard-coding the used
packageSuffix for the debuginfo package any more but deriving it from the
basePackageSuffix instead.

Note: This is a breaking change! All invocations of defineDebugInfoPackage in
haikuports must be changed. The default case to define the main debuginfo
package is to use an empty string (i.e. "") as the first argument now.
To define a debuginfo package for a subpackage, use its package suffix instead
(similar to packageEntries and getPackagePrefix).

Also adds support for PACKAGE_NAME and PACKAGE_VERSION overrides, both for the
referenced base package and the debuginfo package itself. In both cases, they
must be declared before defineDebugInfoPackage is called.

Fixes haikuports#348.

Add a missing line continuation to the usage error message.
@jmairboeck
Copy link
Copy Markdown
Member Author

I now also fixed the missing line continuation in the usage error message.

@jmairboeck
Copy link
Copy Markdown
Member Author

For reference: this should apply the necessary transformation for all current usages of defineDebugInfoPackage in haikuports:

git grep -Fl "defineDebugInfoPackage " | xargs sed -i -E 's/(defineDebugInfoPackage\s+)\S+/\1""/'

if/when this is applied and deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

defining multiple debuginfo packages doesn't work

2 participants