Add --exclude-library option.#200
Conversation
|
|
||
| static auto isInExcludelist = [](const bf::path& fileName) { | ||
| for (const auto& excludePattern : generatedExcludelist) { | ||
| static auto isInExcludelist = [](const bf::path& fileName, const std::vector<std::string> &excludeList) { |
There was a problem hiding this comment.
Just capture this, then you can access member variables.
There was a problem hiding this comment.
Its passing in the exclude list because isInExcludelist is used to check both lists (command line and built-in), or is there a different variable that could be captured I'm not seeing?
There was a problem hiding this comment.
I see. I thought it might be easier to move the logic entirely into the lambda. But this seems okay, too.
| args::ValueFlag<std::string> appDirPath(parser, "appdir", "Path to target AppDir", {"appdir"}); | ||
|
|
||
| args::ValueFlagList<std::string> sharedLibraryPaths(parser, "library", "Shared library to deploy", {'l', "library"}); | ||
| args::ValueFlagList<std::string> excludeLibraryPaths(parser, "library", "Shared library to exclude from deployment", {"exclude-library"}); |
There was a problem hiding this comment.
They're patterns, not paths, not filenames. This should be reflected in the help text.
| args::ValueFlagList<std::string> excludeLibraryPaths(parser, "library", "Shared library to exclude from deployment", {"exclude-library"}); | |
| args::ValueFlagList<std::string> excludeLibraryPatterns(parser, "pattern", "fnmatch pattern used to exclude shared libraries from deployment", {"custom-exclude-library-pattern"}); |
TheAssassin
left a comment
There was a problem hiding this comment.
Thank you very much. Looks promising. I left some comments.
18c2582 to
37b640f
Compare
|
@TheAssassin not sure if you'd get notified or not, but I updated the PR. |
|
I saw that, but there's still one open change request: https://github.com/linuxdeploy/linuxdeploy/pull/200/files#r862491555 |
TheAssassin
left a comment
There was a problem hiding this comment.
Looks good. Haven't got to testing this yet, but I don't anticipate issues.
|
|
||
| static auto isInExcludelist = [](const bf::path& fileName) { | ||
| for (const auto& excludePattern : generatedExcludelist) { | ||
| static auto isInExcludelist = [](const bf::path& fileName, const std::vector<std::string> &excludeList) { |
There was a problem hiding this comment.
I see. I thought it might be easier to move the logic entirely into the lambda. But this seems okay, too.
Add
--exclude-librarypath to allow excluding libraries in addition to the ones defined by the upstreamexcludelistfile.Closes #29.