xuchunyang / epm

Emacs Package Manager
41 stars 7 forks source link

Emacs melpa-stable priority over melpa is ignored #6

Open laurynas-biveinis opened 5 years ago

laurynas-biveinis commented 5 years ago

If .emacs/.epm.el is configured as follows:

(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(setq package-archive-priorities
      '(("org"          . 20)
        ("melpa-stable" . 15)
        ("melpa"        . 10)))
(package-initialize)

Then Emacs does not try to upgrade melpa-stable packages to their melpa versions, and epm tries to. I.e. Emacs list-packages does not show any outdated packages, but epm outdated does:

$ epm list
async       cmake-font-lock  company-irony-c-headers  exec-path-from-shell  git-commit      irony-eldoc  magit-popup       pkg-info         ssh-config-mode  yaml-mode  
auctex      cmake-mode       dash                     flycheck              google-c-style  let-alist    markdown-mode     po-mode          treepy           
autopair    company          epl                      flycheck-irony        graphql         linum-off    org               solarized-theme  wakatime-mode    
bison-mode  company-irony    epm                      ghub                  irony           magit        org-plus-contrib  ssh              with-editor      
$ epm refresh
Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Contacting host: elpa.gnu.org:443
Contacting host: orgmode.org:443
Contacting host: stable.melpa.org:443
Contacting host: melpa.org:443
Package refresh done
$ epm outdated
yaml-mode    solarized-theme  markdown-mode  magit  graphql     ghub            flycheck              epm  dash                     company-irony  cmake-mode  async  
with-editor  pkg-info         magit-popup    irony  git-commit  flycheck-irony  exec-path-from-shell  epl  company-irony-c-headers  company        autopair    

I have checked by trying to upgrade some packages and I see a melpa-stable version being replaced with melpa one, i.e.:

 epm upgrade yaml-mode
Setting `package-selected-packages' temporarily since "emacs -q" would overwrite customizations
Contacting host: melpa.org:443
Contacting host: melpa.org:443
Generating autoloads for yaml-mode.el...
Generating autoloads for yaml-mode.el...done
Wrote /Users/laurynas/emacs/elpa/yaml-mode-20180409.607/yaml-mode-autoloads.el
Wrote /Users/laurynas/emacs/elpa/yaml-mode-20180409.607/yaml-mode-autoloads.el
Checking /Users/laurynas/emacs/elpa/yaml-mode-20180409.607...
Compiling /Users/laurynas/emacs/elpa/yaml-mode-20180409.607/yaml-mode-autoloads.el...
Compiling /Users/laurynas/emacs/elpa/yaml-mode-20180409.607/yaml-mode-pkg.el...
Compiling /Users/laurynas/emacs/elpa/yaml-mode-20180409.607/yaml-mode.el...
Done (Total of 1 file compiled, 2 skipped)
Package `yaml-mode-0.0.13' deleted.

I believe package-archive-priorities should be honored by epm too.

Thanks,

xuchunyang commented 5 years ago

epm uses epl-outdated-packages from https://github.com/cask/epl to get outdated packages which doesn't take account of package-archive-priorities. According to my memory, package.el is mainly a user program and can't be easily programmatically operated (e.g., it doesn't provides an API which outputs the outdated packages)

laurynas-biveinis commented 5 years ago

I see that epl had this report: https://github.com/cask/epl/issues/32, which was closed because of https://github.com/cask/epl/pull/33, but it got closed without completing. Should I ask them to reopen https://github.com/cask/epl/issues/32?

xuchunyang commented 5 years ago

I think so.