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

"%include"d spec files are not parsed #51

Open
imphil opened this issue Dec 13, 2022 · 1 comment
Open

"%include"d spec files are not parsed #51

imphil opened this issue Dec 13, 2022 · 1 comment

Comments

@imphil
Copy link
Contributor

imphil commented Dec 13, 2022

I have spec files that use "%include" to share common parts, like this (in this case, we have "versioned" packages that are co-installable):

# my-name-1.0.spec
%global base_name my-name

Version:        1.0
Name:           %{base_name}-%{version}
Release:        1%{?dist}
Source100:      %{base_name}-common.inc

%include %{SOURCE100}
# my-name-common.inc
Source0:        %{base_name}-%{version}.tar.xz
Summary:        My summary
License:        GPLv3

I then want to get all sources with spec = Spec.from_file("my-name-1.0.spec").

Currently, spec.sources will only contain ["my-name-common.inc"].

It seems that python-rpm-spec does not parse the %include directive at all.

@bkircher
Copy link
Owner

Hey, there. Yea, there's no such functionality in python-rpm-spec yet. I simply never needed it. However, I have seen enough spec files that use this.

Shouldn't be too hard to add since rpm literally just concatenates files with %include. Feel free to add this in a PR if you need it. Wouldn't mind to help get this merged and released.

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

No branches or pull requests

2 participants