Commit Graph

3 Commits

Author SHA1 Message Date
Ludovic Courtès 923206f79b guix-register: Allow the initial directory creation to proceed.
This fixes a bug whereby 'guix-register' would bail out when trying to
create NIX_STORE_DIR/.links when NIX_STORE_DIR is read-only.

* nix/guix-register/guix-register.cc (parse_opt): Initialize
  'settings.nixStore' to PREFIX + NIX_STORE_DIR.
  (main): Change 'settings.nixStore' once the 'LocalStore' has been
  instantiated.
2013-09-24 23:40:49 +02:00
Ludovic Courtès caf96debc2 guix-register: Expect closures to refer to the original store.
* nix/guix-register/guix-register.cc (prefix): New variable.
  (parse_opt): Use it.
  (register_validity): Change 'info.path' to the final store name.
  Hash the final under its real path.
* tests/guix-register.sh: Adjust the contents of $closure accordingly.
  Rename 'NIX_LOCALSTATE_DIR' to 'NIX_STATE_DIR'.  Don't try to call
  'valid-path?'.  Add test using 'sqlite3'.
2013-09-23 23:56:35 +02:00
Ludovic Courtès a7a4e6a4f7 Add 'guix-register'.
* nix/guix-register/guix-register.cc, tests/guix-register.sh: New
  files.
* Makefile.am (SH_TESTS)[BUILD_DAEMON]: Add tests/guix-register.sh.
* daemon.am (sbin_PROGRAMS, guix_register_SOURCES,
  guix_register_CPPFLAGS, guix_register_LDADD): New variables.
* test-env.in: Export 'storedir', 'prefix', 'datarootdir', 'datadir',
  and 'localstatedir'.
2013-09-23 00:33:50 +02:00