You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Scott Lamb <sl...@slamb.org> on 2002/08/01 17:07:26 UTC
[PATCH] [KLUDGE] fix ra_loader
On Wed, Jul 31, 2002 at 10:04:55PM +0200, Branko ??ibej wrote:
> Scott Lamb wrote:
> >I've got a patch to the specfile to do this, but before I can use it, I
> >need ra_loader to work right. I'll try moving version to configure.in so
> >it can be used both in build-outputs.mk and in ra_loader.c
>
> ... and not at all on Windows, which doesn't use configure.in. We need a
> fix that can (be made to) work on all platforms.
I don't know how to do that. Is there any chance of this patch being
applied, that just hardcodes the version? I know it's not ideal - it
will break when the version changes. But it's broken now and this would
at least fix it for a while.
(Speaking of Windows, I think the thing never worked there - the other
### comment points out ".so" is assumed. I guess Apache never had this
problem because the name of the module was specified by the user in the
httpd.conf file.)
--
Scott Lamb
Fix --enable-dso
* subversion/libsvn_ra/ra_loader.c:
Include hardcoded version 1 in library to load.
Index: subversion/libsvn_ra/ra_loader.c
===================================================================
--- subversion/libsvn_ra/ra_loader.c
+++ subversion/libsvn_ra/ra_loader.c Thu Aug 1 11:57:41 2002
@@ -89,7 +89,9 @@
apr_status_t status;
/* ### fix the .so part */
- libname = apr_psprintf (pool, "libsvn_ra_%s.so", ra_name);
+ /* ### fix the build system to make version accessible from the source
+ on Unix and Windows */
+ libname = apr_psprintf (pool, "libsvn_ra_%s-1.so", ra_name);
funcname = apr_psprintf (pool, "svn_ra_%s_init", ra_name);
/* find/load the specified library */
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] [KLUDGE] fix ra_loader
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Scott Lamb <sl...@slamb.org> writes:
> I don't know how to do that. Is there any chance of this patch being
> applied, that just hardcodes the version? I know it's not ideal - it
> will break when the version changes. But it's broken now and this would
> at least fix it for a while.
Hmmm. Well, your patch has revealed a deeper problem, I think:
I was going to propose that the Right Fix here is not that hard: just
use SVN_VER_MAJOR from svn_version.h, and "%d" it into the string.
Simple, right?
But, SVN_VER_MAJOR is 0 currently. So I asked myself, how come the
libraries are getting installed under "libsvn_foo-1" right now, when
the whole point of the libsvn_foo numbers was supposedly to match the
major version number?
I found some clues in rev 2200:
It turns out that we're not getting the library version number from
svn_version.h, instead we're getting it from build.conf:
[options]
# for use in (include) paths and library construction
version = 1
Greg Stein, is there some reason we're not parsing this out of
svn_version.h? If it's supposed to match the major version, then we
should just get it from SVN_VER_MAJOR.
The fact that it was initialized to 1 instead of 0 makes me wonder
about my assertion that it's supposed to match the major version
number... But then again, I can't think of anything *else* it would be
tied to. The major version seems the obvious choice.
So Scott: first we need to get the above settled, then we can apply a
no-doubt-trivial Right Fix to ra_loader.c.
-Karl
> Fix --enable-dso
>
> * subversion/libsvn_ra/ra_loader.c:
> Include hardcoded version 1 in library to load.
>
> Index: subversion/libsvn_ra/ra_loader.c
> ===================================================================
> --- subversion/libsvn_ra/ra_loader.c
> +++ subversion/libsvn_ra/ra_loader.c Thu Aug 1 11:57:41 2002
> @@ -89,7 +89,9 @@
> apr_status_t status;
>
> /* ### fix the .so part */
> - libname = apr_psprintf (pool, "libsvn_ra_%s.so", ra_name);
> + /* ### fix the build system to make version accessible from the source
> + on Unix and Windows */
> + libname = apr_psprintf (pool, "libsvn_ra_%s-1.so", ra_name);
> funcname = apr_psprintf (pool, "svn_ra_%s_init", ra_name);
>
> /* find/load the specified library */
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org