Commit Graph

21 Commits

Author SHA1 Message Date
Ludovic Courtès c0cd1b3ea7 Move record utilities to (guix records).
* guix/utils.scm (define-record-type*): Move to...
* guix/records.scm: ... here.  New file.
* guix/build-system.scm, guix/packages.scm: Use it.
* guix/gnu-maintenance.scm: Likewise.
  (official-gnu-packages)[alist->record]: Remove.
* guix/scripts/substitute-binary.scm: Likewise.
  (alist->record, object->fields): Remove.
* tests/utils.scm ("define-record-type*", "define-record-type* with
  letrec* behavior", "define-record-type* & inherit",
  "define-record-type* & inherit & letrec* behavior",
  "define-record-type* & thunked", "define-record-type* & thunked &
  default", "define-record-type* & thunked & inherited"): Move to...
* tests/records.scm: ... here.  New file.
2013-05-12 15:46:16 +02:00
Ludovic Courtès a4007c9852 gnu-maintenance: Add GnuTLS FTP server.
* guix/gnu-maintenance.scm (ftp-server/directory)[quirks]: Add GnuTLS.
2013-05-10 01:15:04 +02:00
Ludovic Courtès c4ca12c15b gnu-maintenance: Fix error message of `update-package-source'.
* guix/gnu-maintenance.scm (update-package-source): In the (not loc)
  case, pass the location first and convert it to a string.
2013-04-27 22:52:43 +02:00
Ludovic Courtès 049b2f1d7b gnu-maintenance: Fix `latest-release' for GnuPG.
* guix/gnu-maintenance.scm (latest-release): Filter out directories
  whose name does not contain digits early in the process.  This fixes
  (latest-release "gnupg").
2013-04-27 16:26:48 +02:00
Ludovic Courtès dfb43e45b5 gnu-maintenance: Add newline in warning messages.
* guix/gnu-maintenance.scm (download-tarball): Add newline in warning
  messages.
2013-04-25 23:07:24 +02:00
Ludovic Courtès 1c9e7d65d4 web: Factorize `http-get' hackery.
This should fix `substitute-binary --query' on Guile 2.0.5.

* guix/web.scm: New file.
* Makefile.am (MODULES): Add it.
* po/POTFILES.in: Add it.
* guix/gnu-maintenance.scm (http-fetch): Remove.
  (%package-list-url): Turn into a URI.
  (official-gnu-packages): Add #:text? #t to `http-fetch' call.
* guix/scripts/substitute-binary.scm (fetch): Remove `http' case, and
  use `http-fetch' instead.
2013-04-25 22:14:51 +02:00
Ludovic Courtès 65b96a0c10 gnu-maintenance: Optimize `gnu-package?'.
* guix/gnu-maintenance.scm (gnu-package?): Capture a memoizing version
  of `gnu-package?'.
2013-04-25 00:13:56 +02:00
Ludovic Courtès d55a99fed3 gnu-maintenance: Optimize `release-file'.
* guix/gnu-maintenance.scm (tarball-regexp): Remove.
  (%tarball-rx): New variable.
  (release-file): Adjust to use %TARBALL-RX.
2013-04-25 00:13:56 +02:00
Ludovic Courtès cac137aa84 gnu-maintenance: Optimize `latest-release'.
* guix/gnu-maintenance.scm (tarball-regexp, sans-extension,
  release-file): New procedures.
  (%alpha-tarball-rx): New variable.
  (releases): Use them instead of local copies.
  (latest-release): Rewrite to not do a recursive search of all
  versions and instead jump directly to the latest.
2013-04-25 00:13:56 +02:00
Ludovic Courtès 0fdd3bea58 Add `guix refresh' and related auto-update tools.
* guix/gnu-maintenance.scm (ftp-server/directory)[quirks]: Add glib.
  (package-update-path, download-tarball, package-update,
  update-package-source): New procedures.
* guix/gnupg.scm, guix/scripts/refresh.scm: New files.
* Makefile.am (MODULES): Add them.
* guix/utils.scm (file-extension): New procedure.
2013-04-25 00:13:56 +02:00
Nikita Karetnikov 98eb8cbe8d ui: Add a 'define-diagnostic' macro.
* guix/ui.scm (define-diagnostic): New macro, which is based on the
  previous version of 'warning'.
  (warning, leave): Redefine using 'define-diagnostic'.
  (report-error): New macro.
  (install-locale): Use 'warning' instead of 'format'.
  (call-with-error-handling): Adjust 'leave'.
* gnu/packages.scm (package-files): Use 'warning' instead of 'format'.
* guix/gnu-maintenance.scm (http-fetch): Use 'warning' and 'leave'.
* guix/scripts/build.scm (derivations-from-package-expressions, guix-build):
  Adjust 'leave'.
* guix/scripts/download.scm (guix-download): Adjust 'leave'.
* guix/scripts/gc.scm (size->number, %options): Adjust 'leave'.
* guix/scripts/package.scm (roll-back, guix-package): Adjust 'leave'.
* po/POTFILES.in: Add 'guix/gnu-maintenance.scm'.
2013-04-21 08:08:40 +00:00
Ludovic Courtès ef8c03407d gnu-maintenance: Adjust `http-fetch' to the various Guile versions.
* guix/gnu-maintenance.scm (http-fetch): Try #:streaming? #t, or
  'http-get*', or 'http-get' as a last resort.  Check whether DATA is
  #f, a string, or an input port.
2013-04-01 00:41:55 +02:00
Nikita Karetnikov f9bbf2a819 gnu-maintenance: Improve 'official-gnu-packages'; add related procedures.
* guix/gnu-maintenance.scm (http-fetch): Return an input port.
  (<gnu-package-descriptor>): Add it.
  (official-gnu-packages): Use <gnu-package-descriptor>.
  (find-packages): Add it.
  (gnu-package?): Adjust accordingly.
2013-03-28 22:00:10 +00:00
Ludovic Courtès 993fb66dd2 guix package: Gracefully handle `official-gnu-packages' failure.
* guix/gnu-maintenance.scm (http-fetch): Error out when DATA is #f.
* guix/scripts/package.scm (check-package-freshness): Wrap
  `gnu-package?' call in `false-if-exception'.
  Reported by Cyril Roelandt <tipecaml@gmail.com>.
2013-03-16 00:59:19 +01:00
Ludovic Courtès 6a917ef7e6 gnu-maintenance: Clarify `releases'.
* guix/gnu-maintenance.scm (releases): Change to use `match' and
  `match-lambda'.  Add `release-file' auxiliary function.
2013-03-05 22:31:19 +01:00
Ludovic Courtès 296540a6db gnu-maintenance: Fix `gnu-package?' for packages lacking a `source'.
* guix/gnu-maintenance.scm (gnu-package?): Support PACKAGE when its
  source is #f.
2013-03-05 22:25:40 +01:00
Ludovic Courtès ef010c0f3d guix package: Inform about new upstream versions of GNU packages.
* guix/gnu-maintenance.scm (gnu-package?): New procedure.
* guix/scripts/package.scm (waiting): New macro.
  (check-package-freshness): New procedure.
  (guix-package)[process-actions]: Use it.
* doc/guix.texi (Invoking guix package): Mention the feature.
2013-03-05 20:35:47 +01:00
Mark H Weaver 0d1e6ce4d2 Add version-compare and version>? to utils.scm.
* guix/utils.scm (version-compare, version>?): New exported procedures,
  based on version-string>?, which was formerly in gnu-maintenance.scm.

* guix/gnu-maintenance.scm (version-string>?): Removed procedure.
  (latest-release): Use 'version>?' instead of 'version-string>?'.
2013-02-12 20:34:25 -05:00
Ludovic Courtès 98fefb210a gnu-maintenance: Add `latest-release' and related tools.
* guix/gnu-maintenance.scm (ftp-server/directory, releases,
  version-string>?, latest-release, gnu-package-name->name+version): New
  procedures.
  (%package-name-rx): New variable.
2013-01-08 22:46:12 +01:00
Ludovic Courtès 233e76769a Update license headers.
Change all license headers, except guix/build/* and ld-wrapper.scm, with
this code:

  (use-modules (guix build utils)
	       (srfi srfi-1))

  (fluid-set! %default-port-encoding "UTF-8")

  (substitute* (remove (lambda (f)
			 (or (string-contains f ".tar.")
			     (string-contains f ".git/")
			     (string-contains f ".so")
			     (string-suffix? ".o" f)
			     (string-suffix? ".a" f)
			     (string-suffix? ".go" f)
			     (string-suffix? ".pdf" f)
			     (string-suffix? ".png" f)
			     (string-suffix? ".info" f)
			     (equal? (basename f) "guix-daemon")
			     (equal? (basename f) "nix-setuid-helper")
			     (string-contains f "nix-upstream/")
			     (string-contains f "distro/packages/bootstrap/")))
		       (find-files "." "\\.[a-z]+$"))
    (("^([[:graph:]]+) This file is part of Guix." _ comment-start)
     (string-append comment-start " This file is part of GNU Guix."))
    (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
     (string-append comment-start
		    " GNU Guix --- Functional package management for GNU\n"))
    (("^([[:graph:]]+) Guix is " _ comment-start)
     (string-append comment-start " GNU Guix is "))
    (("^([[:graph:]]+) along with Guix." _ comment-start)
     (string-append comment-start " along with GNU Guix."))
    (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
     (string-append comment-start " Copyright ©")))

Change headers using C-style comments manually.
2013-01-06 00:47:50 +01:00
Nikita Karetnikov 22189ed117 Add (guix gnu-maintenance).
* guix/gnu-maintenance.scm: New file.
* Makefile.am (MODULES): Add it.
2012-12-05 14:56:25 +01:00