Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR finalizes the already merged PR #1947. @jordansissel, in this comment on PR #1947, said he would merge the PR, but before the changes make it into an fpm release he would like to rename the new flag from
--cpan-package-reject-from-dependsto--cpan-disable-dependency, and tests should be added for the new features. Commit 56450ce renames the flag, and commit 706552a adds the new tests. Note that I added the tests todeb_spec.rb(instead ofcpan_spec.rb) since the new code from PR #1947 primarily lives indeb.rband notcpan.rb.While writing the new tests I found a bug in the code, which commit f22581a fixes. The problem is that user-specified disabled dependencies are not actually excluded if they happen to have a version requirement. This is due to the strings naming found dependencies being compared against the user-specified ignored dependencies, where only the former contains the version requirement. I fixed this by stripping off a potential version specification in the found dependency before doing the comparison.
Here is a reproduction of the bug. The first command sequence shows that the user-specified
Digest::baseignored dependency is not ignored in fpm currently, while the second command sequence is shows that this PR fixes the issue.Let me know how everything looks. Also thanks again to @aranc23 for this nice contribution!