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

rpmfc: Do not prepend buildroot to a path for parametric generator #1165

Merged
merged 1 commit into from Apr 6, 2020

Conversation

pmatilai
Copy link
Member

@pmatilai pmatilai commented Apr 6, 2020

'fn' already contains full path to a file, so no need to prepend it once
more. This is actually breaking things.

Before:
D: Calling %{__pythonname_provides %{?__pythonname_provides_opts}}() on /home/brain/rpmbuild/BUILDROOT/hello-1-1.fc33.x86_64//home/brain/rpmbuild/BUILDROOT/hello-1-1.fc33.x86_64/usr/share/applications/org.gnome.Terminal.desktop

After:
D: Calling %{__pythonname_provides %{?__pythonname_provides_opts}}() on /home/brain/rpmbuild/BUILDROOT/hello-1-1.fc33.x86_64/usr/share/applications/org.gnome.Terminal.desktop

Fixes: #1162
Signed-off-by: Igor Raits i.gnatenko.brain@gmail.com

'fn' already contains full path to a file, so no need to prepend it once
more. This is actually breaking things.

Before:
D: Calling %{__pythonname_provides %{?__pythonname_provides_opts}}() on /home/brain/rpmbuild/BUILDROOT/hello-1-1.fc33.x86_64//home/brain/rpmbuild/BUILDROOT/hello-1-1.fc33.x86_64/usr/share/applications/org.gnome.Terminal.desktop

After:
D: Calling %{__pythonname_provides %{?__pythonname_provides_opts}}() on /home/brain/rpmbuild/BUILDROOT/hello-1-1.fc33.x86_64/usr/share/applications/org.gnome.Terminal.desktop

Fixes: rpm-software-management#1162
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
@pmatilai pmatilai added the bug label Apr 6, 2020
@pmatilai
Copy link
Member Author

pmatilai commented Apr 6, 2020

Submitting @ignatenkobrain 's patch as a separate PR because this is a clear and simple bugfix that deserves to be fixed fast and regardless of any other changes.

@pmatilai pmatilai merged commit 10127cd into rpm-software-management:master Apr 6, 2020
@pmatilai
Copy link
Member Author

pmatilai commented Apr 6, 2020

Thanks @ignatenkobrain for spotting and the patch.

I must've just looked at runCmd() being passed buildRoot and thinking it's there to be prepended to the path, "obviously", when its actually being passed down a dozen layers or so just to set RPM_BUILD_ROOT environment. Doh. 🙄

I have a hard time understanding how I did not notice the double buildroot there in my original testing though 🤔

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

Successfully merging this pull request may close these issues.

%1 in parametric generator contains doubled %{buildroot}
2 participants