Subject: 30.0.50; [BUG] package.el having a hard time
From: Ruijie Yu <[email-masked]>
To: [email-masked]
Date: Sat, 27 May 2023 11:10:24 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

I have recompiled Emacs master yesterday, but this build has had a hard
time processing my init.el file (saying that PKG-pkg.el files are not
found, where they indeed are).  I wasn't able to reproduce this exact
problem, but upon digging further, I found one issue which I can
reproduce it reliably in -Q environment, and which is probably related
to the other unreproducible issue.

    $ cd $(mktemp -d)
    $ HOME=$PWD XDG_CONFIG_HOME=$HOME/.config emacs -Q
    M-x package-initialize RET
    M-x list-packages RET
    ;; And wait for it to finish listing packages from gnu and nongnu

    / n xr RET
    ;; find some package to install, any package suffices
    i x SPC
    ;; Install it

Observe the error message shown in the minibuffer.  The following is the
full message from trying to install the package.

--8<---------------cut here---------------start------------->8---
Packages to install: 1 (xr-1.23).  Proceed? (y or n) y
Operation [ Install 1 ] started
Setting ‘package-selected-packages’ temporarily since "emacs -q" would overwrite customizations
Contacting host: elpa.gnu.org:443 [2 times]
Parsing tar file...done
Extracting...done
  INFO     Scraping files for loaddefs...done
  GEN      xr-autoloads.el
package-unpack: Wrong type argument: package-desc, nil
--8<---------------cut here---------------end--------------->8---

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-05-26 built on ruijie
Repository revision: bb7605c087006b714236165f88341545355d3673
Repository branch: makepkg
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-modules --without-libotf --without-m17n-flt --without-gconf
 --enable-link-time-optimization --with-native-compilation=aot
 --with-xinput2 --with-pgtk --without-xaw3d --with-sound=alsa
 --with-tree-sitter '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

-- 
Best,

RY