Subject: Re: bug#24467: 25.1; package

From: Michael Heerdegen <[email-masked]>
Date: Sun, 25 Sep 2016 00:28:54 +0200

Noam Postavsky <[email-masked]> writes:

> merge 24467 21703
> quit
>
> On Mon, Sep 19, 2016 at 1:29 AM, SK Kim <[email-masked]> wrote:
> > After i set gnu and mepla for pacakage-archives in my init.el as
> > below,
> >
> > (package-initialize)
> > (setq package-archives
> >     '(("gnu" . "http://elpa.gnu.org/packages/")
> >      ("melpa" . "http://melpa.milkbox.net/packages/")))
> >
> > whenever i start package-list-packages, status of mepla packages is
> > always new.
>
> Seems to be the same as #21703 "25.0.50; package.el: Thousands of new
> packages each day", but I'm not able to reproduce.
>
> I put the above as my init.el in a temporary HOME dir, when I run
> package-list-packages melpa packages are all "available" for me.

Maybe it is different on the first run?

Hmm, anyway, I found out that with

 (package-initialize)
 (setq package-archives
     '(("gnu" . "http://elpa.gnu.org/packages/")
      ("melpa" . "http://melpa.milkbox.net/packages/")))

in my init file I see the issue.  But with

  (setq package-archives
        '(("gnu" . "http://elpa.gnu.org/packages/")
          ("melpa" . "http://melpa.milkbox.net/packages/")))
  (package-initialize)

it seems to be fixed (i.e. the same expressions just transposed).  With
other words, `package-archives' seemingly needs to be set before calling
`package-intialize' (@SK Kim, do you see the same?).

With the first version, after Emacs startup, `package-archive-contents'
only includes the "gnu" packages.  With the second version, it seems to
include "everything" (the list is too long to be printed in reasonable
time).  That variable is used to decide what packages are new.  That's
were the problem seems to come from.

I think the behavior is at least "surprising", a pitfall.

Regards,

Michael.