magit/ghub

No longer builds with `package-build` from master

tadfisher opened this issue · 2 comments

Since melpa/package-build@35017a2, building this package results in the following:

Error: error ("Single file ghub-pkg.el does not match package name ghub")
  debug-early-backtrace()
  debug-early(error (error "Single file ghub-pkg.el does not match package name ghub"))
  error("Single file %s does not match package name %s" "ghub-pkg.el" "ghub")
  (if (string-equal (downcase (concat name ".el")) (downcase (file-name-nondirectory file))) nil (error "Single file %s does not match package name %s" file name))
  (let* ((name (eieio-oref rcp 'name)) (file (car (car files))) (source (expand-file-name file source-dir)) (target (expand-file-name (concat name "-" version ".el") package-build-archive-dir)) (desc (let ((default-directory source-dir)) (package-build--desc-from-library name version commit files)))) (if (string-equal (downcase (concat name ".el")) (downcase (file-name-nondirectory file)))>
  package-build--build-single-file-package(#<package-github-recipe package-github-recipe-407b02> "20220429.1708" "1ae754064cd1f062bbdd6ecf9af03fa0c2798cf6" (("ghub-pkg.el" . "ghub-pkg.el")) "/build/working/ghub/")
  (cond ((not version) (error "Unable to check out repository for %s" name)) ((= 1 (length files)) (package-build--build-single-file-package rcp version commit files source-dir)) ((< 1 (length files)) (package-build--build-multi-file-package rcp version commit files source-dir)) (t (error "Unable to find files matching recipe patterns")))
  (let* ((source-dir (package-recipe--working-tree rcp)) (file-specs (package-build--config-file-list rcp)) (files (package-build-expand-file-specs source-dir file-specs)) (commit (package-build--get-commit rcp)) (name (eieio-oref rcp 'name))) (if (equal file-specs package-build-default-files-spec) nil (if (equal files (package-build-expand-file-specs source-dir package-build-default-files>
  package-build--package(#<package-github-recipe package-github-recipe-407b02> "20220429.1708")

I'm not sure if ghub needs to rename its package file, or if package-build needs to ignore the case where the single file name doesn't match the package name.

I suspect that you just have to update your checkout of melpa/melpa.

Correct, thank you!