Looking for testers: RPM 4.9 alpha

Panu Matilainen pmatilai at laiskiainen.org
Mon Nov 29 08:28:16 UTC 2010


On Sun, 28 Nov 2010, Simo Sorce wrote:

> On Sun, 28 Nov 2010 12:15:52 +0200 (EET)
> Panu Matilainen <pmatilai at laiskiainen.org> wrote:
>
>> On Sun, 28 Nov 2010, Kevin Kofler wrote:
>>
>>> Panu Matilainen wrote:
>>>> The draft release notes are at http://rpm.org/wiki/Releases/4.9.0
>>>
>>> 1. This change:
>>> | Packages with no files can now omit the %files section and still
>>> have | packages generated.
>>> is going to make it a PITA to conditionalize the building of
>>> subpackages, and it's going to break several existing KDE specfiles
>>> very badly (and with no warning!): RPM will silently generate empty
>>> subpackages where none is wanted.
>>>
>>> More precisely, when we wanted to conditionalize or comment out the
>>> creation of a subpackage (e.g. in kde-l10n for languages which are
>>> currently not available), what we did so far was to %if out only
>>> the %files section for the subpackage, not %package or things like
>>> %post, and this would reliably omit the subpackage. Now we'll have
>>> to %if out ALL sections referring to the subpackage: %package to
>>> prevent the subpackage from being built, and all other sections
>>> referring to it because they'll error out if the %package is not
>>> there.
>>
>> This change can be reconsidered.
>
> Wouldn't it be better instead to create a specific directive to disable
> unwanted subpackages ?
>
> Something like:
> %suppress <subpackagename>
>
> This would make it clear what the author of the RPMs wants to do w/o
> relying on hacks like suppressing the %files section.
>
> Bonus if it checks the suppressed package %files for installed files
> that need to be skipped even if "not packaged" so as to not error out.

Not a bad idea at all, although I'd guess a better syntax would be a
boolean enable/disable tag similar to AutoReq etc. That'd allow nice 
integration with build conditionals, such as

%bcond_without foo

...

%package foo
BuildRequires: bar-devel
Summary: ...
BuildPkg: %{with foo}

 	- Panu -


More information about the devel mailing list