Re: [CVS] RPM: rpm/ CHANGES VENDOR rpm/lib/ depends.c

2008-11-01 Thread Jeff Johnson

It mostly doesn't matter whether enum's and such are typedef'd or not.

__BUT__

rpmlog is based on syslog(3) and there's really no reason not
to continue exactly that (yes ancient and still widely used) API
in rpm itself.

From man 3 syslog, the 1st arg to syslog(3) is an int, with multiple  
sub-fields

that are supposed to be OR'd together.

And only one of those bit-fields corresponds to rpmlogLvlType.

So technically URPMI, not rpmlog, in rpm is b0rken if it is using
only rpmlogLvlType, and the prototype change you made in
lib/depends.c is incorrect. (re-read the very 1st line please).

Where the issue __DOES__ get to be enormously painful is
when C++ linkage from, say, apt-rpm is attempted. C++ does
not have the same promotion rules as C.

And so what does (and will) happen, if adding private typedef's for  
every steenkin'

integer in rpm is pursued, is that the typedef's will have to be
exposed in includes. ATM rpm is nowhere near the point where a stable
API/ABI can be maintained. Sure I'd like to do to have a stable API/ 
ABI, but every

rearrangement I make has a ripple effect, and noone is working
on the global API/ABI design issues but me.

What happens instead is a This used to work! bug report, and some
change is hacked in, and that's how rpm arrived at this state of  
affairs  in the

first place, organically incremental creeping crud.

73 de Jeff


On Nov 1, 2008, at 3:32 PM, 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:  [EMAIL PROTECTED]
 Module: rpm  Date:   01-Nov-2008 20:32:06
 Branch: HEAD Handle: 2008110119320402

 Modified files:
   rpm CHANGES VENDOR
   rpm/lib depends.c

 Log:
   Mandriva: make loglevel for dependency loop detection  
overridable, debug-level

   by default. (loop-detection-optional-loglevel)

 Summary:
   RevisionChanges Path
   1.2639  +6  -4  rpm/CHANGES
   2.62+9  -0  rpm/VENDOR
   1.427   +4  -0  rpm/lib/depends.c
  



 patch -p0 '@@ .'
 Index: rpm/CHANGES
  
= 
= 
= 
= 
= 
= 
==

 $ cvs diff -u -r1.2638 -r1.2639 CHANGES
 --- rpm/CHANGES30 Oct 2008 16:04:19 -  1.2638
 +++ rpm/CHANGES1 Nov 2008 19:32:04 -   1.2639
 @@ -1,15 +1,17 @@

  5.2a2 - 5.2a3:
 +- proyvind: Mandriva: make loglevel for dependency loop  
detection
 +	overridable, debug-level by default. (loop-detection-optional- 
loglevel)

  - jbj: fix: __OpenBSD__ insque(3) needs rpmsq rock initialized.
  - jbj: add #ifdef's needed to compile on __OpenBSD__.
  - proyvind: Mandriva: make directory  symlink dependencies  
optional with
 -%{_check_symlink_deps}  %{_check_dirname_deps}. (optional- 
dirname-and-symlink-deps)
 +	%{_check_symlink_deps}  %{_check_dirname_deps}. (optional- 
dirname-and-symlink-deps)
  - proyvind: Mandriva: prefer file extension for detecting file  
compression.

 -(extension-based-compression-detection)
 +  (extension-based-compression-detection)
  - proyvind: Mandriva: disable buildrequires checking for  
building src.rpms.

 -(no-deps-on-building-srpms)
 +  (no-deps-on-building-srpms)
  - proyvind: Mandriva: disable preservation of file ownership  
for source rpms.

 -(no-owner-group-on-srpm-install)
 +  (no-owner-group-on-srpm-install)
  - rpm.org: Add posix.mkstemp() to Lua posix lib.
  - jbj: fix: apply _dependency_whiteout to erased relations too.
  - jbj: lua: display rudimentary info about lua with --showrc.
 @@ .
 patch -p0 '@@ .'
 Index: rpm/VENDOR
  
