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

Pass exclude-libraries as env var to linuxdeploy plugins #283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dantti
Copy link

@dantti dantti commented Jun 13, 2024

Excluding libraries doesn't properly work as of now because plugins are not notified of such exclusions, by passing the env var and automatically reading it plugins just need to be recompiled.

This fixes linuxdeploy/linuxdeploy-plugin-qt#153

Copy link

@gegles gegles left a comment

Choose a reason for hiding this comment

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

Thanks!

@dantti
Copy link
Author

dantti commented Aug 8, 2024

@TheAssassin ping?

@dantti
Copy link
Author

dantti commented Aug 29, 2024

@TheAssassin friendly ping 😄

src/core/appdir.cpp Outdated Show resolved Hide resolved
@TheAssassin
Copy link
Member

Thanks for the contribution and sorry for the delay.

@dantti dantti force-pushed the dantti/pass_exclude_libraries branch from 274d684 to 33fd6d3 Compare November 18, 2024 02:16
Excluding libraries doesn't properly work as of now
because plugins are not notified of such exclusions,
by passing the env var and automatically reading it
plugins just need to be recompiled.
@dantti dantti force-pushed the dantti/pass_exclude_libraries branch from 7295404 to 67115ea Compare November 18, 2024 02:18
@@ -656,7 +657,8 @@ namespace linuxdeploy {
AppDir::AppDir(const std::string& path) : AppDir(fs::path(path)) {}

void AppDir::setExcludeLibraryPatterns(const std::vector<std::string> &excludeLibraryPatterns) {
d->excludeLibraryPatterns = excludeLibraryPatterns;
d->excludeLibraryPatterns.insert(d->excludeLibraryPatterns.end(), excludeLibraryPatterns.begin(), excludeLibraryPatterns.end());
util::misc::stringVectorToEnv("LINUXDEPLOY_EXCLUDED_LIBRARIES", ';', d->excludeLibraryPatterns);
Copy link
Member

Choose a reason for hiding this comment

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

This line does not make sense. We should not influence the environment from a non-singleton class. As a user, you'd set the environment variable anyway, thus causing linuxdeploy-plugin-qt and subsequent runs of linuxdeploy from the script to pick up the environment variable. This is in line with all the other environment variables.

Copy link
Author

Choose a reason for hiding this comment

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

This is the whole reason of this patch.
user call ./ld --exclude-libraries foo --plugin qt
if linux deploy does not set the ENV var the qt plugin won't skipp foo library.

Copy link
Author

Choose a reason for hiding this comment

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

I makes no sense for
main ./linux-deploy --exclude-libraries foo works but for it's plugin the user has to manually set the env var.
Also there's no drawback from having duplicate items on the list, else we would use std::set and still doesn't mater for performance.

Copy link
Member

@TheAssassin TheAssassin left a comment

Choose a reason for hiding this comment

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

Please see my comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to ignore a specific driver for QtSql?
3 participants