Skip to content

Conversation

@fnussbaum
Copy link
Collaborator

This has led to numerous reported issues in the past. Spacemacs can work without GNU tar, because quelpa installation only fails for some packages; so it should suffice to add the message in that case.

This has led to numerous reported issues in the past. Spacemacs can work without
GNU tar, because quelpa installation only fails for some packages; so it should
suffice to add the message in that case.

Also, remove the superfluous quote from the condition name error.
@fnussbaum fnussbaum force-pushed the improve-error-message-gnu-tar branch from 5f3199e to dc01d01 Compare November 16, 2025 13:08
(when (and (equal err '(wrong-type-argument package-desc nil))
(and (listp location) (eq 'recipe (car location)))
(boundp 'quelpa--tar-type)
(not (eq quelpa--tar-type 'gnu)))
Copy link
Collaborator Author

@fnussbaum fnussbaum Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not cover the case where (quelpa--tar-type) evaluates to gnu because of the fallback:

(defun quelpa--tar-type ()
  "Return `bsd' or `gnu' depending on type of Tar executable.
Tests and sets variable `quelpa--tar-type' if not already set."
  (or quelpa--tar-type
      (when (and quelpa-build-tar-executable
                 (file-executable-p quelpa-build-tar-executable))
        (setq quelpa--tar-type
              (let ((v (shell-command-to-string
                        (format "%s --version" quelpa-build-tar-executable))))
                (cond ((string-match-p "bsdtar" v) 'bsd)
                      ((string-match-p "GNU tar" v) 'gnu)
                      (t 'gnu)))))))

Not sure how common this case is. Perhaps we would need to duplicate a part of this function's implementation to cover this case.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, the issues have all been with bsdtar which is installed on MacOS, right? AFAICT that will actually print bsdtar so the fallback should not happen in that scenario at least:

$ /usr/bin/tar --version
bsdtar 3.5.3 - libarchive 3.7.4 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, the issues have all been with bsdtar which is installed on MacOS, right?

This should be the most common case. Though on OpenBSD, apparently the default tar does not support the --version flag at all. There was also an issue on Android, but I'm not sure if having a default "non-gnu" tar installed there is common.

@fnussbaum fnussbaum marked this pull request as draft November 17, 2025 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants