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 0DB0C1381F3 for ; Mon, 29 Apr 2013 23:03:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B9AC1E08FB; Mon, 29 Apr 2013 23:03:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 47E19E08FB for ; Mon, 29 Apr 2013 23:03:34 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2AC6933DFA1 for ; Mon, 29 Apr 2013 23:03:33 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 559) id E650E2171D; Mon, 29 Apr 2013 23:03:31 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-projects commit in portage-utils: qmerge.c X-VCS-Repository: gentoo-projects X-VCS-Files: qmerge.c X-VCS-Directories: portage-utils X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130429230331.E650E2171D@flycatcher.gentoo.org> Date: Mon, 29 Apr 2013 23:03:31 +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: c3d16dbd-a80b-4586-893d-b07d0f23bd1a X-Archives-Hash: 54fc7b2c4d17ce0bf67e304c0983f58c vapier 13/04/29 23:03:31 Modified: qmerge.c Log: qmerge: create $ROOT when merging if it does not yet exist, and check the return value of merge_tree() Revision Changes Path 1.127 portage-utils/qmerge.c file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/qmerge.c?rev=1.127&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/qmerge.c?rev=1.127&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/qmerge.c?r1=1.126&r2=1.127 Index: qmerge.c =================================================================== RCS file: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v retrieving revision 1.126 retrieving revision 1.127 diff -u -r1.126 -r1.127 --- qmerge.c 29 Apr 2013 16:30:22 -0000 1.126 +++ qmerge.c 29 Apr 2013 23:03:31 -0000 1.127 @@ -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.126 2013/04/29 16:30:22 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v 1.127 2013/04/29 23:03:31 vapier Exp $ * * Copyright 2005-2010 Ned Ludd - * Copyright 2005-2010 Mike Frysinger - @@ -65,7 +65,7 @@ COMMON_OPTS_HELP }; -static const char qmerge_rcsid[] = "$Id: qmerge.c,v 1.126 2013/04/29 16:30:22 vapier Exp $"; +static const char qmerge_rcsid[] = "$Id: qmerge.c,v 1.127 2013/04/29 23:03:31 vapier Exp $"; #define qmerge_usage(ret) usage(ret, QMERGE_FLAGS, qmerge_long_opts, qmerge_opts_help, lookup_applet_idx("qmerge")) char search_pkgs = 0; @@ -854,17 +854,18 @@ return; /* Set up our temp dir to unpack this stuff */ - xasprintf(&p, "%s/qmerge/%s", port_tmpdir, pkg->PF); + xasprintf(&p, "%s/qmerge/%s/%s", port_tmpdir, pkg->CATEGORY, pkg->PF); mkdir_p(p, 0755); xchdir(p); + xasprintf(&D, "%s/image", p); + xasprintf(&T, "%s/temp", p); free(p); /* Doesn't actually remove $PWD, just everything under it */ rm_rf("."); - xasprintf(&D, "%s/qmerge/%s/image", port_tmpdir, pkg->PF); - xasprintf(&T, "%s/qmerge/%s/temp", port_tmpdir, pkg->PF); mkdir("temp", 0755); + mkdir_p(portroot, 0755); /* XXX: maybe some day we should have this step operate on the * tarball directly rather than unpacking it first. */ @@ -915,7 +916,8 @@ if ((contents = fopen("vdb/CONTENTS", "w")) == NULL) errf("come on wtf?"); objs = NULL; - merge_tree("image", portroot, contents, &objs, iargc, iargv); + if (merge_tree("image", portroot, contents, &objs, iargc, iargv)) + errp("failed to merge to %s", portroot); fclose(contents); freeargv(iargc, iargv);