From 57bdd79e485801ccf405ca7389bd099809fe5d67 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 3 Oct 2016 23:02:46 +0200 Subject: grafts: Allow the replacement to have a different name. * guix/build/graft.scm (replace-store-references): REPLACEMENT is now the full string, not just the hash. (rewrite-directory)[hash-mapping](valid-suffix?): Remove. (hash+suffix): Rename to... (hash+rest): ... this. Change to return the whole string as the second element of the list. Adjust 'match-lambda' expression accordingly; check whether the string length of the origin and replacement match. * tests/grafts.scm ("graft-derivation, grafted item uses a different name"): New test. * doc/guix.texi (Security Updates): Update sentence on the name/version restriction. --- doc/guix.texi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 73570277f6..9bd8b43582 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -11782,10 +11782,10 @@ minute for an ``average'' package on a recent machine. Grafting is recursive: when an indirect dependency requires grafting, then grafting ``propagates'' up to the package that the user is installing. -Currently, the graft and the package it replaces (@var{bash-fixed} and -@var{bash} in the example above) must have the exact same @code{name} -and @code{version} fields. This restriction mostly comes from the fact -that grafting works by patching files, including binary files, directly. +Currently, the length of the name and version of the graft and that of +the package it replaces (@var{bash-fixed} and @var{bash} in the example +above) must be equal. This restriction mostly comes from the fact that +grafting works by patching files, including binary files, directly. Other restrictions may apply: for instance, when adding a graft to a package providing a shared library, the original shared library and its replacement must have the same @code{SONAME} and be binary-compatible. -- cgit v1.2.3