= 
= 
= 
= 
= 
= 
==

 $ cvs diff -u -r2.61 -r2.62 VENDOR
 --- rpm/VENDOR 28 Oct 2008 15:25:19 -  2.61
 +++ rpm/VENDOR 1 Nov 2008 19:32:04 -   2.62
 @@ -544,6 +544,15 @@
   ~always be an issue.




 + Change: loop-detection-optional-loglevel
 + Purpose:Report dependency loops at optional log level
 + Reason: Mandriva has many dependency loops by  
intentetion,
 + especially due to it's library package  
policies.
 + For now we want to be able to not display  
these as errors,
 + but rather as debug-level messages by  
default, or at any
 + other log level defined by  
%_loop_detection_loglevel.
  
+ 


 +
o  Name:   

Re: [CVS] RPM: rpm/ CHANGES VENDOR rpm/lib/ depends.c

2008-11-01 Thread Per Øyvind Karlsen
2008/11/1 Jeff Johnson [EMAIL PROTECTED]

 It mostly doesn't matter whether enum's and such are typedef'd or not.

 __BUT__

 rpmlog is based on syslog(3) and there's really no reason not
 to continue exactly that (yes ancient and still widely used) API
 in rpm itself.

 From man 3 syslog, the 1st arg to syslog(3) is an int, with multiple
 sub-fields
 that are supposed to be OR'd together.

 And only one of those bit-fields corresponds to rpmlogLvlType.

 So technically URPMI, not rpmlog, in rpm is b0rken if it is using
 only rpmlogLvlType, and the prototype change you made in
 lib/depends.c is incorrect. (re-read the very 1st line please).

 Where the issue __DOES__ get to be enormously painful is
 when C++ linkage from, say, apt-rpm is attempted. C++ does
 not have the same promotion rules as C.

 And so what does (and will) happen, if adding private typedef's for every
 steenkin'
 integer in rpm is pursued, is that the typedef's will have to be
 exposed in includes. ATM rpm is nowhere near the point where a stable
 API/ABI can be maintained. Sure I'd like to do to have a stable API/ABI,
 but every
 rearrangement I make has a ripple effect, and noone is working
 on the global API/ABI design issues but me.

 What happens instead is a This used to work! bug report, and some
 change is hacked in, and that's how rpm arrived at this state of affairs
  in the
 first place, organically incremental creeping crud.

 73 de Jeff

I guess you're commenting on the previous commit, and not this one? :)

I changed the type since I figured that it made the context and valid values
more clear, while also
nicer for debugging (ie. gdb displaying the enumated value ie. name such as
RPMLOG_WARN rather
than just the integer) and otherwise as you point out, it mostly doesn't
matter :)

For URPMI usage of rpmlog, I doubt it using the typedef'd type, this was a
purely URPMI non-related commit. ;)


Re: [CVS] RPM: rpm/ CHANGES VENDOR rpm/lib/ depends.c

2008-11-01 Thread Jeff Johnson


On Nov 1, 2008, at 4:18 PM, Per Øyvind Karlsen wrote:



I guess you're commenting on the previous commit, and not this one? :)



Likely.

I changed the type since I figured that it made the context and  
valid values more clear, while also
nicer for debugging (ie. gdb displaying the enumated value ie. name  
such as RPMLOG_WARN rather
than just the integer) and otherwise as you point out, it mostly  
doesn't matter :)




And I'm not disagreeing re context and/or valid values and/or (I'm  
glad you've noticed)

debugging is way way easier with typedef'd enums.

But note rpmMireMode, what could be easier or more innocent than an  
enum, right?


Wrong. Once the enum gets used in a prototype, then the typedef needs to
be included for rpmdb.h. Which drags mire.h into rpm's API for no  
particularly
important reason. For many reasons, I'd like mire.h to be stand-alone  
with the
typedef''d enum within mire.h. And for other, conflicting reasons, I'd  
like
not to expose an API that may (or may not) include functionality like  
PCRE,

