diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2016-06-26 17:02:23 +0200 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2016-06-26 17:02:23 +0200 |
commit | 5efdcb444139d6d9354c3aa740c3218beee75646 (patch) | |
tree | c531572848938be4cd9db7aa32af22a02c7e7d35 | |
parent | 944f8b546776e20c90c57bb21a7cbc63d6e604da (diff) | |
download | cuirass-5efdcb444139d6d9354c3aa740c3218beee75646.tar cuirass-5efdcb444139d6d9354c3aa740c3218beee75646.tar.gz |
Add a '--database' command line argument.
-rw-r--r-- | bin/cuirass.in | 7 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/cuirass/config.scm.in | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/bin/cuirass.in b/bin/cuirass.in index 3b34493..87dd0ad 100644 --- a/bin/cuirass.in +++ b/bin/cuirass.in @@ -21,7 +21,8 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@" ;;; You should have received a copy of the GNU General Public License ;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>. -(use-modules (cuirass base) +(use-modules (cuirass config) + (cuirass base) (cuirass database) (cuirass job) (cuirass ui) @@ -34,6 +35,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@" Run Guix job from a git repository cloned in CACHEDIR. -f --use-file=FILE Use FILE which defines the job to evaluate + -D --database=DB Use DB to store build results. -I, --interval=N Wait N seconds between each evaluation -V, --version Display version -h, --help Display this help message") @@ -42,6 +44,7 @@ Run Guix job from a git repository cloned in CACHEDIR. (define %options `((file (single-char #\f) (value #t)) + (database (single-char #\f) (value #t)) (interval (single-char #\I) (value #t)) (version (single-char #\V) (value #f)) (help (single-char #\h) (value #f)))) @@ -109,7 +112,7 @@ DIR if required." (exit 0)) (else (let* ((specfile (option-ref opts 'file "tests/hello-subset.scm")) - (dbfile "tmp.db") + (dbfile (option-ref opts 'database %package-database)) (specs (primitive-load specfile)) (args (option-ref opts '() #f)) (cachedir (if (null? args) diff --git a/configure.ac b/configure.ac index 899db84..b8de869 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,12 @@ AM_SILENT_RULES([yes]) # enables silent rules by default AC_CANONICAL_HOST +# Prepare a version of $localstatedir that does not contain references to +# shell variables. +expanded_prefix="`eval echo $prefix | sed -e "s|NONE|/usr/local|g"`" +expanded_localstatedir="`eval echo $localstatedir | sed -e "s|NONE|$expanded_prefix|g"`" +AC_SUBST([expanded_localstatedir]) + PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.7]) AC_PATH_PROG([GUILE], [guile]) AC_PATH_PROG([GUILD], [guild]) diff --git a/src/cuirass/config.scm.in b/src/cuirass/config.scm.in index ef1b56b..8ef9d3e 100644 --- a/src/cuirass/config.scm.in +++ b/src/cuirass/config.scm.in @@ -46,3 +46,7 @@ (define-public %package-version ;; Define to the version of this package. "@PACKAGE_VERSION@") + +(define-public %package-database + ;; Define to the database file name of this package. + (string-append "@expanded_localstatedir@/" %package ".db")) |