syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.68k stars 4.89k forks source link

Package is installed on startup then deleted as an orphan right away #1538

Closed mkcode closed 9 years ago

mkcode commented 9 years ago

As per discussion in #1534.

Found 1 new package(s) to install...
--> fetching new package repository indexes...
--> installing avy... [1/1]
Found 1 orphan package(s) to delete...
--> deleting avy... [1/1]

every time spacemacs is restarted.

Thank you, can you open an issue for this, Seems that we have a regression in 24.5.1, somebody else has another package (spinner) acting like that.

syl20bnr commented 9 years ago

I cannot reproduce it in my current config and in a stock config in develop. Can you paste the layers you use ?

mkcode commented 9 years ago
(defun dotspacemacs/layers ()
  "Configuration Layers declaration."
  (setq-default
   ;; List of additional paths where to look for configuration layers.
   ;; Paths must have a trailing slash (ie. `~/.mycontribs/')
   dotspacemacs-configuration-layer-path '()
   ;; List of configuration layers to load. If it is the symbol `all' instead
   ;; of a list then all discovered layers will be installed.
   dotspacemacs-configuration-layers
   '(
     ;; --------------------------------------------------------
     ;; Example of useful layers you may want to use right away
     ;; Uncomment a layer name and press C-c C-c to install it
     ;; --------------------------------------------------------
     auto-completion
     better-defaults
     clojure
     (colors :variables
             colors-enable-rainbow-identifiers nil)
     (dash :variables
           dash-at-point-legacy-mode t)
     (git :variables
          git-gutter-use-fringe t
          git-magit-status-fullscreen nil
          git-enable-github-support t)
     gtags
     (html :variables
           css-indent-offset 2
           web-mode-code-indent-offset 2
           web-mode-markup-indent-offset 2
           web-mode-css-indent-offset 2)
     javascript
     lua
     markdown
     org
     osx
     (ruby :variables
           ruby-version-manager 'rbenv
           ruby-enable-ruby-on-rails-support t)
     syntax-checking
     xkcd
     )
   ;; A list of packages and/or extensions that will not be install and loaded.
   dotspacemacs-excluded-packages '()
   ;; If non-nil spacemacs will delete any orphan packages, i.e. packages that
   ;; are declared in a layer which is not a member of
   ;; the list `dotspacemacs-configuration-layers'
   dotspacemacs-delete-orphan-packages nil))

The dotspacemacs-delete-orphan-packages nil is a temporary workaround.

syl20bnr commented 9 years ago

I still cannot reproduce it, even when I removed by hand the avy directory from elpa directory. It is correctly reinstalled without being deleted.

syl20bnr commented 9 years ago

What's the output of (emacs-version) ?

mkcode commented 9 years ago

emacs-version

GNU Emacs 24.5.1 (x86_64-apple-darwin14.1.0, Carbon Version 157 AppKit 1344.72)

hmm - and it was built using the railwaycat home-brew version with xml2

brew install emacs-mac --with-xml2 --with-spacemacs-icon
mkcode commented 9 years ago

Just recompiled w/o the xml2 support and it's the same behavior. No change there.

mkcode commented 9 years ago

Install log:

$ brew install emacs-mac --with-spacemacs-icon
==> Installing emacs-mac from railwaycat/homebrew-emacsmacport
==> Cloning http://www.math.s.chiba-u.ac.jp/~mituharu/emacs-mac.git
Updating /Library/Caches/Homebrew/emacs-mac--git
==> Checking out revision emacs-24.5-mac-5.7
######################################################################## 100.0%
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.7 --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.7/share/info/emacs --
==> make
==> make install
mkcode commented 9 years ago

Just tried with the non-railwaycat regular emacs version and same behavior again.

emacs-version

"GNU Emacs 24.5.1 (x86_64-apple-darwin14.1.0, NS apple-appkit-1344.72)

installed via

brew install emacs --with-cocoa
syl20bnr commented 9 years ago

It's getting weird. The only difference with me is that I build with emacs --with-x11 and few other dependencies for image support. But I don't see why such deps would trigger such issue.

To be sure, did you test with fresh cloned Emacs in develop branch ?

mkcode commented 9 years ago

Ok! Found the issue!

rm -rf elpa and restarting fixed this. Looks like I did not update the packages... ugg...

this should always be our first goto when someone has a package issue.

so glad I went on a compiling spree for this...

apologies for the waste of time.

syl20bnr commented 9 years ago

Excellent thank you for finding the fix.

When you update, do you update with the [update] button on the start page ?

But I wonder how it is possible to end up in your situation. What I understand is that a package is detected to be installed but the index of repositories (which contains the denpendencies) is not updated. I have not check where is the error. At first glance I don't see it in Spacemacs because if it was he case them it should happen only once.

Le samedi 9 mai 2015, Chris Ewald notifications@github.com a écrit :

Ok! Found the issue!

rm -rf elpa and restarting fixed this. Looks like I did not update the packages... ugg...

this should always be our first goto when someone has a package issue.

so glad I went on a compiling spree for this...

— Reply to this email directly or view it on GitHub https://github.com/syl20bnr/spacemacs/issues/1538#issuecomment-100519938 .

-syl20bnr-

mkcode commented 9 years ago

I believe Spacemacs updates packages when the version changes but not when a user is on the develop branch, yes? If so, that is the issue. I am on the develop branch and and just simply did not update the packages.

Rolling back and then hitting the update button fixes this as well.

mkcode commented 9 years ago

@syl20bnr - found the issue:

This commit: https://github.com/syl20bnr/spacemacs/commit/77b0cc4ba6f3e6c782723b57890e6db3ee6e8ff7

brought in the ace-link package which does not include avy in the melpa dependencies, but requires it here:

https://github.com/abo-abo/ace-link/blob/master/ace-link.el#L39

mkcode commented 9 years ago

@syl20bnr - found the issue:

This commit: 77b0cc4

brought in the ace-link package which does not include avy in the melpa dependencies, but requires it here:

https://github.com/abo-abo/ace-link/blob/master/ace-link.el#L39

this is wrong. nevermind. Not sure what could cause this.

syl20bnr commented 9 years ago

The only explanations I can see are:

syl20bnr commented 9 years ago

@mkcode are you sure it is fixed ? did you revert back dotspacemacs-delete-orphan-packages to t ?

mkcode commented 9 years ago

@syl20bnr - yes. dotspacemacs-delete-orphan-packages is t

Restarting no longer causes this.

syl20bnr commented 9 years ago

Tell me if I understand correctly what happened. You never updated the packages and at one point, without doing anything you got the issue with avy that's it ?

mkcode commented 9 years ago

I was on develop branch. pulled latest changes. then the issue appeared. never updated.

syl20bnr commented 9 years ago

Can you paste the content of git reflog in your repo ?

mkcode commented 9 years ago
bc034b5 HEAD@{0}: merge camel-case-motion: Merge made by the 'recursive' strategy.
a740923 HEAD@{1}: checkout: moving from develop to dev
a740923 HEAD@{2}: checkout: moving from a740923dd9b47238b0f6cd9518bbfafd68176be7 to develop
a740923 HEAD@{3}: checkout: moving from master to origin/develop
ae343bb HEAD@{4}: pull: Fast-forward
1ab8841 HEAD@{5}: checkout: moving from dev to master
35ffb4a HEAD@{6}: merge camel-case-motion: Merge made by the 'recursive' strategy.
a740923 HEAD@{7}: checkout: moving from develop to dev
a740923 HEAD@{8}: pull origin develop: Fast-forward
68ab964 HEAD@{9}: checkout: moving from dev to develop
92df9bd HEAD@{10}: checkout: moving from fix-helm-window to dev
a3faf0b HEAD@{11}: checkout: moving from a3faf0b53b8b39eb50192d00e76e2ce5ff1a4173 to fix-helm-window
a3faf0b HEAD@{12}: checkout: moving from dev to gh-tuhdo/helm-window-fix
92df9bd HEAD@{13}: merge a3faf0b53b8b39e: Merge made by the 'recursive' strategy.
baa9f80 HEAD@{14}: reset: moving to HEAD~1
3e0f291 HEAD@{15}: merge gh-tuhdo/helm-window-fix: Merge made by the 'recursive' strategy.
baa9f80 HEAD@{16}: merge camel-case-motion: Merge made by the 'recursive' strategy.
f9cab4f HEAD@{17}: merge describe-bindings: Fast-forward
68ab964 HEAD@{18}: checkout: moving from describe-bindings to dev
f9cab4f HEAD@{19}: commit: set key "hdb" to describe-bindings
68ab964 HEAD@{20}: checkout: moving from dev to describe-bindings
68ab964 HEAD@{21}: checkout: moving from develop to dev
68ab964 HEAD@{22}: rebase finished: returning to refs/heads/develop
68ab964 HEAD@{23}: pull --rebase origin develop: checkout 68ab964405f9d277c4d348f6339312fcc80ac07f
81706ba HEAD@{24}: checkout: moving from dev to develop
81706ba HEAD@{25}: checkout: moving from develop to dev
81706ba HEAD@{26}: checkout: moving from camel-case-motion to develop
2475457 HEAD@{27}: commit: add CamelCase motion toggle and with subword-mode hook
81706ba HEAD@{28}: checkout: moving from develop to camel-case-motion
81706ba HEAD@{29}: rebase finished: returning to refs/heads/develop
81706ba HEAD@{30}: pull --rebase origin develop: checkout 81706ba6c5f6e1af086c763c48c208fcd02c5dd3

there is a bunch of noise in that, where I use a dev local branch and merge some features that are not upstream.

mkcode commented 9 years ago

Note that this occurred after

a740923 HEAD@{2}: checkout: moving from a740923dd9b47238b0f6cd9518bbfafd68176be7 to develop
a740923 HEAD@{3}: checkout: moving from master to origin/develop
ae343bb HEAD@{4}: pull: Fast-forward
syl20bnr commented 9 years ago

Thank you ! I tried these commits and was not able to reproduce it, so this have to do with elpa directory and the archives. I hope to be able to reproduce it one day. For now I close it as not reproducible.

trishume commented 9 years ago

I had the same issue. Executing configuration-layer/update-packages fixed it.

syl20bnr commented 9 years ago

Good news ! On my windows box, I just upgraded to 24.5 and get the issue with avy without doing anything.

I reopen the issue and will investigate tonight.

robbyoconnor commented 9 years ago

Shit... hit me too Thank you @mkcode

kleewho commented 9 years ago

Yeah, I can confirm that it happens sometimes, Thanks all

syl20bnr commented 9 years ago

Should be fixed in develop, the issue was that the orphans were resolved using package-alist instead of the archive dependencies.

kyoDralliam commented 9 years ago

I seem to have a similar issue with package 's' on a fresh install of spacemacs (emacs version 24.5.1). I have the following process occuring each time I'm launching emacs :

 (Bootstrap) Installing s...
 Found 1 orphan package(s) to delete...
 --> deleting s... [1/1]'''
d12frosted commented 9 years ago

The same with emacs-24.3.1 on Ubuntu 14.04, emacs-24.4.1 on Ubuntu 15.04. Master branch of Spacemacs.

michaellee commented 9 years ago

I'm experiencing the same thing, package 's' on a fresh install of spacemacs (emacs 24.3.1) on Ubuntu 14.04

d12frosted commented 9 years ago

Ah, but on OS X I have never experienced this before.

neutralevil commented 9 years ago

I have the same issue with package 's' (emacs-24.5.1 on Windows 7).

d12frosted commented 9 years ago

AFAIK, fixed on develop branch

batisteo commented 8 years ago

Same on a fresh install of emacs-24.5.1, spacemacs master, Fedora 22.

awesom3o commented 8 years ago

same issue here, emacs 24.5.1 & spacemacs master.

TheBB commented 8 years ago

We are tracking this is #3534. It will be fixed by PR #3663.

mikowiec commented 8 years ago

windows 7 emacs-25.0.92.1 spacemacs-0.105.20 The issue detected. It's imposible to install, after restart del.

rojaster commented 8 years ago

I have the same bug. After restarting my installed package was deleted. ubuntu 15.10 emacs 24.5.1 spacemacs-0.105.21

kandelvijaya commented 7 years ago

This happened to me on mac OS Sierra.

tidux commented 7 years ago

This is happening to me on Debian Jessie with adoc-mode, although not on newer versions of Emacs on Arch Linux or Windows. Arch is displaying the same behavior with mingus.

qzhao2007 commented 7 years ago

I still meet this issue with emacs 25.1 on mac os seirra, and set dotspacemacs-delete-orphan-packages nil also not work.

tsoernes commented 7 years ago

I get this error, with Spacemacs 25.2.1, on Fedora 26 x64, with the package dante https://github.com/jyp/dante Here's my .spacemacs spacemacs.txt

d12frosted commented 7 years ago

@tsoernes you install dante inside of dotspacemacs/user-config by using use-package. While this is nice, you also have dotspacemacs-install-packages set to 'used-only which means that Spacemacs will uninstall any package 'unknown' to layer system. In order to avoid this you have following solutions:

sunyta2 commented 4 years ago

dear, d12frosted. Set dotspacemacs-install-packages 'used-but-keep-unused Greatly worked!!! Thank you so much! d12frosted

mcp292 commented 2 years ago

I had the same question. This post in the FAQ solved it, kindly linked here: https://github.com/syl20bnr/spacemacs/issues/8776#issuecomment-296457960.