because PCRE cannot be used unless --with-pcre is included.

I don't pretend to have answers here.

For URPMI usage of rpmlog, I doubt it using the typedef'd type, this  
was a purely URPMI non-related commit. ;)




Good.

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


Re: [CVS] RPM: rpm/ CHANGES configure.ac

2008-11-01 Thread Jeff Johnson

What is wrong with
CPPFLAGS=-DRPM_VENDOR_MANDRIVA

Its insane to have Yet More Ways to configure stuff imho.

73 de Jeff

On Nov 1, 2008, at 6:41 PM, 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:  [EMAIL PROTECTED]
 Module: rpm  Date:   01-Nov-2008 23:41:44
 Branch: HEAD Handle: 2008110122414300

 Modified files:
   rpm CHANGES configure.ac

 Log:
   add --with-vendor configure option to define RPM_VENDOR_*.

 Summary:
   RevisionChanges Path
   1.2640  +1  -0  rpm/CHANGES
   2.319   +28 -0  rpm/configure.ac
  



 patch -p0 '@@ .'
 Index: rpm/CHANGES
  
= 
= 
= 
= 
= 
= 
==

 $ cvs diff -u -r1.2639 -r1.2640 CHANGES
 --- rpm/CHANGES1 Nov 2008 19:32:04 -   1.2639
 +++ rpm/CHANGES1 Nov 2008 22:41:43 -   1.2640
 @@ -1,5 +1,6 @@

  5.2a2 - 5.2a3:
 +- proyvind: add --with-vendor configure option to define  
RPM_VENDOR_*.
  - proyvind: Mandriva: make loglevel for dependency loop  
detection
  	overridable, debug-level by default. (loop-detection-optional- 
loglevel)

  - jbj: fix: __OpenBSD__ insque(3) needs rpmsq rock initialized.
 @@ .
 patch -p0 '@@ .'
 Index: rpm/configure.ac
  
= 
= 
= 
= 
= 
= 
==

 $ cvs diff -u -r2.318 -r2.319 configure.ac
 --- rpm/configure.ac   19 Oct 2008 07:46:48 -  2.318
 +++ rpm/configure.ac   1 Nov 2008 22:41:43 -   2.319
 @@ -1636,6 +1636,34 @@
  AC_SUBST(RPMLUAFILES)
  AC_MSG_RESULT([$RPMLUAFILES])

 +dnl # determine whether to build using a specific vendor's changes  
or not

 +AC_MSG_CHECKING([if building for a specfic vendor])
 +
 +AC_ARG_WITH(
 +[vendor],
 +AS_HELP_STRING([--with-vendor=VENDOR], [build with a supported  
vendor's specific set of changes: openpkg, rpm4darwin, fedora,  
mandriva or windriver]),

 +if test .$withval != .no; then
 +  if test $withval == openpkg; then
 +  AC_DEFINE([RPM_VENDOR_OPENPKG], 1, Vendor is OpenPKG)
 +  fi
 +  if test $withval == rpm4darwin; then
 +		AC_DEFINE([RPM_VENDOR_RPM4DARWIN], 1, Vendor is RPM for  
Darwin)

 +  fi
 +  if test $withval == fedora; then
 +  AC_DEFINE([RPM_VENDOR_FEDORA], 1, Vendor is Fedora)
 +  fi
 +  if test $withval == mandriva; then
 +  AC_DEFINE([RPM_VENDOR_MANDRIVA], 1, Vendor is Mandriva)
 +  fi
 +  if test $withval == windriver; then
 +  AC_DEFINE([RPM_VENDOR_WINDRIVER], 1, Vendor is Windriver)
 +  fi
 +  AC_MSG_RESULT([$withval])
 +else
 +  AC_MSG_RESULT(no)
 +fi
 +)
 +
  testdir=`pwd`/tests
  AC_SUBST(testdir)

 @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repository[EMAIL PROTECTED]


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


