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

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

Closed
mkcode opened this issue May 8, 2015 · 46 comments
Closed

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

mkcode opened this issue May 8, 2015 · 46 comments
Labels

Comments

@mkcode
Copy link
Contributor

mkcode commented May 8, 2015

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
Copy link
Owner

syl20bnr commented May 9, 2015

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

@mkcode
Copy link
Contributor Author

mkcode commented May 9, 2015

(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
Copy link
Owner

syl20bnr commented May 9, 2015

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
Copy link
Owner

syl20bnr commented May 9, 2015

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

@mkcode
Copy link
Contributor Author

mkcode commented May 9, 2015

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
Copy link
Contributor Author

mkcode commented May 9, 2015

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

@mkcode
Copy link
Contributor Author

mkcode commented May 9, 2015

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
Copy link
Contributor Author

mkcode commented May 9, 2015

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
Copy link
Owner

syl20bnr commented May 9, 2015

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
Copy link
Contributor Author

mkcode commented May 9, 2015

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
Copy link
Owner

syl20bnr commented May 9, 2015

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
#1538 (comment)
.

-syl20bnr-

@mkcode
Copy link
Contributor Author

mkcode commented May 9, 2015

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
Copy link
Contributor Author

mkcode commented May 9, 2015

@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

@mkcode
Copy link
Contributor Author

mkcode commented May 9, 2015

@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
Copy link
Owner

syl20bnr commented May 9, 2015

The only explanations I can see are:

  • for some reason spacemacs did not succeed in updating the archives in ~/.emacs.d/elpa/archives
  • there was a conflict between two archives where the specified package is present.

@syl20bnr
Copy link
Owner

syl20bnr commented May 9, 2015

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

@mkcode
Copy link
Contributor Author

mkcode commented May 9, 2015

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

Restarting no longer causes this.

@syl20bnr
Copy link
Owner

syl20bnr commented May 9, 2015

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
Copy link
Contributor Author

mkcode commented May 9, 2015

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

@syl20bnr
Copy link
Owner

syl20bnr commented May 9, 2015

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

@mkcode
Copy link
Contributor Author

mkcode commented May 9, 2015

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
Copy link
Contributor Author

mkcode commented May 9, 2015

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
Copy link
Owner

syl20bnr commented May 9, 2015

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.

@syl20bnr syl20bnr changed the title Orphan packages regression in Emacs 24.5.1 Package is installed on startup then deleted as an orphan right away May 9, 2015
@syl20bnr syl20bnr closed this as completed May 9, 2015
@trishume
Copy link
Contributor

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

@syl20bnr
Copy link
Owner

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.

@syl20bnr
Copy link
Owner

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

@kyoDralliam
Copy link

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
Copy link
Collaborator

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

@michaellee
Copy link

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

@d12frosted
Copy link
Collaborator

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

@neutralevil
Copy link
Contributor

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

@d12frosted
Copy link
Collaborator

AFAIK, fixed on develop branch

@batisteo
Copy link

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

@awesom3o
Copy link

awesom3o commented Nov 1, 2015

same issue here, emacs 24.5.1 & spacemacs master.

@TheBB
Copy link
Collaborator

TheBB commented Nov 4, 2015

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

@mikowiec
Copy link

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

@rojaster
Copy link

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

@kandelvijaya
Copy link

This happened to me on mac OS Sierra.

@tidux
Copy link

tidux commented Dec 4, 2016

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
Copy link

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

@tsoernes
Copy link
Contributor

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
Copy link
Collaborator

@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:

  • Create private layer and configure dante there
  • Add dante to dotspacemacs-additional-packages
  • Set dotspacemacs-install-packages to 'used-but-keep-unused

@sunyta2
Copy link

sunyta2 commented Oct 27, 2019

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

@mcp292
Copy link

mcp292 commented Feb 28, 2022

I had the same question. This post in the FAQ solved it, kindly linked here: #8776 (comment).

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

No branches or pull requests