[Rpm-maint] Plugin ponderings

Reshetova, Elena elena.reshetova at intel.com
Thu Nov 29 13:00:42 UTC 2012

Thank you for all clarifications! Now I am attaching the corrected patch and
the most important is that I understood the indentation finally (took a
while through :()!
Hopefully this is the last iteration for the script cases :)

-----Original Message-----
From: Panu Matilainen [mailto:pmatilai at laiskiainen.org] 
Sent: Thursday, November 29, 2012 2:38 PM
To: Reshetova, Elena
Cc: rpm-maint at lists.rpm.org
Subject: Re: Plugin ponderings

On 11/29/2012 01:52 PM, Reshetova, Elena wrote:
> Yes, I am sorry: I have made two mistakes now:
> 1) patch is wrong (sent the intermediate version before the 
> compilation and plenty of other changes)

Ok, thought that might be the case.

> 2) and yes, I had default indentation of 4, which was confusing me for 
> a long long while :( I was just using simple Ubuntu file editing, I 
> changed it now and it looks much better.

Heh. That certainly explains a lot, you must've been thinking I'm crazy
complaining about indentation on what looks like the most horrid
misindentation-mess you've ever seen :D

The rpm codebase does look like the indentation level is 4, because it
actually is. It's just that its not 4 spaces or tabs of 4, but a combination
of zero or more hardtabs of width 8, plus one softtab (4
spaces) where needed to place things between the hard tabs.

Just in case, here's a practical (if extremely stupid :) example with the
indentation levels spelled out below:

int foo(int x)
     int rc = 0;

     for (int i = 0; i < x; i++) {
         if (rc > 255) {
             if (rc > 65535) {
                  printf("WAY too big!");
             } else {
                  printf("too big!");
     return rc;

^^^^ 0 hardtabs, 1 softtab
^^^^^^^^ 1 hardtab, 0 softtabs
^^^^^^^^^^^^ 1 hardtab, 1 softtab
^^^^^^^^^^^^^^^^^ 2 hardtabs, 0 softtabs

> I will send a new version in a sec with things corrected.
> Sorry again for all of this!

Mistakes happen, no worries. I'm just glad we identified the source of
indentation issues - the possibility (and consequences!) of hardtab set to
width of four only occurred to me after seeing these last two patches.
For the future, if it seems like I'm talking complete nonsense, please just
say so. It's entirely possible that

a) I actually am talking complete nonsense (like with the fsm commit stuff,
still puzzling how I could remember it *that* wrong)

b) There's some local difference causing you to see something entirely
different than I do. Be it actual functionality or editor settings :)


	- Panu -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Improving-scriptlet-related-rpm-plugin-hooks.patch
Type: application/octet-stream
Size: 9020 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20121129/6f0edece/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7220 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20121129/6f0edece/attachment-0001.p7s>

More information about the Rpm-maint mailing list