Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MELPA repository not available in 0.105 #4402

Closed
et2010 opened this issue Jan 5, 2016 · 9 comments
Closed

MELPA repository not available in 0.105 #4402

et2010 opened this issue Jan 5, 2016 · 9 comments

Comments

@et2010
Copy link
Contributor

et2010 commented Jan 5, 2016

I installed spacemacs from a fresh start. After bootstrap and intialized, I hit SPC a k to check the package list, but only packages from org elpa and gnu elpa were there. All MELPA packages were gone. Whether using --insecure option or not, no MELPA packages showing. I can't add layers now due to this issue since no packages from MELPA will be installed.

I also tried use spacemacs behind a socks proxy wrapper, but still no good.

I'm using Windows 7 64bit, emacs w64 24.5.1, git for windows 2.6.4. Any help will be appreciated.

@et2010
Copy link
Contributor Author

et2010 commented Jan 5, 2016

I tried setting dotspacemacs-elpa-https to t or nil, neither of them worked.

@et2010
Copy link
Contributor Author

et2010 commented Jan 5, 2016

With using describe-variable on package-archives, I got this:

Its value is (("gnu" . "http://elpa.gnu.org/packages/"))

while dotspacemacs-elpa-https were set to t

@syl20bnr
Copy link
Owner

syl20bnr commented Jan 5, 2016

I cannot reproduce this bug, the output of describe variable on my system is:

package-archives is a variable defined in `package.el'.
Its value is (("melpa" . "https://melpa.org/packages/")
 ("org" . "http://orgmode.org/elpa/")
 ("gnu" . "https://elpa.gnu.org/packages/"))

Original value was 
(("gnu" . "http://elpa.gnu.org/packages/"))

What is the output of the following code ?

(configuration-layer//resolve-package-archives configuration-layer--elpa-archives)

@et2010
Copy link
Contributor Author

et2010 commented Jan 5, 2016

@syl20bnr Weird, the output seems right:

(("melpa" . "https://melpa.org/packages/") ("org" . "http://orgmode.org/elpa/") ("gnu" . "https://elpa.gnu.org/packages/"))

but the output of describe-variable is not:

package-archives is a variable defined in `package.el'.
Its value is (("gnu" . "http://elpa.gnu.org/packages/"))

This variable may be risky if used as a file-local variable.

Documentation:
...

@et2010
Copy link
Contributor Author

et2010 commented Jan 5, 2016

Also, the value of package-enable-at-startup is t, i.e. variable package--initialized in following function was set to t unexpectedly during launching. But I don't know why this is happening.

(defun configuration-layer/initialize ()
  "Initialize `package.el'."
  (setq configuration-layer--refresh-package-timeout dotspacemacs-elpa-timeout)
  (configuration-layer//parse-command-line-arguments)
  (unless package--initialized
    (setq package-archives (configuration-layer//resolve-package-archives
                            configuration-layer--elpa-archives))
    ;; optimization, no need to activate all the packages so early
    (setq package-enable-at-startup nil)
    (package-initialize 'noactivate)
    ;; TODO remove the following hack when 24.3 support ends
    ;; Emacs 24.3 and above ships with python.el but in some Emacs 24.3.1
    ;; packages for Ubuntu, python.el seems to be missing.
    ;; This hack adds marmalade repository for this case only.
    (unless (or (package-installed-p 'python) (version< emacs-version "24.3"))
      (add-to-list 'package-archives
                   '("marmalade" . "https://marmalade-repo.org/packages/")))))

@et2010
Copy link
Contributor Author

et2010 commented Jan 5, 2016

Eh, sorry, my fault. I finally figured out why. I used to add following statement in function definition of dotspacemacs/user-init () in my .spacemacs file:

(package-initialize)

to fix org mix-installation problem (ie. shipped version and elpa version are both loaded, see: http://stackoverflow.com/a/17422623). This changed the value of package--initialized to t and lead to my problem.

Really sorry for the false alarm! Thank you very much for your help! @syl20bnr

@StreakyCobra
Copy link
Contributor

👍 If your problem is solved you may consider to close the issue then :-)

@et2010 et2010 closed this as completed Jan 5, 2016
@StreakyCobra
Copy link
Contributor

😄

@et2010
Copy link
Contributor Author

et2010 commented Jan 5, 2016

@StreakyCobra Thanks for reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants