Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/PKGBUILD.vim7
-rw-r--r--lib/libalpm/be_sync.c8
-rw-r--r--lib/libalpm/db.c1
-rw-r--r--lib/libalpm/handle.c8
-rw-r--r--src/pacman/callback.c11
5 files changed, 32 insertions, 3 deletions
diff --git a/contrib/PKGBUILD.vim b/contrib/PKGBUILD.vim
index f627a5e6..1814c224 100644
--- a/contrib/PKGBUILD.vim
+++ b/contrib/PKGBUILD.vim
@@ -13,6 +13,7 @@ elseif exists("b:current_syntax")
endif
let b:main_syntax = "sh"
+let b:is_bash = 1
runtime! syntax/sh.vim
" case on
@@ -106,6 +107,11 @@ syn keyword pb_k_optdepends optdepends contained
syn match pbValidOptdepends /\([[:alnum:]]\|+\|-\|_\)*/ contained
syn region pbOptdependsGroup start=/^optdepends=(/ end=/)/ contains=pb_k_optdepends,pbValidOptdepends,shDoubleQuote,shSingleQuote
+" checkdepends
+syn keyword pb_k_ckdepends ckdepends contained
+syn match pbValidCkdepends /\([[:alnum:]]\|+\|-\|_\)*/ contained
+syn region pbCkdependsGroup start=/^checkdepends=(/ end=/)/ contains=pb_k_ckdepends,pbValidCkdepends,shDoubleQuote,shSingleQuote
+
" conflicts
syn keyword pb_k_conflicts conflicts contained
syn match pbValidConflicts /\([[:alnum:]]\|+\|-\|_\)*/ contained
@@ -228,6 +234,7 @@ hi def link pbIllegalArch Error
hi def link pb_k_groups pbKeywords
hi def link pb_k_makedepends pbKeywords
hi def link pb_k_optdepends pbKeywords
+hi def link pb_k_ckdepends pbKeywords
hi def link pb_k_depends pbKeywords
hi def link pb_k_replaces pbKeywords
hi def link pb_k_conflicts pbKeywords
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index d7e14ba3..daed01f9 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -600,6 +600,14 @@ alpm_db_t *_alpm_db_register_sync(alpm_handle_t *handle, const char *treename,
_alpm_log(handle, ALPM_LOG_DEBUG, "registering sync database '%s'\n", treename);
+ _alpm_log(handle, ALPM_LOG_DEBUG, "spot 3\n");
+#ifndef HAVE_LIBGPGME
+ _alpm_log(handle, ALPM_LOG_DEBUG, "spot 2\n");
+ if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
+ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, NULL);
+ }
+#endif
+
db = _alpm_db_new(treename, 0);
if(db == NULL) {
RET_ERR(handle, ALPM_ERR_DB_CREATE, NULL);
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 0c2b26aa..746293ff 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -327,7 +327,6 @@ alpm_db_t *_alpm_db_new(const char *treename, int is_local)
CALLOC(db, 1, sizeof(alpm_db_t), return NULL);
STRDUP(db->treename, treename, return NULL);
db->is_local = is_local;
- db->siglevel = 0;
return db;
}
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 9bffd4fd..266b4bc8 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -45,8 +45,10 @@ alpm_handle_t *_alpm_handle_new()
CALLOC(handle, 1, sizeof(alpm_handle_t), return NULL);
+#ifdef HAVE_LIBGPGME
handle->siglevel = ALPM_SIG_PACKAGE | ALPM_SIG_PACKAGE_OPTIONAL |
ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL;
+#endif
return handle;
}
@@ -579,7 +581,13 @@ int SYMEXPORT alpm_option_set_default_siglevel(alpm_handle_t *handle,
alpm_siglevel_t level)
{
CHECK_HANDLE(handle, return -1);
+#ifdef HAVE_LIBGPGME
handle->siglevel = level;
+#else
+ if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
+ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
+ }
+#endif
return 0;
}
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index d34aca13..237ccea0 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -604,10 +604,17 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
eta_m = eta_s / 60;
eta_s -= eta_m * 60;
- fname = strdup(filename);
+ /* allocate length+1 (plus null) in case we need to exchange .db for .sig */
+ fname = calloc(1, strlen(filename) + 2);
+ strcpy(fname, filename);
/* strip package or DB extension for cleaner look */
if((p = strstr(fname, ".pkg")) || (p = strstr(fname, ".db"))) {
- *p = '\0';
+ *p = '\0';
+
+ /* tack on a .sig suffix for signatures */
+ if((p = strstr(filename, ".sig"))) {
+ strcat(fname, ".sig");
+ }
}
/* In order to deal with characters from all locales, we have to worry
* about wide characters and their column widths. A lot of stuff is