Subject: 'guix-register -p' should perform deduplication

From: [email-masked] (Ludovic Courtès)
Date: Thu, 13 Nov 2014 17:56:35 +0100

When used with -p (as is the case when building a disk/VM image),
‘guix-register’ doesn’t do any deduplication in the target store, as
noted in the source:

  /* XXX: When PREFIX is non-empty, store->linksDir points to the original
     store's '.links' directory, which means 'optimisePath' would try to link
     to that instead of linking to the target store.  Thus, disable
     deduplication in this case.  */
  if (optimize && prefix.empty ())
    {
      /* Make sure deduplication is enabled.  */
      settings.autoOptimiseStore = true;

      foreach (ValidPathInfos::const_iterator, i, infos)
	store->optimisePath (i->path);
    }

This should be fixed, but may need to diverge slightly from upstream
libstore.

Ludo’.