dimitri / el-get

Manage the external elisp bits and pieces upon which you depend!
http://tapoueh.org/emacs/el-get.html
1.65k stars 456 forks source link

Don't try to blindly install ':type apt-get' package #2357

Closed manandbytes closed 8 years ago

manandbytes commented 8 years ago

When on Debian, I would like to use some packages provided by the distribution, i.e.

(el-get-bundle seq :type apt-get :pkgname "elpa-seq")

For now, el-get just blindly tries to install the package without consulting apt if the package is installed. The actual problem is in mixing:

under a single sudoed operation that installs package if it's missing and a noop otherwise.

Allowing paswordless installation of packages to workaround this behaviour is not an option because it promotes insecure practices.

npostavs commented 8 years ago

Isn't apt-get install foo a nop if foo is already installed?

manandbytes commented 8 years ago

@npostavs I've updated description, sudo apt-get install runs unconditionally and waits for password.

npostavs commented 8 years ago

Oh yeah, that makes sense.

manandbytes commented 8 years ago

I think this is a bug:

WDYT?

npostavs commented 8 years ago

It fails? Is this actually a dup of #351? (though I thought el-get-bundle works around it).

Or maybe the "check existing install status" aspect is more like #442.

manandbytes commented 8 years ago

@npostavs I've updated description one more time, hope it's :ok_hand: https://github.com/manandbytes/.emacs.d/blob/master/.emacs.d/emacs.org#package-management

Or maybe the "check existing install status" aspect is more like #442.

442, comment #2382262 from @DarwinAwardWinner seems relevant:

Maybe el-get methods should have the option of overriding the "get package status" operation by supplying an optional argument to the registration function?

manandbytes commented 8 years ago

Any updates?

npostavs commented 8 years ago

Haven't had time to look at el-get code recently, sorry. I noticed in your linked emacs.d, that you're advising el-get-dpkg-package-status, but it seems this function isn't even called anywhere. So yeah, this aspect really needs some improvement, patches welcome!

npostavs commented 8 years ago

@manandbytes Does #2391 work for you?