Changeset 308 for trunk


Ignore:
Timestamp:
01/27/10 16:23:38 (14 years ago)
Author:
bas
Message:

Added a patch to set teh PYTHON_EGG_CACHE environment variable in run_email2trac, closes #174

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/debian/changelog

    r306 r308  
     1email2trac (1.2.0-1) stable; urgency=low
     2
     3  * Added an option to run_email2trac to set the PYTHON_EGG_CACHE
     4    environment variable (-e|--eggcache), closes #174
     5    Author: pepl at cpan dot org
     6    Applied by: Bas van der Vlies
     7
     8 -- Bas van der Vlies <basv@sara.nl>  Wed, 27 Jan 2010 16:17:41 +0100
     9
    110email2trac (1.1.0-6) stable; urgency=low
    211
  • trunk/run_email2trac.c

    r202 r308  
    5656
    5757  char   **trac_script_args;
     58  char   *python_egg_cache;
    5859  struct passwd *TRAC;
    5960  struct passwd *MTA;
     
    8081      continue;
    8182    }
     83    else if ( (strcmp(argv[i],"--eggcache") == 0) ||
     84         (strcmp(argv[i],"-e") == 0) ) {
     85      i++;
     86      python_egg_cache = argv[i];
     87      continue;
     88    }
    8289   
    8390    trac_script_args[j] = argv[i];
     
    8693  trac_script_args[j] = NULL;
    8794
    88  
    8995  /* Check caller */
    90 
    91 
    9296  check_username(MTA_USER);
    9397  MTA = getpwnam(MTA_USER);
     
    102106    return -2;     /* 254 : Invalid caller */
    103107  }
    104  
    105108 
    106109  /* set UID/GID to Trac (or apache) user */
     
    122125  }
    123126 
     127  /* Set PYTHON_EGG_CACHE env variable if we have been told to do so */
     128  if ( strlen(python_egg_cache) > 0 ) {
     129    setenv("PYTHON_EGG_CACHE",python_egg_cache ,1);
     130  }
     131
    124132  /* Execute script */
    125133  status = execv(trac_script, trac_script_args);
     134 
    126135  if ( DEBUG ) printf("Script %s execution failure (error=%d). Check permission and interpreter path.\n",trac_script,status);
    127136  return -1;     /* 255 : should never reach this point */
Note: See TracChangeset for help on using the changeset viewer.