Commit graph

29 commits

Author SHA1 Message Date
Alex Kost
6caa4dfa37 Do not check package freshness during upgrade.
Fixes <http://bugs.gnu.org/22740>.
Reported by Andreas Enge <andreas@enge.fr>.

* gnu/packages.scm (waiting, ftp-open*, check-package-freshness): Remove.
* guix/scripts/package.scm (options->installable): Adjust accordingly.
* emacs/guix-main.scm (package->manifest-entry*): Likewise.
2016-02-24 18:24:16 +03:00
Ludovic Courtès
724a7d9c74 packages: Remove now redundant graph procedures.
These procedures are now redundant with those in (guix graph) and are no
longer used since commit a51cbecb.

* gnu/packages.scm (vhash-refq, package-dependencies)
(package-direct-dependents, package-transitive-dependents)
(package-covering-dependents): Remove.
2015-12-20 22:34:22 +01:00
Ludovic Courtès
861be0cc1d packages: Update 'check-package-freshness' to use (guix upstream).
This is a followup to 0a7c5a0.
Reported by Efraim Flashner <efraim@flashner.co.il>.

* gnu/packages.scm (check-package-freshness): Update to the new (guix
  upstream) interface.
2015-10-21 18:28:14 +02:00
Ludovic Courtès
84189ebc66 Move 'specification->package+output' to (gnu packages).
* guix/scripts/package.scm (specification->package+output): Move to...
* gnu/packages.scm (specification->package+output): ... here
* guix/scripts/archive.scm (guix): Adjust accordingly.
2015-06-18 00:25:48 +02:00
Ludovic Courtès
724311a26b packages: Allow package lookups with version prefixes.
* gnu/packages.scm (find-packages-by-name): Sort MATCHING according to
  'version>?'.  Use 'string-prefix?' instead of 'string=?' to compare
  against VERSION.
* doc/guix.texi (Invoking guix package): Add example and explanation.
2015-04-18 22:57:52 +02:00
宋文武
cf3e3e374c Merge branch 'master' into core-updates 2015-04-08 16:04:37 +08:00
Ludovic Courtès
4ae7559fd6 gnu: Emit a warning when a package module cannot be loaded.
* guix/ui.scm (warn-about-load-error): New procedure.
* gnu/packages.scm (package-modules): Wrap 'resolve-interface' call in
  'catch #t', and call 'warn-about-load-error' in handler.
2015-04-07 22:28:36 +02:00
Alex Kost
0492f4a2b9 packages: Fix typo.
* gnu/packages.scm: Fix the name of an exported variable (%patch-path).
2015-04-03 15:20:44 +03:00
Ludovic Courtès
dfba54893e gnu: Raise an error when a bootstrap binary is not found.
* gnu/packages.scm (search-bootstrap-binary): Raise an error when
  FILE-NAME is not found.
2015-01-26 00:06:32 +01:00
Ludovic Courtès
dbab5150f8 gnu: 'search-patch' raises an error when a patch is not found.
* gnu/packages.scm (search-patch): Raise an error condition when
  'search-path' returns #f.
* tests/packages.scm ("patch not found yields a run-time error"): New
  test.
2015-01-20 10:17:24 +01:00
Ludovic Courtès
ee06af5b4b gnu: Search for patches under $GUIX_PACKAGE_PATH.
Fixes <http://bugs.gnu.org/19364>.
Reported by Tomáš Čech <sleep_walker@suse.cz>
and Mark H Weaver <mhw@netris.org>.

* gnu/packages.scm (%patch-path): Move after definition of
  %package-module-path'.  Append "/gnu/packages/patches" only to
  %DISTRO-ROOT-DIRECTORY.
* tests/guix-package.sh: Add 'emacs-foo-bar-patched' test.
2015-01-03 23:49:42 +01:00
Ludovic Courtès
d95523fb8b packages: Sort Scheme file lists used by 'fold-packages'.
* gnu/packages.scm (scheme-files): Call 'sort' on result.
2014-12-21 12:29:14 +01:00
Ludovic Courtès
501d764751 gnu-maintenance: Introduce <gnu-release> data type.
* guix/gnu-maintenance.scm (<gnu-release>): New record type.
  (release-file): Rename to...
  (release-file?): ... this.  Return a Boolean.
  (tarball->version, coalesce-releases): New procedures.
  (releases): Call 'coalesce-releases' on RESULT.  Return <gnu-release>
  objects instead of pairs.
  (latest-release): Likewise.
  (package-update-path): Adjust accordingly.
* gnu/packages.scm (check-package-freshness): Adjust accordingly.
2014-11-11 15:31:35 +01:00
Ludovic Courtès
9ffc1c00e5 packages: Optimize 'find-packages-by-name' to avoid disk accesses.
On a profile with 182 entries, "guix package --search-paths" goes from
4.5 seconds down to 0.4 second.

* gnu/packages.scm (find-packages-by-name): Make a name -> package vhash
  in a promise; access it with 'vhash-fold*'.