Re: [CVS] RPM: rpm/ CHANGES configure.ac

2008-11-01 Thread Per Øyvind Karlsen
2008/11/1 Jeff Johnson [EMAIL PROTECTED]

 What is wrong with
CPPFLAGS=-DRPM_VENDOR_MANDRIVA

 Its insane to have Yet More Ways to configure stuff imho.

 73 de Jeff

It's hidden from regular user who'd like to build rpm himself for that
specific vendor.

Maybe not such an important thing for rpm devels, but I know that if I were
to build
rpm5 myself for ie. Mandriva without being involved in rpm development nor
reading
through source just for fun, I'd like to easily find and use the suitable
option to pick
what to be considered the most proper adaptions using './configure --help'.

Moreover, personally, I just find it nicer and more intuitive than passing
either CPPFLAGS,
or adding it to config.h..  ;)


Re: [CVS] RPM: rpm/ CHANGES configure.ac

2008-11-01 Thread Jeff Johnson


On Nov 1, 2008, at 7:19 PM, Per Øyvind Karlsen wrote:


2008/11/1 Jeff Johnson [EMAIL PROTECTED]
What is wrong with
   CPPFLAGS=-DRPM_VENDOR_MANDRIVA

Its insane to have Yet More Ways to configure stuff imho.

73 de Jeff
It's hidden from regular user who'd like to build rpm himself for  
that specific vendor.




Hidden? Adding another option is no substitute for identifying
exactly the functionality desired in Mandriva. If you want better doco,
then write better doco on how to use rpm5.org on Mandriva. Adding
--with-vendor does nothing except what
CPPFLAGS=-DRPM_VENDOR_MANDRIVA
already does. I don't see any additional benefit from
adding an enumeration for vendors that are, in fact, hardly
likely to adopt rpm5.org any time soon.

Not that Mandriva uses rpm5.org, nor is Mandriva expected to change
from rpm.org. So what purpose is served?

If --with-vendor=mandriva did anything useful, like identifying
specific components that should be included when building,
I might be saying something else.

But there is already devtool, which can add an entire collection
of configure options when invoking rpm5.org ./configure. Try
adding a %mandriva stanza to devtool.conf.

Maybe not such an important thing for rpm devels, but I know that if  
I were to build
rpm5 myself for ie. Mandriva without being involved in rpm  
development nor reading
through source just for fun, I'd like to easily find and use the  
suitable option to pick
what to be considered the most proper adaptions using './configure -- 
help'.




I couldn't care less about yjr AutoFu. But adding --with-vendor=fedora  
is hardly
the same thing as claiming Fedora support. Fedora has most definitely  
said
that rpm5.org is not permitted in the Fedora distro without being  
crippled. I see
no reason to pretend support --with-vendor=fedora for a distro that  
wants to cripple
rpm5.org functionality. And I'm quite sure that rpm5.org would not be  
permitted

in Fedora no matter what. The criteria would just change to
Now that we've crippled rpm5.org so that its useless, do we really
need to include in Fedora?

Moreover, personally, I just find it nicer and more intuitive than  
passing either CPPFLAGS,

or adding it to config.h..  ;)



So have at. But I don't see how adding Yet More AutoFu changes much of  
anything at all.


73 de Jeff



Re: [CVS] RPM: rpm/ CHANGES Makefile.am rpm/tests/ Makefile.am

2008-11-01 Thread Jeff Johnson

Adding test *.src.rpm packages does add a certain amount of bloat
to the rpm distribution tarball.

An alternative approach would require a reference URI, and
tie make check to wget and network access. Note that
make check already fetches popt-1.14-1.src.rpm, so it
would not be new behavior. OTOH, there are those who
likely do not wish a make check to do network accesses.

I dunno where the right balance point is between make check
and bloat yet.

I'm open to suggestions. Meanwhile, make check has certainly
not been functional outside of rpm5.org CVS yet.

