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

%1 in parametric generator contains doubled %{buildroot} #1162

Closed
ignatenkobrain opened this issue Apr 5, 2020 · 1 comment · Fixed by #1165
Closed

%1 in parametric generator contains doubled %{buildroot} #1162

ignatenkobrain opened this issue Apr 5, 2020 · 1 comment · Fixed by #1165
Assignees
Labels
Milestone

Comments

@ignatenkobrain
Copy link
Contributor

I was trying to port desktop generator to a parametric macro, but hit the problem that rpm.expand("%1") results into /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.

As you can see, the BUILDROOT part is twice there.

This seems like a very trivial fix. I'll send PR.

@ignatenkobrain ignatenkobrain added this to the 4.16.0 milestone Apr 5, 2020
@ignatenkobrain ignatenkobrain self-assigned this Apr 5, 2020
ignatenkobrain added a commit to ignatenkobrain/rpm that referenced this issue Apr 5, 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: rpm-software-management#1162
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
@ignatenkobrain
Copy link
Contributor Author

Fixed as one of commits in #1163.

pmatilai pushed a commit to pmatilai/rpm that referenced this issue 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: rpm-software-management#1162
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
pmatilai pushed a commit that referenced this issue 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>
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 a pull request may close this issue.

1 participant