From: Kern Sibbald Date: Mon, 18 Apr 2005 11:52:34 +0000 (+0000) Subject: Make Bacula build without Python X-Git-Tag: Release-1.38.0~556 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a4cc9bb006b83601483a1840e298302005f9ec40;p=bacula%2Fbacula Make Bacula build without Python git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1935 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 3e97c0ef47..d8ef55de0d 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -28,6 +28,8 @@ Autochangers: all Volumes from other drives. "update slots all-drives"? For 1.37: +- Make a callback when Rerun failed levels is called. +- Give Python program access to Scheduled jobs. - Implement some way to turn off automatic pruning in Jobs. - Implement a way an Admin Job can prune, possibly multiple clients -- Python script? @@ -1302,4 +1304,3 @@ Block Position: 0 - Solicit Events - Add disk seeking on restore; turn off seek on tapes. stored/match_bsr.c - diff --git a/bacula/src/filed/python.c b/bacula/src/filed/python.c index c63a7c4c1c..ea7c0cdb6d 100644 --- a/bacula/src/filed/python.c +++ b/bacula/src/filed/python.c @@ -214,4 +214,11 @@ int generate_job_event(JCR *jcr, const char *event) return 1; } +#else + +/* Dummy if Python not configured */ +int generate_job_event(JCR *jcr, const char *event) +{ return 1; } + + #endif /* HAVE_PYTHON */ diff --git a/bacula/src/findlib/bfile.c b/bacula/src/findlib/bfile.c index 3ddc1d88bb..64231a5594 100644 --- a/bacula/src/findlib/bfile.c +++ b/bacula/src/findlib/bfile.c @@ -454,15 +454,18 @@ bool is_portable_backup(BFILE *bfd) bool set_prog(BFILE *bfd, char *prog, JCR *jcr) { +#ifdef HAVE_PYTHON if (bfd->prog && strcmp(prog, bfd->prog) == 0) { return true; /* already setup */ } + int stat = generate_job_event(jcr, "Reader"); if (stat == 1 && bfd->pio.fo && bfd->pio.fr && bfd->pio.fc) { bfd->prog = prog; bfd->jcr = jcr; return true; } +#endif bfd->prog = NULL; return false; diff --git a/bacula/src/stored/python.c b/bacula/src/stored/python.c index ea40ba4dfc..00e95f78ad 100644 --- a/bacula/src/stored/python.c +++ b/bacula/src/stored/python.c @@ -197,4 +197,11 @@ int generate_job_event(JCR *jcr, const char *event) return 1; } +#else + +/* Dummy if Python not configured */ +int generate_job_event(JCR *jcr, const char *event) +{ return 1; } + + #endif /* HAVE_PYTHON */