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

Expose dependencies during runtime #152

Merged
merged 2 commits into from
Oct 18, 2023
Merged

Expose dependencies during runtime #152

merged 2 commits into from
Oct 18, 2023

Conversation

SK1Y101
Copy link
Member

@SK1Y101 SK1Y101 commented Oct 18, 2023

No description provided.

@SK1Y101 SK1Y101 added the enhancement New feature or request label Oct 18, 2023
Copy link
Contributor

@alexsander-souza alexsander-souza left a comment

Choose a reason for hiding this comment

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

suggestion:

define CHECK_PACKAGES_DEPS
__CURRENT_DEPS:=libnbd-bin nbdkit packer fuse2fs $(1)
__FOCAL_DEPS:=libnbd-bin nbdkit packer fuse2fs $(2)

print-deps: 
	@if [ $(shell lsb_release -sr|cut -d. -f1) -ge 22 ];then \
		echo $$(__CURRENT_DEPS); \
	else \
		echo $$(__FOCAL_DEPS); \
	fi

check-deps: 
	@if [ $(shell lsb_release -sr|cut -d. -f1) -ge 22 ];then \
		dpkg -s $$(__CURRENT_DEPS) > /dev/null; \
	else \
		dpkg -s $$(__FOCAL_DEPS)> /dev/null; \
	fi
endef

then change the makefiles to use this, e.g.

-check-deps:
-       $(call check_packages_deps,fusefat,fusefat )
+$(eval $(call CHECK_PACKAGES_DEPS,fusefat,fusefat ))

@SK1Y101
Copy link
Member Author

SK1Y101 commented Oct 18, 2023

Ah, I was trying to be minimally invasive, but I can see how echoing the dependencies would be more beneficial.

@alexsander-souza
Copy link
Contributor

I think echoing would be cheaper and it has a more stable output

Copy link
Contributor

@alexsander-souza alexsander-souza left a comment

Choose a reason for hiding this comment

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

+1

@SK1Y101 SK1Y101 merged commit 7404ec6 into main Oct 18, 2023
1 check passed
@SK1Y101 SK1Y101 deleted the show-dependencies branch October 18, 2023 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants