Ticket #81 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Call %clean by default

Reported by: spot Assigned to: pmatilai
Priority: major Milestone:
Component: rpm Version: RPM Development
Keywords: Cc:

Description

Currently, in Fedora, we require all packages to have this in their spec file:

%clean rm -rf %{buildroot}

Really, this should just be a default within RPM. As Panu pointed out on the discussion thread at fedora-devel-list:

*****

Another, perhaps simpler alternative would be making rpm inject default %clean action when spec doesn't define one. To disable/customize the default behavior, you'd just add an empty (or otherwise custom) %clean in the spec, no special disabler logic required.

It is of course a change of behavior in rpm but allows getting rid of the %clean section in 99% of specs and permits backwards compatibility too: if you want to have %clean do (or not do) whatever you want, you just keep the %clean section in the spec. It'd make those special cases stand out clearly too, all you have to do is grep for %clean.

*****

Please implement. :)

Change History

08/17/09 08:36:38 changed by pmatilai

  • status changed from new to closed.
  • resolution set to fixed.