From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NWl8G-0003Jm-77 for garchives@archives.gentoo.org; Mon, 18 Jan 2010 06:30:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16E79E064F; Mon, 18 Jan 2010 06:30:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E6933E064F for ; Mon, 18 Jan 2010 06:30:31 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 4BBA466D65 for ; Mon, 18 Jan 2010 06:30:31 +0000 (UTC) Received: from solar by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1NWl86-0004qB-T8 for gentoo-commits@lists.gentoo.org; Mon, 18 Jan 2010 06:30:26 +0000 From: "Ned Ludd (solar)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, solar@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: solar X-VCS-Committer-Name: Ned Ludd Content-Type: text/plain; charset=utf8 Message-Id: Sender: Ned Ludd Date: Mon, 18 Jan 2010 06:30:26 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 21d882b6-6e7c-4265-8431-a233c9f53855 X-Archives-Hash: 72e903e12ffb2f5da6c4e5d02c9b52b4 solar 10/01/18 06:30:26 Modified: qmerge.c Log: - when DEFINED_PHASES exists no longer run postinst unless it is define= d Revision Changes Path 1.93 portage-utils/qmerge.c file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils= /qmerge.c?rev=3D1.93&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils= /qmerge.c?rev=3D1.93&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils= /qmerge.c?r1=3D1.92&r2=3D1.93 Index: qmerge.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v retrieving revision 1.92 retrieving revision 1.93 diff -u -r1.92 -r1.93 --- qmerge.c 13 Jan 2010 19:16:22 -0000 1.92 +++ qmerge.c 18 Jan 2010 06:30:26 -0000 1.93 @@ -1,7 +1,7 @@ /* * Copyright 2005-2007 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v 1.92 2= 010/01/13 19:16:22 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v 1.93 2= 010/01/18 06:30:26 solar Exp $ * * Copyright 2005-2007 Ned Ludd - * Copyright 2005-2007 Mike Frysinger - @@ -55,7 +55,7 @@ COMMON_OPTS_HELP }; =20 -static const char qmerge_rcsid[] =3D "$Id: qmerge.c,v 1.92 2010/01/13 19= :16:22 vapier Exp $"; +static const char qmerge_rcsid[] =3D "$Id: qmerge.c,v 1.93 2010/01/18 06= :30:26 solar Exp $"; #define qmerge_usage(ret) usage(ret, QMERGE_FLAGS, qmerge_long_opts, qme= rge_opts_help, lookup_applet_idx("qmerge")) =20 char search_pkgs =3D 0; @@ -402,6 +402,18 @@ return c; } =20 +int has_postinst(char *vdbroot); +int has_postinst(char *vdbroot) { + FILE *fp; + char buf[1024]; + snprintf(buf, sizeof(buf), "%s/%s", vdbroot, "DEFINED_PHASES"); + if ((fp =3D fopen(buf, "r")) =3D=3D NULL) + return 1; + fgets(buf, sizeof(buf), fp); + fclose(fp); + return ((strstr(buf, "postinst") =3D=3D NULL) ? 0 : 2); +} + /* oh shit getting into pkg mgt here. FIXME: write a real dep resolver. = */ void pkg_merge(int level, depend_atom *atom, struct pkg_t *pkg) { @@ -784,7 +796,7 @@ interactive_rename("vdb", buf, pkg); =20 /* run postinst on non embedded systems */ - if (which("ebuild") !=3D NULL) { + if ((which("ebuild") !=3D NULL) && has_postinst(buf)) { char *tbuf; xasprintf(&tbuf, "ebuild %s/%s.ebuild postinst", buf, basename(buf)); xsystem(tbuf);