Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when trying to rebuild Guix Home #8

Open
a12l opened this issue Nov 14, 2022 · 1 comment
Open

Errors when trying to rebuild Guix Home #8

a12l opened this issue Nov 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@a12l
Copy link

a12l commented Nov 14, 2022

Describe the bug

When I try to rebuild my config

$ cat a12l.scm
;; This "home-environment" file can be passed to 'guix home reconfigure'
;; to reproduce the content of your profile.  This is "symbolic": it only
;; specifies package names.  To reproduce the exact same profile, you also
;; need to capture the channels being used, as returned by "guix describe".
;; See the "Replicating Guix" section in the manual.

(use-modules (gnu home)
             (gnu packages)
             (gnu services))

(home-environment
  ;; Below is the list of packages that will show up in your
  ;; Home profile, under ~/.guix-home/profile.
  (packages (specifications->packages (list "fd"
                                            "kakoune"
                                            "ripgrep")))

  ;; Below is the list of Home services.  To search for available
  ;; services, run 'guix home search KEYWORD' in a terminal.
  (services
   (list)))

I often get the build errors, for example

$ guix home reconfigure a12l.scm
guix home: warning: cannot determine provenance for current system
guix home: warning: cannot determine provenance of GNU Guix
Cleaning up symlinks from previous home at /var/guix/profiles/per-user/a12l/guix-home.

Skipping /home/a12l/.profile (not a symlink to store)... done
guix home: error: rmdir: Device or resource busy

Currently ~/ looks like

$ exa -a1 ~/
.bash_history
.bash_profile -> /nix/store/062rgvyml2yvp8a3qqqyhmd6hki2ykzf-home-manager-files/.bash_profile
.bashrc -> /nix/store/062rgvyml2yvp8a3qqqyhmd6hki2ykzf-home-manager-files/.bashrc
.guix-home -> /var/guix/profiles/per-user/a12l/guix-home
.guix-profile -> /var/guix/profiles/per-user/a12l/guix-profile
.nix-defexpr
.nix-profile -> /nix/var/nix/profiles/per-user/a12l/profile
.profile -> /nix/store/062rgvyml2yvp8a3qqqyhmd6hki2ykzf-home-manager-files/.profile

(with the irrelevant entries removed)

This problem doesn't seem to depend on the packages to install, because when I try to switch to a generation build using

$ cat a12l.scm
;; This "home-environment" file can be passed to 'guix home reconfigure'
;; to reproduce the content of your profile.  This is "symbolic": it only
;; specifies package names.  To reproduce the exact same profile, you also
;; need to capture the channels being used, as returned by "guix describe".
;; See the "Replicating Guix" section in the manual.

(use-modules (gnu home)
             (gnu packages)
             (gnu services))

(home-environment
  ;; Below is the list of packages that will show up in your
  ;; Home profile, under ~/.guix-home/profile.
  (packages (specifications->packages (list)))

  ;; Below is the list of Home services.  To search for available
  ;; services, run 'guix home search KEYWORD' in a terminal.
  (services
   (list)))

I get the same error

$ guix home reconfigure a12l.scm
guix home: warning: cannot determine provenance for current system
guix home: warning: cannot determine provenance of GNU Guix
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
The following derivations will be built:
  /gnu/store/yl858lmxxraxbnis9ymh3k0ac4534djz-home.drv
  /gnu/store/2rfsrvq5mz399vhimjab88i4hfciwj7c-profile.drv
  /gnu/store/r35xd51h9sialnnh47nsppz4v41zxnb4-provenance.drv

building /gnu/store/r35xd51h9sialnnh47nsppz4v41zxnb4-provenance.drv...
building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building profile with 1 package...
building /gnu/store/yl858lmxxraxbnis9ymh3k0ac4534djz-home.drv...
Cleaning up symlinks from previous home at /var/guix/profiles/per-user/a12l/guix-home.

Skipping /home/a12l/.profile (not a symlink to store)... done
guix home: error: rmdir: Device or resource busy

I've solved this problem before by a mix of operations; e.g., removing the symlinks in ~/; rebooting the computer, etc. Not sure what things got this working.

No errors when I just build the configuration

$ guix home build a12l.scm
/gnu/store/lrr2sql3p6lyqhwhc29sylkm23icgl7g-home

I've asked on #guix on libera.chat if it's possible to get more detailed error logs when running guix home reconfigure, but I haven't received any replies.

To Reproduce
Steps to reproduce the behavior:

  1. Enter directory with my guix home configuration.
  2. Run guix home reconfigure a12l.scm

Expected behavior

When running guix home build a12l.scm builds my new configuration and switches the current profile from the old one to the new one.

@a12l a12l added the bug Something isn't working label Nov 14, 2022
@a12l
Copy link
Author

a12l commented Nov 15, 2022

This problem still occurs after removing old generations and running guix pull.

But I noticed now that the packages is actually installed. I assumed the installation was unsuccessful because of the error message, but apparently not. Still want to find a solution to the errors :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant