Commit Graph

17 Commits

Author SHA1 Message Date
Mykola Nikishov
e899853c03 Fix logic when deciding if apt-get package should be installed
Install apt-get package only if it's not installed.
2016-09-08 08:15:53 +03:00
Mykola Nikishov
a6638a664a Make check for apt-get package work (#2434)
* Pass package name to dpkg-query

* dpkg-query reports status as 'install ok installed'

* when el-get name is different from apt-get name
2016-08-27 22:05:14 +02:00
Noam Postavsky
9f2833c749 el-get-apt-get-install: use apt-get package name
in name of buffer, rather than el-get package name.  Since we write what
looks like the command being executed, "apt-get install FOO", it's
confusing if FOO isn't the actual package being passed to apt-get.

Fixes #2358.
2016-06-28 19:19:22 -04:00
Noam Postavsky
344ab643f4 Don't call apt-get if package already installed
This avoids asking for root priviledges if it's not needed.

* methods/el-get-apt-get.el (el-get-dpkg-package-installed-p): Renamed
from el-get-dpkg-package-status, don't use shell.
(el-get-apt-get-install-if-needed): New function.
(el-get-register-method :apt-get): Use it as :install method.
2016-05-19 20:31:59 -04:00
Noam Postavsky
a60eaccf9c el-get-executable-find: use it consistently
for better error messages.

fix #2226
2015-07-27 14:56:02 -04:00
Noam Postavsky
85867029f4 Warn if apt-get package installed no elisp
Using just message makes it too easy to overlook. The warning only
triggers on installation (not update or init) so it shouldn't be too
annoying.

* methods/el-get-apt-get.el (el-get-dpkg-symlink): use lwarn instead of
  message.
2014-10-22 19:44:28 -04:00
Noam Postavsky
e3f82e764a Create empty dir if no apt-get dir to symlink to
If the apt-get package doesn't contain any elisp files symlinking to the
non-existant /usr/share/emacs/site-lisp/<package> directory will leave
us with a broken link that will raise an error when we attempt to look
for autoloads, clean stale elc files and the like. In this case, simply
create an empty directory instead of a link.

* methods/el-get-apt-get.el (el-get-dpkg-symlink): call `make-directory'
  instead of symlink when `debdir' doesn't exist.
2014-10-22 19:44:28 -04:00
Noam Postavsky
bc9fea670e satisfy newer 24.4 byte compiler
It knows argument to eval-after-load is code, and that #' implies
existence of a function.

Some of the package.el functions have changed, but that will be dealt
with separately.
2014-04-04 19:13:27 -04:00
Noam Postavsky
5f689e1ec6 fix byte compiler warnings in methods/
Add requires or declare-functions as needed. Added some missing
variables (probably worked previously by dynamic binding).
2014-03-22 19:29:34 -04:00
Ryan C. Thompson
fdaaf51570 Cleanup indentation with custom indent rules 2014-03-01 16:19:46 -08:00
Ryan C. Thompson
cf34f9aa0a Clean up whitespace
This commit is the result of running cleanup-whitespace.sh.

Fixes #549.
2014-02-21 10:52:48 -08:00
Victor Deryagin
0a202ea35d changed mentions of 'README.asciidoc' to 'README.md' in source files 2013-04-01 15:46:34 +03:00
Ryan Thompson
f603fb4882 Fix #703 2012-04-06 15:30:23 -07:00
Ryan C. Thompson
3a5e6acac2 Update all el-get methods to declare using keywords 2012-02-12 02:29:31 -08:00
Julien Fantin
9f7df186d4 Homebrew method support 2011-11-24 23:51:13 +01:00
Dimitri Fontaine
8db0c4d49b Fix the refactoring so that it actually works.
This includes teaching methods that they now work with a symbolp PACKAGE,
some more cleaning up, and some load-path adjustments now that a part of the
code is in a subdirectory (methods).

Also include some of the tests used to convince oneself that the refactoring
didn't break any and all use cases for el-get, with some rough documentation
about how to use them.
2011-09-22 21:48:11 +02:00
Dimitri Fontaine
0433ca0ce9 Refactoring it all: a beginning. No time for testing yet, just showing ideas. 2011-09-20 15:15:52 +02:00