aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-03-13 18:32:43 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-03-13 18:32:43 +0200
commitcc092b60b5eda9ec46f42b541d22865c64cd3aa9 (patch)
tree49a25830792f218fbc612bba9ddc3dc94ad75a33
parentc00b37f20d3a43ab6718275fe94951557158c96a (diff)
downloadwydawca-cc092b60b5eda9ec46f42b541d22865c64cd3aa9.tar.gz
wydawca-cc092b60b5eda9ec46f42b541d22865c64cd3aa9.tar.bz2
Bugfixes
* Makefile.am (ACLOCAL_AMFLAGS): Remove am * am/mailutils.m4: Remove. * src/gpg.c (recursive_rmdir): Don't bail out on ENOENT.
-rw-r--r--Makefile.am2
-rw-r--r--am/mailutils.m489
-rw-r--r--src/gpg.c10
3 files changed, 8 insertions, 93 deletions
diff --git a/Makefile.am b/Makefile.am
index da70c99..a49464f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with wydawca. If not, see <http://www.gnu.org/licenses/>.
-ACLOCAL_AMFLAGS = -I m4 -I am -I grecs/am -I imprimatur
+ACLOCAL_AMFLAGS = -I m4 -I grecs/am -I imprimatur
SUBDIRS=grecs libltdl include src modules imprimatur doc etc tests
diff --git a/am/mailutils.m4 b/am/mailutils.m4
deleted file mode 100644
index 9bb79a0..0000000
--- a/am/mailutils.m4
+++ /dev/null
@@ -1,89 +0,0 @@
-dnl A fixed version of AM_MAILUTILS macro.
-dnl The macro shipped with mailutils 3.3 mishandles the "mailer"
-dnl link requirement. Until it is fixed upstream, wydawca will be
-dnl using this version.
-
-dnl Copyright (C) 2006-2007, 2010-2012, 2014-2017 Free Software
-dnl Foundation, Inc.
-dnl
-dnl GNU Mailutils is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU General Public License as
-dnl published by the Free Software Foundation; either version 3, or (at
-dnl your option) any later version.
-dnl
-dnl GNU Mailutils is distributed in the hope that it will be useful, but
-dnl WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-
-m4_define([am_mu_vercmp],[
-m4_pushdef([_ver_A_],m4_car($1))dnl
-m4_pushdef([_ver_B_],m4_car($2))dnl
-m4_if(_ver_B_,,:,[if test m4_if(_ver_A_,,0,_ver_A_) -lt _ver_B_; then
- $3
-elif test m4_if(_ver_A_,,0,_ver_A_) -eq _ver_B_; then
-am_mu_vercmp(m4_cdr($1),m4_cdr($2),[$3])
-fi
-m4_popdef([_ver_A_])dnl
-m4_popdef([_ver_B_])dnl])])
-
-dnl AM_GNU_MAILUTILS(minversion, link-req, [act-if-found], [ac-if-not-found])
-dnl $1 $2 $3 $4
-dnl Verify if GNU Mailutils is installed and if its version is `minversion'
-dnl or newer. If not installed, execute `ac-if-not-found' or, if it is not
-dnl given, spit out an error message.
-dnl
-dnl If Mailutils is found, set:
-dnl MAILUTILS_CONFIG to the full name of the mailutils-config program;
-dnl MAILUTILS_VERSION to the Mailutils version (string);
-dnl MAILUTILS_VERSION_MAJOR Mailutils version: major number
-dnl MAILUTILS_VERSION_MINOR Mailutils version: minor number
-dnl MAILUTILS_VERSION_PATCH Mailutils version: patchlevel number (or 0,
-dnl if not defined)
-dnl MAILUTILS_LIBS to the list of cc(1) flags needed to link in the
-dnl libraries requested by `link-req';
-dnl MAILUTILS_INCLUDES to the list of cc(1) flags needed to set include
-dnl paths to the Mailutils headers.
-dnl
-dnl Finally, if `act-if-found' is given, execute it. Otherwise, append the
-dnl value of $MAILUTILS_LIBS to LIBS.
-dnl
-AC_DEFUN([AM_GNU_MAILUTILS],
- [AC_PATH_PROG(MAILUTILS_CONFIG, mailutils-config, none, $PATH)
- if test "$MAILUTILS_CONFIG" = "none"; then
- m4_if($4,,[AC_MSG_ERROR(cannot find GNU Mailutils)], [$4])
- fi
- AC_SUBST(MAILUTILS_CONFIG)
- AC_SUBST(MAILUTILS_VERSION)
- AC_SUBST(MAILUTILS_INCLUDES)
- AC_SUBST(MAILUTILS_LIBS)
-
- m4_ifndef([MU_VERSION_PARSE_DEFINED],[[
-mu_version_parse() {
- set -- `echo "@S|@1" | sed 's/^\([0-9\.][0-9\.]*\).*/\1/;s/\./ /g'`
- major=@S|@{1:-0}
- minor=@S|@{2:-0}
- patch=@S|@{3:-0}
-}]
- m4_pushdef([MU_VERSION_PARSE_DEFINED])])
-
- MAILUTILS_VERSION=`$MAILUTILS_CONFIG --info version|sed 's/VERSION=//'`
- mu_version_parse $MAILUTILS_VERSION
- AC_DEFINE_UNQUOTED([MAILUTILS_VERSION_MAJOR], $major, [Mailutils version major number])
- AC_DEFINE_UNQUOTED([MAILUTILS_VERSION_MINOR], $minor, [Mailutils version minor number])
- AC_DEFINE_UNQUOTED([MAILUTILS_VERSION_PATCH], $patch, [Mailutils version patchlevel number])
-
- AC_DEFINE_UNQUOTED(MAILUTILS_VERSION, "$MAILUTILS_VERSION", [Mailutils version number])
- m4_if($1,,,[
- am_mu_vercmp(m4_quote($major, $minor, $patch),
- m4_dquote(m4_bpatsubst($1, [\.],[,])),
- [AC_MSG_ERROR([Mailutils v. $MAILUTILS_VERSION is too old; required is at least ]$1)])
- ])
- MAILUTILS_LIBS=`$MAILUTILS_CONFIG --link $2`
- MAILUTILS_INCLUDES=`$MAILUTILS_CONFIG --compile`
- m4_if($3,,[LIBS="$LIBS $MAILUTILS_LIBS"], [$3])
-])
-
diff --git a/src/gpg.c b/src/gpg.c
index 927faa3..a33e767 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -68,9 +68,13 @@ recursive_rmdir(const char *name)
rc = 1;
} else if (S_ISDIR(st.st_mode))
rc = rmdir_r(ent->d_name);
- else if ((rc = unlink(ent->d_name)) != 0 && errno != ENOENT)
- wy_log(LOG_ERR, _("cannot unlink %s: %s"),
- ent->d_name, strerror(errno));
+ else if ((rc = unlink(ent->d_name)) != 0) {
+ if (errno == ENOENT)
+ rc = 0;
+ else
+ wy_log(LOG_ERR, _("cannot unlink %s: %s"),
+ ent->d_name, strerror(errno));
+ }
}
closedir(dir);
return rc;

Return to:

Send suggestions and report system problems to the System administrator.