3

I am try to use el-get to manage my packages because it is good to update the latest from github. But sometimes the package I want is only available in ELPA. So I use

(:name <package_name> :type elpa)

to install them.

Now my problem is: I installed org-mode with el-get and try to install org-gcal by

(:name org-gcal :type elpa)

The "org-gcal" depends on org-mode 8.2.4 which I already have under el-get directory, but it still said it can't find it and will install org from elpa again.

How could I solve this kind of dependence problem between elpa and el-get?

enchanter
  • 884
  • 8
  • 20
  • 1
    So for absolute clarity, when you say "and try to install org-gcal with ELPA" you're still referring to el-get and `:type elpa`, rather than `M-x package-install`, yes? – phils May 14 '14 at 03:02
  • @phils. You are right. That what I mean. – enchanter May 14 '14 at 10:05
  • The only approach I can think of -- and I don't think you want to do this -- is to modify the package archive structure to remove the dependency, so that the package library doesn't complain. Provided there's no server-side element to that validation, this ought to work (but again, I'd be awfully loathe to actually do this). – phils May 14 '14 at 18:29
  • But if you want to experiment anyway, you could try `(assq-delete-all 'org (aref (cdr (assq 'org-gcal package-archive-contents)) 1))` – phils May 14 '14 at 18:45
  • @phils Thanks for your help. But the org-gcal is only a example. I may need too install many packages from ELPA, I don't think manually configuration for each package is what I am looking for. – enchanter May 14 '14 at 23:24
  • Well.... one way or the other I think you're looking at manual configuration. You have a copy of a library which does not come from a package repository, and you want to tell the package manager how it compares with the packages it knows about. Offhand, I'd say your only other option is to try to disable all dependency checking (but don't do that either :). – phils May 15 '14 at 00:37

1 Answers1

1

You can't “solve” this dependency problem in that you could teach ELPA about el-get packages. That's not (easily) possible.

el-get understands ELPA packages, but not vice versa. ELPA does not see el-get packages, and hence cannot use them to resolve package dependencies.

The only reasonable way out is to use ELPA to install Org, and other packages as well. Recent Org releases are available from the default GNU ELPA archive or from Org Mode's package archive. The popular MELPA archive provides VCS snapshots for over 1000 other packages.

  • Does ELPA check local package first before install? Is it there any way to let ELPA know that package is already there? – enchanter May 14 '14 at 23:21
  • @enchanter ELPA checks whether dependencies are installed, obviously, but it only looks at dependencies installed via ELPA. There is no way to tell ELPA about dependencies installed by any other way, other than messing with `package-alist`, which I'd strongly advise against. –  May 15 '14 at 09:45