2014-09-29 22:03:46 +02:00
Ludovic Courtès
8689901f95 Introduce the 'GUIX_PACKAGE_PATH' environment variable.
* gnu/packages.scm (%package-module-path): Honor $GUIX_PACKAGE_PATH.
* test-env.in: Unset 'GUIX_PACKAGE_PATH'.
* tests/guix-package.sh: Test it.
* doc/guix.texi (Package Modules): Document it.
2014-09-24 14:06:09 +02:00
Ludovic Courtès
c107b54108 packages: Add '%package-module-search-path'.
* gnu/packages.scm (%package-module-path): New variable.
  (all-package-modules): New procedure.
  (fold-packages): Use it instead of 'package-modules'.
2014-09-24 14:06:08 +02:00
Ludovic Courtès
84836a5733 packages: Generalize package module search.
* gnu/packages.scm (%distro-root-directory): New variable.
  (%distro-module-directory): Remove.
  (package-files): Rename to...
  (scheme-files): ... this.  Return absolute file names, not stripped.
  (file-name->module-name): New procedure.
  (package-modules): Add 'directory' and 'sub-directory' parameters.
  Rewrite accordingly.
  (fold-packages): Adjust 'package-modules' call accordingly.
2014-09-24 10:23:27 +02:00
Cyril Roelandt
5e3b388b51 Move specification->package to gnu/packages.scm.
* guix/scripts/build.scm (specification->package): Move from here...
* gnu/packages.scm: ... to here.
2014-09-03 02:07:07 +02:00
Alex Kost
4ea444198d Move 'check-package-freshness' from 'guix package' to 'packages'.
* guix/scripts/package.scm (%sigint-prompt, call-with-sigint-handler)
  (waiting, ftp-open*, check-package-freshness): Move to...
* gnu/packages.scm: ... here.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-08-20 10:55:29 +02:00
Alex Kost
b211a66163 packages: Remove dead code.
* gnu/packages.scm (_): Remove.
  Remove an extra space.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-08-19 23:07:48 +02:00
Eric Bavier
7d193ec348 guix: refresh: Add --list-dependent option.
* guix/packages.scm (package-direct-inputs): New procedure.
* gnu/packages.scm (vhash-refq, package-direct-dependents)
  (package-transitive-dependents, package-covering-dependents): New procedures.
* guix/scripts/refresh.scm (%options, show-help, guix-refresh): Add
  --list-dependent option.
* doc/guix.texi (Invoking guix refresh): Document '--list-dependent' option.
2014-07-20 11:36:09 -05:00
Ludovic Courtès
3f26bfc18a Factorize package search between 'guix package' and 'guix build'.
* guix/scripts/package.scm (newest-available-packages): Remove.
  (find-best-packages-by-name): Move to...
* gnu/packages.scm (find-best-packages-by-name): ... here.
  (find-newest-available-packages): Memoize.
* guix/scripts/build.scm (specification->package): New procedure,
  formerly called 'find-package' within 'guix-build'.
  (guix-build): Adjust accordingly.
2013-12-21 22:36:32 +01: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
04fd96cac3 utils: Add `fold2'.
* gnu/packages.scm (fold2): Remove.
* guix/utils.scm (fold2): New procedure.  Generalization of the above to
  one and two lists.
* tests/utils.scm ("fold2, 1 list", "fold2, 2 lists"): New tests.
2013-04-14 16:56:08 +02:00
Ludovic Courtès
128663e4c8 store: Really disable file name canonicalization for derivation inputs.
* guix/store.scm (write-contents)[call-with-binary-input-file]: Set
  %FILE-PORT-NAME-CANONICALIZATION to #f.
* gnu/packages.scm (search-patch, search-bootstrap-binary): Leave
  %FILE-PORT-NAME-CANONICALIZATION unchanged.  This reverts 9776ebb.
2013-03-22 23:15:34 +01:00
Ludovic Courtès
9776ebb2a5 gnu: Disable file name canonicalization in `search-*'.
* gnu/packages.scm (search-patch, search-bootstrap-binary): Make sure no
  canonicalization occurs.  This reduces the number of 'stat' system
  calls.
2013-03-21 00:32:26 +01:00
Mark H Weaver
dc5669cd65 Build newest versions unless specified, and implement upgrades.
* gnu/packages.scm (find-newest-available-packages):
  New exported procedure.

* guix-build.in (newest-available-packages, find-best-packages-by-name):
  New procedures.
  (find-package): Use find-best-packages-by-name, to guarantee that
  if a version number is not specified, only the newest versions will
  be considered.

* guix-package.in (%options): Add --upgrade/-u option.
  (newest-available-packages, find-best-packages-by-name, upgradeable?):
  New procedures.
  (find-package): Use find-best-packages-by-name, to guarantee that
  if a version number is not specified, only the newest versions will
  be considered.
  (process-actions): Implement upgrade option.

* doc/guix.texi (Invoking guix-package): In the description of --install,
  mention that if no version number is specified, the newest available
  version will be selected.
2013-02-13 22:05:19 -05:00
Mark H Weaver
c2868b1e0c Inhibit duplicates in fold-packages.
* gnu/packages.scm (fold2): New procedure.
  (fold-packages): Rework to suppress duplicates.
2013-02-13 20:56:52 -05:00
Ludovic Courtès
59a43334a9 distro: Rename (distro) to (gnu packages).
* distro.scm: Rename to...
* gnu/packages.scm: ... this.  Update all users accordingly.
* Makefile.am (MODULES): Adjust accordingly.
* po/POTFILES.in: Likewise.
2013-01-18 01:07:53 +01:00
Renamed from distro.scm (Browse further)