Subject: Re: bug#47072: 28.0.50; Package package can't be reloaded anymore

From: Eli Zaretskii <[email-masked]>
Date: Thu, 22 Apr 2021 09:58:03 +0300

> From: Stefan Kangas <[email-masked]>
> Date: Wed, 21 Apr 2021 15:28:20 -0700
> Cc: [email-masked]
> 
> Julian Scheid <[email-masked]> writes:
> 
> > This used to work not long ago:
> >
> > emacs -Q --batch --eval "(progn (require 'package) (unload-feature 'package) (require 'package))"
> >
> > Now it breaks with:
> >
> > Debugger entered--Lisp error: (void-variable package-user-dir)
> >   require(package)
> >   (progn (require 'package) (unload-feature 'package) (require 'package))
> >   eval((progn (require 'package) (unload-feature 'package) (require 'package)) t)
> >   command-line-1(("--eval" "(progn (require 'package) (unload-feature 'package..."))
> >   command-line()
> >   normal-top-level()
> >
> > Which in turn breaks my fix for
> > https://github.com/alphapapa/makem.sh/issues/31
> >
> > If this is something that can't/won't be fixed, could you recommend a
> > workaround?
> 
> I can confirm that the above recipe works using 27.2 but not with
> 28.0.50.

Stefan Monnier tweaked the code there recently, perhaps that's the
reason.  Stefan, can you take a look, please?