73 de Jeff

On Nov 1, 2008, at 10:28 PM, Jeff Johnson wrote:


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



 Server: rpm5.org Name:   Jeff Johnson
 Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
 Module: rpm  Date:   02-Nov-2008 03:28:06
 Branch: HEAD Handle: 2008110202280401

 Modified files:
   rpm CHANGES Makefile.am
   rpm/tests   Makefile.am

 Log:
   - include tests/*.src.rpm, exclude tests/ref/CVS/*, with make  
dist.


 Summary:
   RevisionChanges Path
   1.2643  +1  -0  rpm/CHANGES
   2.223   +11 -1  rpm/Makefile.am
   1.34+3  -1  rpm/tests/Makefile.am
  



 patch -p0 '@@ .'
 Index: rpm/CHANGES
  
= 
= 
= 
= 
= 
= 
==

 $ cvs diff -u -r1.2642 -r1.2643 CHANGES
 --- rpm/CHANGES2 Nov 2008 00:55:29 -   1.2642
 +++ rpm/CHANGES2 Nov 2008 02:28:04 -   1.2643
 @@ -1,5 +1,6 @@

  5.2a2 - 5.2a3:
 +- jbj: include tests/*.src.rpm, exclude tests/ref/CVS/*, with  
make dist.
  - proyvind: lua: explicitly link against libexpat as  
assumption on implicit

linking cannot be guaranteed.
  - proyvind: add --with-extra-path-macros configure option that  
adds

 @@ .
 patch -p0 '@@ .'
 Index: rpm/Makefile.am
  
= 
= 
= 
= 
= 
= 
==

 $ cvs diff -u -r2.222 -r2.223 Makefile.am
 --- rpm/Makefile.am21 Aug 2008 13:15:29 -  2.222
 +++ rpm/Makefile.am2 Nov 2008 02:28:05 -   2.223
 @@ -32,7 +32,17 @@
  	python/mpw/Makefile.am python/mpw/test/* python/test/resources/*  
python/test/dscmp \
  	python/test/psTest.py python/test/testhdr python/test/testit  
python/test/testmi \

python/test/testrollback.py python/test/dsMerge.py \
 -	python/rpm/__init__.py python/[a-z]* python/Makefile.in python/ 
Makefile.am
 +	python/rpm/__init__.py python/[a-z]* python/Makefile.in python/ 
Makefile.am \

 +  tests/devtool-sanity-1.0-1.src.rpm \
 +  tests/edos-test-1-0.src.rpm \
 +  tests/probes-test-1-0.src.rpm \
 +  tests/triggers-D-1.0-1.src.rpm \
 +  tests/triggers-DP-1.0-1.src.rpm \
 +  tests/triggers-F-1.0-1.src.rpm \
 +  tests/triggers-FP-1.0-1.src.rpm \
 +  tests/triggers-N-1.0-1.src.rpm \
 +  tests/triggers-NA-1.0-1.src.rpm \
 +  tests/triggers-P-1.0-1.src.rpm

  SUBDIRS =
  if USE_NLS
 @@ .
 patch -p0 '@@ .'
 Index: rpm/tests/Makefile.am
  
= 
= 
= 
= 
= 
= 
==

 $ cvs diff -u -r1.33 -r1.34 Makefile.am
 --- rpm/tests/Makefile.am  15 Oct 2008 18:15:31 -  1.33
 +++ rpm/tests/Makefile.am  2 Nov 2008 02:28:05 -   1.34
 @@ -2,7 +2,9 @@

  AUTOMAKE_OPTIONS = 1.4 foreign

 -EXTRA_DIST =  ref/* ref/.alldigests
 +# Note: *.src.rpm's cannot be added here because of suffix rules.
 +EXTRA_DIST =  ref/[^C]* ref/.alldigests
 +
  SUBDIRS =

  macros =  $(abs_top_builddir)/macros:$(testdir)/macros
 @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repository[EMAIL PROTECTED]


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