From nobody Thu Aug 4 07:17:49 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lz0SF4VBFz4YD6t for ; Thu, 4 Aug 2022 07:18:05 +0000 (UTC) (envelope-from tatsuki_makino@hotmail.com) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01olkn2049.outbound.protection.outlook.com [40.92.53.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lz0SD1XDTz3Spy for ; Thu, 4 Aug 2022 07:18:04 +0000 (UTC) (envelope-from tatsuki_makino@hotmail.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eH6YVEFKKD3OSn0tcESOTFh+PGLLChpz17IRYVN9z4cGr2u1QKnIZky2ZiaudibUAEjmxC2keLqMR/7AQ5R2ZEdLSerd21jU2jA41ZNhKpv8+BPeDLqd9yAYtgO2zH/bhSAVTnykFpeua6qdTmmL3Sus2ceMtHrggdGmZACOr/oLgVqjmSne7BXSOHxcu9PwPQReI/RCemEgxx/7eDjONAOcr8RBIZ0EVX6FrLACZTfYZOnNNNelt8ZVBMYsQG59xNqIpg8lsK+HE2ugbUaTVK+/W4ayUr7k0G8cBNw8762lFdNZIOM7n5CAPkfninVAJZC0TdH1Ov13Ub2vQ/Z9MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T5UVFOBSfZ7ssBgDd/cx92OIvBQLINRuSl1mAa2Ku3U=; b=Atl1yvI569nKhZr2dl6S7N9FEaxzcEOYcfSOPPgjPKOGpvtYyvo3TCntV93tbKpW9a7PXNJC6qOTMTsMcmMAdJa8UCEfx3iffoX6wIL6auJpOQFPMxRu6ylqjRS05vizku3IV5PjO2Ot+Xlah9M6R1gtJMFLYkcovl0QTB+anc0CLZcwwjcqPRgsfCxhlg3UTXUTJ9YDGaI73/PVb69GmUQXuZT0Ed+Uf5AflOu3kQichJQfY/k4laXC6mWk/ZsMcT/yoiUOFSeOpHEqBrpb3nAT6Xp33z9gKBIuruFy7F1kmW/Rsg8ONMtkBUdxWw/HWT71ITU3cuz6scC1A8yewQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T5UVFOBSfZ7ssBgDd/cx92OIvBQLINRuSl1mAa2Ku3U=; b=K0552sOu3vdqf2R1zBn6+SanzdymZ0d0F/RoPXzKkfaH9iwjtwYbfJXb/nutzvrk4vrKqlWkEEeHU2iGy1CMD95dzUuez/rwFLjGZ9H7kQeeAJCXgo04eJF7erUsb5chG29EhM//pxlCU/9Qm4KiYZZTqrZIJHKBrqT/Eqoym3FEsvIqdx2WzqBOXuXx638yF8K08aj+/AhepkQqk7dOrqscVU3o4BCoQU6oG0Bhxg6yqrMLu7MsMfRhPKkUgnT4EWFBxwge1jKbF/sFhNQRa82B3wgKPKc29JK1HzLkqmbBgNFQ92xwIQJbkS8O7yBtudEqDnEQJFZHfHw67xBtMQ== Received: from PSAPR03MB5639.apcprd03.prod.outlook.com (2603:1096:301:66::13) by TY2PR03MB5056.apcprd03.prod.outlook.com (2603:1096:404:e9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Thu, 4 Aug 2022 07:17:59 +0000 Received: from PSAPR03MB5639.apcprd03.prod.outlook.com ([fe80::41ce:b9b4:104b:69aa]) by PSAPR03MB5639.apcprd03.prod.outlook.com ([fe80::41ce:b9b4:104b:69aa%9]) with mapi id 15.20.5504.014; Thu, 4 Aug 2022 07:17:59 +0000 Subject: Re: ports-mgmt/pkg: pkg query -e %#r condition doesn't match properly To: freebsd-ports@freebsd.org References: <202208031420.273EKIij052490@nuc.oldach.net> Message-ID: Date: Thu, 4 Aug 2022 16:17:49 +0900 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TMN: [B7XGDeTWC/CoeFnxIn9ahrcCRF4qkmjL] X-ClientProxiedBy: TYBP286CA0036.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:10a::24) To PSAPR03MB5639.apcprd03.prod.outlook.com (2603:1096:301:66::13) X-Microsoft-Original-Message-ID: List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1a13394f-f715-4654-36ab-08da75e975dc X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiQg2lYDA4pebzoYp6ljRgvt6jG/vLj4DZYEuol2FwOwlxN6s7NGi1T5S2J2LPkxU3MBT5nw60GrQPfOfz+eITN0jx2D5ZT5SRn8LRmW6hoo5KpQytdPKJ3/uQnl3H7sJMYW5QfqnhGPLJrTWBs7HNihfFDuga+8dLD25/zpJnO8cViMLmzpWlGydp2tKfgYpFKoWiFhcmyavmYgsrE6r4ScFRY2944k9bu/aRhrzmirwvGsZshXwqFZM9f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hWjlwT2JNbklmWTRBRDhVcStG?= =?utf-8?B?bXZvUCt4MWhiZm9pempjaUR6My91Z3VkVnZtb0lMc1B6ci9VeEM5UlI2S2Jo?= =?utf-8?B?a2dEdDV6cVh6U2dTUFBiMHdwZGp3NDdwa1BFbVZzKzZoakhnaDJFN1R2TlpW?= =?utf-8?B?NWhwT0JSeDMxNldKdkIzWm5YeC9UOWp3SDdsWHU0dTIrMlZRRzhseEEwMksv?= =?utf-8?Q?x9FxDQ4jb96hjwFfeQ=3D?= X-OriginatorOrg: sct-15-20-4734-24-msonline-outlook-c0b75.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 1a13394f-f715-4654-36ab-08da75e975dc X-MS-Exchange-CrossTenant-AuthSource: PSAPR03MB5639.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2022 07:17:59.5760 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR03MB5056 X-Rspamd-Queue-Id: 4Lz0SD1XDTz3Spy X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=K0552sOu; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.com; spf=pass (mx1.freebsd.org: domain of tatsuki_makino@hotmail.com designates 40.92.53.49 as permitted sender) smtp.mailfrom=tatsuki_makino@hotmail.com X-Spamd-Result: default: False [-1.82 / 15.00]; FORGED_MUA_SEAMONKEY_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; NEURAL_HAM_LONG(-1.00)[-0.996]; NEURAL_HAM_SHORT(-0.98)[-0.981]; DMARC_POLICY_ALLOW(-0.50)[hotmail.com,none]; NEURAL_HAM_MEDIUM(-0.35)[-0.347]; R_SPF_ALLOW(-0.20)[+ip4:40.92.0.0/15]; R_DKIM_ALLOW(-0.20)[hotmail.com:s=selector1]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[40.92.53.49:from]; ASN(0.00)[asn:8075, ipnet:40.80.0.0/12, country:US]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[hotmail.com]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[hotmail.com:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.92.53.49:from] X-ThisMailContainsUnwantedMimeParts: N Looking at "pkg shell .dump | grep \ deps\ " results, it seems that origin without @flavor is not unique. However, ports that use FLAVORS are modified to make the PKGNAME unique. So, the following patch is applied and it seems to be working properly. The commands used in the tests are as follows. pkg query -e "%#r > 2" "%n:%#r" | sort -t : -k 2nr -k 1 If someone has already repaired it, forget it :) Regards. --- src/query.c.orig 2022-08-03 07:37:06 UTC +++ src/query.c @@ -557,7 +557,7 @@ format_sql_condition(const char *str, xstring *sqlcond fprintf(sqlcond->fp, "(SELECT %s FROM deps AS d WHERE d.package_id=p.id)", sqlop); break; case 'r': - fprintf(sqlcond->fp, "(SELECT %s FROM deps AS d WHERE d.origin=p.origin)", sqlop); + fprintf(sqlcond->fp, "(SELECT %s FROM deps AS d WHERE d.name=p.name)", sqlop); break; case 'C': fprintf(sqlcond->fp, "(SELECT %s FROM pkg_categories AS d WHERE d.package_id=p.id)", sqlop);