From nobody Mon Sep 12 22:51:40 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 4MRMKm0p5fz4cY3v for ; Mon, 12 Sep 2022 22:51:56 +0000 (UTC) (envelope-from tatsuki_makino@hotmail.com) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01olkn2072.outbound.protection.outlook.com [40.92.52.72]) (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 4MRMKk6Mtpz3s9m for ; Mon, 12 Sep 2022 22:51:54 +0000 (UTC) (envelope-from tatsuki_makino@hotmail.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CGpBXT7ki643xyqdUCy0B6o8cjiGp6nbJfksz7ACuLOXXgTcFlx00iHo3Q0gaSF48v+zOaytkx6M/mS0Wz/2vw/LAV0WOLCle4URGIVOqWsSHHOH3FEqxE5yOXT3Tgztb+Uf9XF5Hr3PeTUZXqXBI7yfYjuAZj+w/HTsGPd+sXIvHAbKycukkAc7olRlCxRjJ4AtYRpzszdI+tFEBnTT3q5IxaO21EPsFBzQu+NTF6eO/+HI9Sm8dTUi0YPSrLEPMOj1Ngljo+xgYF8044MOfpK0tGD0Ke7BXkg5vabNThJE6KgquhI0eKdd30MZiGfVT9ohkG81E0X/VbHGjUns5Q== 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=H4rYLtwsSS7UcSsEr6IlqpscmCKQBVXfsu40ojO6TsQ=; b=MVs+MvketszhZo9fVLyfCqSXhE+VqH53xLUp00Z7x8PYTC9MOhVE/aAvtjbCZtApVXYFjZ9xOPBruOM66S104BjB7PP1b8voiEqrnUXW4PZb/W7QuJAqeA8S+EZIqlDniicggo7NmG1Bx+gHoxmMmvG7ERVEiFRNmX3mzl/uqCqGRlI+VIPBCFqTgw7VRHr0B92LOBMJDEcM8LK1lJ3a9qUiff37GsfmgZZMMawu0L2b58OLjrtc/TfSWXf9wUcbjS8+sLV5KDl+M4UFjWDnLDQY2a+QgR3z3fHoxJu2qB/lfNkTj9awwDNvlfP42aOxdC7UKQyG7LCppmMDsP/Quw== 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=H4rYLtwsSS7UcSsEr6IlqpscmCKQBVXfsu40ojO6TsQ=; b=Y8w/yNuHMPdO3O2+5IrS/opAiVhQXj1CWRH4NiyQVzu9+Q4ZMAzIGISna6+PMf0675go5xxXoRXPOMYQ232nhv+sZcRhWLTfNp3kH+yRwt4uuI7Ykhre2ieUUALkehYNWojSIGT60t5KJ1A7um3a8rHHWys8O+OEh3EfnI1QAEKZ76mZS8qqfuzMHDqd7lJFrjRp3j+2StKKKhnLgCaVlgvOSAkPJwtxPkgnOx+5z1dniYNTN9TDG9KRM/9JIir9ksv2gbQ8ZX5+ffOPewYFm2gAvcj68zFF73V5yeM4TAdh0SgQCKH2amEsfiHwXg0n/UzEgoT1EANUKUaDwnbigw== Received: from PSAPR03MB5639.apcprd03.prod.outlook.com (2603:1096:301:66::13) by SG2PR03MB4279.apcprd03.prod.outlook.com (2603:1096:4:87::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.12; Mon, 12 Sep 2022 22:51:50 +0000 Received: from PSAPR03MB5639.apcprd03.prod.outlook.com ([fe80::c13f:74fe:11e1:125e]) by PSAPR03MB5639.apcprd03.prod.outlook.com ([fe80::c13f:74fe:11e1:125e%5]) with mapi id 15.20.5632.012; Mon, 12 Sep 2022 22:51:50 +0000 Subject: ports-mgmt/pkg: 1.18.4 excess "already" message when pkg lock To: "freebsd-ports@FreeBSD.org" From: Tatsuki Makino Message-ID: Date: Tue, 13 Sep 2022 07:51:40 +0900 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TMN: [kVjhlxFPRu71g59c/GT2eMOvKeTtuJOL] X-ClientProxiedBy: TYCP286CA0045.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:29d::19) To PSAPR03MB5639.apcprd03.prod.outlook.com (2603:1096:301:66::13) X-Microsoft-Original-Message-ID: <0f92cb5b-20a0-4305-75d9-9e1d91de10c0@hotmail.com> 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-TrafficTypeDiagnostic: PSAPR03MB5639:EE_|SG2PR03MB4279:EE_ X-MS-Office365-Filtering-Correlation-Id: 888ea01e-93a7-4b68-e38c-08da95116131 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKyy4kLjx+6609/ZBCGcDuKEj5qTqc6fkN4JmX1zdAZQUpcmnLeaivljGclw/C8TuhtgHZoJCKGichTuZQCvEbhtKrh7OTVbKLHMrlCFl3kLnwyZPQ2S+XJKNkNHfTogeExHI9xGnuTXmWIyu84T6InHAkZv/fbuIGcYiQL/fYhAGRlRnrYBmbH92s+ZV+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VeHV5MXppck5Wb1d2S1R3Z0lYYjNveDFFenBCUGFMK2tHSWFReHZW?= =?utf-8?B?bFlsbmJnT2dGaTJ6cGx0VlNMVHZYdW1wTThqQ3RCam92bzg5MFNTdWwwWXBK?= =?utf-8?B?d0t2cGhETjJiWFhiZmxrL0NkMzV3aWV2amp4QitZK0l1Ylp1VHA5MzdOeFJZ?= =?utf-8?Q?HtSjb20ySb8/DHHkGY=3D?= X-OriginatorOrg: sct-15-20-4734-24-msonline-outlook-c0b75.templateTenant X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR03MB4279 X-Rspamd-Queue-Id: 4MRMKk6Mtpz3s9m X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b="Y8w/yNuH"; 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.52.72 as permitted sender) smtp.mailfrom=tatsuki_makino@hotmail.com X-Spamd-Result: default: False [-0.95 / 15.00]; FORGED_MUA_SEAMONKEY_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; NEURAL_HAM_SHORT(-0.97)[-0.969]; DMARC_POLICY_ALLOW(-0.50)[hotmail.com,none]; NEURAL_HAM_LONG(-0.37)[-0.368]; R_DKIM_ALLOW(-0.20)[hotmail.com:s=selector1]; R_SPF_ALLOW(-0.20)[+ip4:40.92.0.0/15]; NEURAL_HAM_MEDIUM(-0.12)[-0.115]; MIME_GOOD(-0.10)[text/plain]; TO_DN_EQ_ADDR_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:8075, ipnet:40.80.0.0/12, country:US]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[hotmail.com:+]; FREEMAIL_FROM(0.00)[hotmail.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[40.92.52.72:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N Hello. When pkg lock/unlock with pkg-1.18.4, some packages may say "already" message. # pkg lock pkg llvm13 pkg-1.18.4: lock this package? [y/N]: y Locking pkg-1.18.4 llvm13-13.0.1_3: lock this package? [y/N]: y Locking llvm13-13.0.1_3 llvm13-13.0.1_3: already locked # pkg unlock pkg llvm13 pkg-1.18.4: unlock this package? [y/N]: y Unlocking pkg-1.18.4 llvm13-13.0.1_3: unlock this package? [y/N]: y Unlocking llvm13-13.0.1_3 llvm13-13.0.1_3: already unlocked The following is how to find a package that can reproduce it. In other words, it is ports with 2 or more CATEGORIES. pkg query -e "%#C >= 2" %n The reason for this is.... SQL obtained by pkg -dddd is as follows Some parts are omitted because they are long. WITH ... SELECT DISTINCT ... locked, ... FROM packages AS p LEFT JOIN pkg_categories ON p.id = pkg_categories.package_id LEFT JOIN categories ON categories.id = pkg_categories.category_id ... WHERE (p.name = 'llvm13' ... UPDATE packages SET locked = 1 WHERE id = ... The WITH... one is a SQL statement executed by pkgdb_it_next. The UPDATE... one is a SQL statement executed by pkgdb_set. WITH... statement has DISTINCT, but if there is no DISTINCT, it seems to return the same entry for a number of categories. It usually returns only 1 entry due to DISTINCT. However, if pkgdb_it_next and pkgdb_set are executed alternately and the locked column returned by SELECT is updated in the process, it appears that DISTINCT will not treat them as the same entry. Therefore, the message "already locked/unlocked" is displayed once. I don't know how to fix it :) That's all for now :) Regards.