From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5D6051391ED for ; Sat, 8 Mar 2014 05:51:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B362AE0AF3; Sat, 8 Mar 2014 05:51:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 22B17E0AF3 for ; Sat, 8 Mar 2014 05:51:19 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 56F1F33FAC7 for ; Sat, 8 Mar 2014 05:51:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id C6BD5188EE for ; Sat, 8 Mar 2014 05:51:15 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1389122245.c366372b1b05c83844902c1bbe19e020471c9c73.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qmerge.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: c366372b1b05c83844902c1bbe19e020471c9c73 X-VCS-Branch: master Date: Sat, 8 Mar 2014 05:51:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fcc0de77-85b5-469c-9148-8325542802bf X-Archives-Hash: aa2503e9524353be021b47519e703a34 commit: c366372b1b05c83844902c1bbe19e020471c9c73 Author: Mike Frysinger gentoo org> AuthorDate: Tue Jan 7 19:17:25 2014 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Jan 7 19:17:25 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commit;h=c366372b qmerge: ignore unmerge errors due to missing files in case someone already did `rm` on it --- qmerge.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qmerge.c b/qmerge.c index 9b7f152..40d4139 100644 --- a/qmerge.c +++ b/qmerge.c @@ -1,7 +1,7 @@ /* * Copyright 2005-2010 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v 1.130 2013/05/09 05:28:11 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v 1.131 2014/01/07 19:17:25 vapier Exp $ * * Copyright 2005-2010 Ned Ludd - * Copyright 2005-2010 Mike Frysinger - @@ -65,7 +65,7 @@ static const char * const qmerge_opts_help[] = { COMMON_OPTS_HELP }; -static const char qmerge_rcsid[] = "$Id: qmerge.c,v 1.130 2013/05/09 05:28:11 vapier Exp $"; +static const char qmerge_rcsid[] = "$Id: qmerge.c,v 1.131 2014/01/07 19:17:25 vapier Exp $"; #define qmerge_usage(ret) usage(ret, QMERGE_FLAGS, qmerge_long_opts, qmerge_opts_help, lookup_applet_idx("qmerge")) char search_pkgs = 0; @@ -1157,8 +1157,11 @@ pkg_unmerge(const char *cat, const char *pkgname, queue *keep) if (!keep || q) { char *p; - if (unlinkat(portroot_fd, e->name + 1, 0)) - errp("could not unlink: %s%s", portroot, e->name + 1); + if (unlinkat(portroot_fd, e->name + 1, 0)) { + /* If a file was already deleted, ignore the error */ + if (errno != ENOENT) + errp("could not unlink: %s%s", portroot, e->name + 1); + } p = strrchr(e->name, '/'); if (p) {