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 warning for %autopatch not applying anything #3189

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

ffesti
Copy link
Contributor

@ffesti ffesti commented Jul 2, 2024

It is possible that the range given to %autopatch is not matching any actual patches. Issue an warning to give the packager a chance to realize that there is something fishy. Not turnng this into an error to not break existing builds.

Resolves: #3093

It is possible that the range given to %autopatch is not matching any
actual patches. Issue an warning to give the packager a chance to
realize that there is something fishy. Not turnng this into an error to
not break existing builds.

Resolves: rpm-software-management#3093
@@ -468,11 +468,13 @@ RPMDB_INIT
RPMTEST_CHECK([

run rpmbuild \
-ba ${RPMDATA}/SPECS/hello-autopatch.spec
-ba ${RPMDATA}/SPECS/hello-autopatch.spec 2> >(grep warning >&2) | grep warning
Copy link
Contributor

Choose a reason for hiding this comment

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

What a clever trick 😄

@dmnks dmnks merged commit d94dbcc into rpm-software-management:master Jul 9, 2024
1 check passed
@ffesti ffesti deleted the 3093 branch July 16, 2024 12:25
@pmatilai
Copy link
Member

pmatilai commented Aug 5, 2024

This causes a regression where %autosetup emits warnings when there are no patches (which for %autosetup is perfectly normal): #3230

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.

%autopatch -m/-M fall through silently if no patches are in range
3 participants