Mailinglist Archive: opensuse-packaging (138 mails)

< Previous Next >
Re: [opensuse-packaging] Proposal: Any "rm" in .spec %install must be commented
  • From: andreas.hanke@xxxxxxxxxxxxxx
  • Date: Thu, 15 Mar 2007 17:22:18 +0100
  • Message-id: <20070315162218.36020@xxxxxxx>

On Thu, 15 Mar 2007, Michael Matz wrote:

> When it's obvious it needs no comment (just that, as already said here,
> obviousness is a difficult measure).

I agree that commenting everything is inappropriate and I also don't think that making comments mandatory is practicible, but good comments can prevent re-introduction of already fixed bugs.

This is not academic stuff, such things did already happen. Example: NetworkManager was compiled without libnotify support in the past. This looks very much like an unintentionally forgotten feature (=bug) and has therefore been added again, but removing it was intentional because the notification popups were considered useless. A short comment, added from the beginning on, could have prevented this.

Another similarly strange habit is turning spec file commands into comments without adding a real comment in the same place. For example, something like:

#%patch -p1

In such a case it is totally unclear whether the patch should be applied or not. Maybe the patch is unwanted, so it should be removed completely, otherwise someone who doesn't know what it is will add it back sooner or later. Or maybe the patch is old and does not apply any more, but is still wanted and needs to be redone.

This is also a real world case, it already happened with a wrong patch in the cairo package. The patch came back and it had to be discussed *again* why it is wrong.

Everything could be so much easier by just writing:

#This fixes bug <X>, but is disabled because it introduces bug <Y>
#%patch -p1

#This does not apply any more and needs to be updated
#%patch -p1

#This is disabled until bug <whatever> is fixed
#%patch -p1

Or reversed:

#This is a bad workaround, remove when bug <whatever> is fixed properly
%patch -p1

Andreas Hanke
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN:
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups