Skip to content
Permalink
Browse files

Ad AD_MAINTAINER env variable and make legacy MAINTAINER env variable…

… working.
  • Loading branch information...
liske committed Jul 10, 2015
1 parent bbf40a2 commit c42ba50c90fa1e01e50ab150ba4cf00c7480d9dd
Showing with 7 additions and 5 deletions.
  1. +1 −0 README.hooks
  2. +6 −1 src/env.c
  3. +0 −4 src/ui.c
@@ -57,6 +57,7 @@ apt-dater configuration:
AD_HOOK_PRE_REFRESH
AD_HOOK_PRE_UPDATE
AD_HOSTSFILE
AD_MAINTAINER
AD_SCREENRCFILE
AD_SFTP_CMD
AD_SSH_CMD
@@ -23,6 +23,7 @@
*/

#include "env.h"
#include "ui.h"

GSList *base_env = NULL;

@@ -68,7 +69,7 @@ env_init(gchar **envp) {

gchar **
env_build(HostNode *n, const gchar *action, const gchar *param, const HistoryEntry *he) {
gchar **new_env = (gchar **) g_new0(gchar**, g_slist_length(base_env) + 22
gchar **new_env = (gchar **) g_new0(gchar**, g_slist_length(base_env) + 24
#ifdef FEAT_CLUSTERS
+ g_list_length(n->clusters)
#endif
@@ -150,5 +151,9 @@ env_build(HostNode *n, const gchar *action, const gchar *param, const HistoryEnt
else
ADD_HENV("PARAM" , "");

ADD_HENV("MAINTAINER", maintainer);
/* add legacy MAINTAINER env variable */
new_env[i++] = g_strdup_printf("MAINTAINER=%s", maintainer);

return new_env;
}
@@ -1858,8 +1858,6 @@ void doUI (GList *hosts)
strncpy(maintainer, pw->pw_name, sizeof(maintainer));
else
maintainer[0] = 0;

setenv("MAINTAINER", maintainer, TRUE);
}

if ((cfg->query_maintainer == 1) ||
@@ -1886,8 +1884,6 @@ void doUI (GList *hosts)

delwin(w);
refreshDraw();

setenv("MAINTAINER", maintainer, TRUE);
}
}

0 comments on commit c42ba50

Please sign in to comment.
You can’t perform that action at this time.