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

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   20-Jan-2008 12:13:41
  Branch: HEAD                             Handle: 2008012011134100

  Modified files:
    rpm                     configure.ac
    rpm/rpmio               rpmlua.c

  Log:
    Now that we have a generic configurable mechanism for loading RPM Lua
    init scripts, use this instead of the hard-coded approach

  Summary:
    Revision    Changes     Path
    2.279       +1  -1      rpm/configure.ac
    2.45        +1  -11     rpm/rpmio/rpmlua.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.278 -r2.279 configure.ac
  --- rpm/configure.ac  20 Jan 2008 10:32:35 -0000      2.278
  +++ rpm/configure.ac  20 Jan 2008 11:13:41 -0000      2.279
  @@ -1469,7 +1469,7 @@
   
   dnl # determine RPM Lua script files path
   AC_MSG_CHECKING([for RPM Lua script files path])
  -RPMLUAFILES="${USRLIBRPM}/rpmlua"
  +RPMLUAFILES="${USRLIBRPM}/init.lua:${USRLIBRPM}/rpmlua"
   RPMLUAFILES="${RPMLUAFILES}:${USRLIBRPM}/%{_target}/rpmlua"
   RPMLUAFILES="${RPMLUAFILES}:${SYSCONFIGDIR}/rpmlua.*"
   RPMLUAFILES="${RPMLUAFILES}:${SYSCONFIGDIR}/rpmlua"
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmlua.c
  ============================================================================
  $ cvs diff -u -r2.44 -r2.45 rpmlua.c
  --- rpm/rpmio/rpmlua.c        20 Jan 2008 10:32:36 -0000      2.44
  +++ rpm/rpmio/rpmlua.c        20 Jan 2008 11:13:41 -0000      2.45
  @@ -104,8 +104,7 @@
        lua_call(L, 1, 0);
   /[EMAIL PROTECTED]@*/
       }
  -#define      _LUADOTDIR      "%{?_rpmhome}%{!?_rpmhome:" USRLIBRPM "}"
  -    {        const char * _lua_path = rpmGetPath(_LUADOTDIR, "/lua/?.lua", 
NULL);
  +    {        const char * _lua_path = rpmGetPath("%{?_rpmhome}%{!?_rpmhome:" 
USRLIBRPM "}", "/lua/?.lua", NULL);
        if (_lua_path != NULL) {
            lua_pushliteral(L, "LUA_PATH");
            lua_pushstring(L, _lua_path);
  @@ -117,15 +116,6 @@
       lua_pushcfunction(L, rpm_print);
       lua_rawset(L, LUA_GLOBALSINDEX);
       rpmluaSetData(lua, "lua", lua);
  -    {        const char * _lua_init = rpmGetPath(_LUADOTDIR, "/init.lua", 
NULL);
  -     if (_lua_init != NULL) {
  -         struct stat st;
  -         if (Stat(_lua_init, &st) != -1)
  -             (void)rpmluaRunScriptFile(lua, _lua_init);
  -         _lua_init = _free(_lua_init);
  -     }
  -    }
  -#undef       _LUADOTDIR
   
       /* load all standard RPM Lua script files */
       path_buf = xstrdup(RPMLUAFILES);
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                [email protected]

Reply via email to