Re: [CVS] RPM: rpm/lib/ filetriggers.c

2008-12-23 Thread Jeff Johnson

This patch isn't needed.

system.h will include config.h if -DHAVE_CONFIG_H is defined
in CFLAGS, which is done throughout rpm.

And RPM_VENDOR_FOO is passed through CFLAGS, not config.h,
simpilarly to -DHAVE_CONFIG_H.

See your change to the AutoFu for one example ;-)

73 de Jeff

On Dec 22, 2008, at 10:54 AM, Per Øyvind Karlsen wrote:


  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
   
__ 
__


  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   22-Dec-2008  
16:54:06

  Branch: HEAD Handle: 2008122215540600

  Modified files:
rpm/lib filetriggers.c

  Log:
include config.h on top of file since RPM_VENDOR_MANDRIVA is  
defined there

rather than by passing CPPFLAGS variable

  Summary:
RevisionChanges Path
2.14+2  -0  rpm/lib/filetriggers.c
   
__ 
__


  patch -p0 '@@ .'
  Index: rpm/lib/filetriggers.c
   
== 
==

  $ cvs diff -u -r2.13 -r2.14 filetriggers.c
  --- rpm/lib/filetriggers.c20 Dec 2008 23:14:51 -  2.13
  +++ rpm/lib/filetriggers.c22 Dec 2008 15:54:06 -  2.14
  @@ -1,3 +1,5 @@
  +#include config.h
  +
   #if defined(RPM_VENDOR_MANDRIVA)
   #include system.h

  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-...@rpm5.org


__
RPM Package Managerhttp://rpm5.org
Developer Communication Listrpm-devel@rpm5.org


Re: [CVS] RPM: rpm/lib/ filetriggers.c

2008-12-23 Thread Jeff Johnson


On Dec 23, 2008, at 4:57 PM, Jeff Johnson wrote:


This patch isn't needed.

system.h will include config.h if -DHAVE_CONFIG_H is defined
in CFLAGS, which is done throughout rpm.

And RPM_VENDOR_FOO is passed through CFLAGS, not config.h,
simpilarly to -DHAVE_CONFIG_H.



If you __DO__ insist on RPM_VENDOR_MANDRIVA
in config.h rather than CFLAGS et al, then the right fix is

#include system.h

#if defined(RPM_VENDOR_MANDRIVA)

consistent with every other file compiled in rpm.

Slightly worse (but acceptable) is

#if defined(HAVE_CONFIG_H
#include config.h
#endif

#if defined(RPM_VENDOR_MANDRIVA)

That's my issue (in case I wasn't entirely clear).

Personally, I'd rather see CFLAGS used consistently
for VENODR identification too, up until now CFLAGS,
not config.h, has been used to pass RPM_VENDOR_FOO
around, but that's a different matter. Not every flag could/should
be added to CFLAGS.

73 de Jeff
__
RPM Package Managerhttp://rpm5.org
Developer Communication Listrpm-devel@rpm5.org


Re: [CVS] RPM: rpm/lib/ filetriggers.c

2008-12-23 Thread Per Øyvind Karlsen
2008/12/23 Jeff Johnson n3...@mac.com


 On Dec 23, 2008, at 4:57 PM, Jeff Johnson wrote:

  This patch isn't needed.

 system.h will include config.h if -DHAVE_CONFIG_H is defined
 in CFLAGS, which is done throughout rpm.

 And RPM_VENDOR_FOO is passed through CFLAGS, not config.h,
 simpilarly to -DHAVE_CONFIG_H.


 If you __DO__ insist on RPM_VENDOR_MANDRIVA
 in config.h rather than CFLAGS et al, then the right fix is

#include system.h

#if defined(RPM_VENDOR_MANDRIVA)

Yes, but then some stuff would be compiled into filetriggers.o.



 consistent with every other file compiled in rpm.

 Slightly worse (but acceptable) is

#if defined(HAVE_CONFIG_H
#include config.h
#endif

#if defined(RPM_VENDOR_MANDRIVA)

I'll go with this then. :)


Re: [CVS] RPM: rpm/lib/ filetriggers.c

2008-12-23 Thread Jeff Johnson


On Dec 23, 2008, at 5:34 PM, Per Øyvind Karlsen wrote:


\
   #include system.h


   #if defined(RPM_VENDOR_MANDRIVA)
Yes, but then some stuff would be compiled into filetriggers.o.


If that is true (try by verifying non-zero-length filetriggers.o  
please),

then something else is in need of fixing,

And please don't take any of my comments personally,
I'm __ECSTATIC__ to see anyone else attempting hacks,
ande My (personal/privatre) belief always tends toward KISS,
not Have it your own way!.

IOW, consistency is all I desire, if you want to change
every bleeping file in rpm cvs for some new convention,
well, lets do that. OTOH, organically grown creeping crud
divergence will lead to build breakages somewhere, somewhen.

73 de Jeff__
RPM Package Managerhttp://rpm5.org
Developer Communication Listrpm-devel@rpm5.org