Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing qoutes for meson scriplet #311

Merged
merged 1 commit into from
Jan 4, 2025
Merged

Conversation

Begasus
Copy link
Contributor

@Begasus Begasus commented Jan 2, 2025

No description provided.

@Begasus
Copy link
Contributor Author

Begasus commented Jan 2, 2025

Without these double quotes I wasn't able to launch a meson build. First run was correct (debug enabled):

error: invoking meson with --buildtype=debugoptimized without debug info packages specified

Then changed buildtype to release and got:

error: invoking meson with --buildtype=release with debug info packages specified

@@ -353,10 +353,10 @@ def getShellVariableSetters(shellVariables):
echo "error: invoking meson without --buildtype argument"
echo "note: you probably want --buildtype=release or --buildtype=debugoptimized"
exit 1
elif [[ "$*" = *buildtype=release* ]] && [ -n $DEBUG_INFO_PACKAGES ]; then
elif [[ "$*" = *buildtype=release* ]] && [ -n "$DEBUG_INFO_PACKAGES" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do these mix [[ and [?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beats me, didn't spot it, will run some checks and update if needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the cmake pattern they match, @korli should know. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed [[ would be preferred.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@korli in the cmake part there are also only one [ ] at the end of the lines, so I didn't change them here, should those also be double for the last statement?

	if [[ "$*" != *--install* ]] && [[ "$*" != *--build* ]]; then
		if [[ "$*" != *CMAKE_BUILD_TYPE* ]]; then
			echo "error: invoking cmake without CMAKE_BUILD_TYPE specified!"
			echo "note: you probably want -DCMAKE_BUILD_TYPE=Release or -DCMAKE_BUILD_TYPE=RelWithDebInfo"
			exit 1
		elif [[ "$*" = *CMAKE_BUILD_TYPE=Release* ]] && [ -n "$DEBUG_INFO_PACKAGES" ]; then
			echo "error: invoking cmake with -DCMAKE_BUILD_TYPE=Release with debug info packages specified"
			exit 1
		elif [[ "$*" = *CMAKE_BUILD_TYPE=RelWithDebInfo* ]] && [ -z "$DEBUG_INFO_PACKAGES" ]; then
			echo -n "error: invoking cmake with -DCMAKE_BUILD_TYPE=RelWithDebInfo without debug info "
			echo "packages specified"
			exit 1
		fi
	fi

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave the brackets for the next one cleaning this up. At least this fixes building with meson.

@Begasus Begasus merged commit f666118 into haikuports:master Jan 4, 2025
3 checks passed
@Begasus Begasus deleted the meson branch January 4, 2025 09:41
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.

3 participants