1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Merge branch 'maint'

This commit is contained in:
Dan McGee 2011-12-23 14:40:59 -06:00
commit 38143770a9
2 changed files with 10 additions and 8 deletions

View File

@ -450,9 +450,9 @@ fi
# file, falling back on a hard default # file, falling back on a hard default
PACMAN_KEYRING_DIR=${PACMAN_KEYRING_DIR:-$(get_from "$CONFIG" "GPGDir" "@sysconfdir@/pacman.d/gnupg")} PACMAN_KEYRING_DIR=${PACMAN_KEYRING_DIR:-$(get_from "$CONFIG" "GPGDir" "@sysconfdir@/pacman.d/gnupg")}
GPG_PACMAN=(gpg --homedir ${PACMAN_KEYRING_DIR} --no-permission-warning) GPG_PACMAN=(gpg --homedir "${PACMAN_KEYRING_DIR}" --no-permission-warning)
if [[ -n ${KEYSERVER} ]]; then if [[ -n ${KEYSERVER} ]]; then
GPG_PACMAN+=(--keyserver ${KEYSERVER}) GPG_PACMAN+=(--keyserver "${KEYSERVER}")
fi fi
# check only a single operation has been given # check only a single operation has been given
@ -492,7 +492,7 @@ fi
(( POPULATE )) && populate_keyring (( POPULATE )) && populate_keyring
(( RECEIVE )) && "${GPG_PACMAN[@]}" --recv-keys "${KEYIDS[@]}" (( RECEIVE )) && "${GPG_PACMAN[@]}" --recv-keys "${KEYIDS[@]}"
(( REFRESH )) && "${GPG_PACMAN[@]}" --refresh-keys "${KEYIDS[@]}" (( REFRESH )) && "${GPG_PACMAN[@]}" --refresh-keys "${KEYIDS[@]}"
(( VERIFY )) && "${GPG_PACMAN[@]}" --verify $SIGNATURE (( VERIFY )) && "${GPG_PACMAN[@]}" --verify "$SIGNATURE"
if (( UPDATEDB )); then if (( UPDATEDB )); then
msg "$(gettext "Updating trust database...")" msg "$(gettext "Updating trust database...")"

View File

@ -720,16 +720,18 @@ static int _parseconfig(const char *file, struct section_t *section,
size_t line_len; size_t line_len;
linenum++; linenum++;
/* ignore whole line and end of line comments */
if((ptr = strchr(line, '#'))) {
*ptr = '\0';
}
strtrim(line); strtrim(line);
line_len = strlen(line); line_len = strlen(line);
/* ignore whole line and end of line comments */ if(line_len == 0) {
if(line_len == 0 || line[0] == '#') {
continue; continue;
} }
if((ptr = strchr(line, '#'))) {
*ptr = '\0';
}
if(line[0] == '[' && line[line_len - 1] == ']') { if(line[0] == '[' && line[line_len - 1] == ']') {
char *name; char *name;