From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YHV1D15P8WaIBQEAqHPOHw:P1 (envelope-from ) for ; Mon, 23 Sep 2024 11:22:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YHV1D15P8WaIBQEAqHPOHw (envelope-from ) for ; Mon, 23 Sep 2024 13:22:06 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=panxcc1D; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727090526; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=57DTYeWzC0cm2aQ/nQQEFhfKxPpwhAzvZgmLxu3dKUI=; b=aUwdEZ1sLkiNUCWULxiKrxdgWntpSGJHkul0U1mdIInr7JLcdY3Morse+zRcv5PcC60WBo dSR1oNBYeRVsxzHBVS6kxHDgil3MO/Zy4hRL+QKnmT8pSDjzk9JV/AfStDht0aATs9aoCi 5ygcktGRkwyKxOUKY+CvO1qvFuktcaJHnPBdKQorEEWfw4imFZ4SAVX5/icBly67P223KT sOHVNgYglZxqR9flPX7Wi0Un5D/Xf1rqBc0cEOVCCEBckF4ttSVz16dTkDzwT2H+DVv4Pe aXWY0JHV9sHNw/wNwm7C6u+9MWX6YFbtO8U8ul/T7s8UxhohIb3qGfQ0jr+Clg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=panxcc1D; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727090526; a=rsa-sha256; cv=none; b=YAW0smS67aUhF6zisLfWjTTnsePgVMDkIJwERF5KkWW5er7L3UZHuG7DijRTW8WGpQP+Z6 vo6hlzamAJwCUEruK1NlzrDlYBzAeLF3WjAX7yCaEAi03tV1w7SO4XWTIy0jia2LIwxAOd S6Yi+0USoehZFPVFq/qnN/1+TKSxsbZBXcQOkiEhP0ukyYgKh4ezyBCcOofGDdFgo8/1T6 YNGKcYJe/KtCXo3/rOde/GPdYY/feZA0WU3+rxnFWq2H/X70mcaGazjhcjjNiXSHgxadbW qC/V4+mgRcjikhphVZz87TrKecyQWhTZJfHYGk5yK+GL5w4IJCzS/eFtUO15cg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7547F770E6 for ; Mon, 23 Sep 2024 13:22:04 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssh8U-0000m9-FN; Mon, 23 Sep 2024 07:21:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssh8N-0000Ch-Nj for guix-patches@gnu.org; Mon, 23 Sep 2024 07:21:39 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssh8N-00042b-DS for guix-patches@gnu.org; Mon, 23 Sep 2024 07:21:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=57DTYeWzC0cm2aQ/nQQEFhfKxPpwhAzvZgmLxu3dKUI=; b=panxcc1DIfu8ZSONCEPY01kRs/UjUdlBBjEXEme68nWFr+ykLaEjzpwuqjWitBCdzmdyLwKe/Z+bWp2g3CCIDEU6ofWJDhdvweciEitNFfTivuwYPlB/0l7LRJd7yZ+bMhQ/hKz+b0wezawhE/E28HmbxLkKK9TFy+Fi6p+rU9jHvG30xK3gOFHikGYMpiUAWivlt9iR/hKrAIeJ2k74NY11ajcJeTPujCXOOtjbt4VDdvm8woAQhhR2J/0FU3BPDULk6BMsVOFTkI5o3df9sPWPO+PHBrrXGgX+4pUYnRAraAqbVaTlb6coEIxAOR58KvnljmkVFCRCrR0pk5vsCA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ssh8k-0007Dd-4w for guix-patches@gnu.org; Mon, 23 Sep 2024 07:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73438] [PATCH] Better error message in checkStoreName Resent-From: Brennan Vincent Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Sep 2024 11:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73438 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73438@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172709051127724 (code B ref -1); Mon, 23 Sep 2024 11:22:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Sep 2024 11:21:51 +0000 Received: from localhost ([127.0.0.1]:43293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssh8Y-0007D6-V2 for submit@debbugs.gnu.org; Mon, 23 Sep 2024 07:21:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:54838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssh8X-0007Cy-0X for submit@debbugs.gnu.org; Mon, 23 Sep 2024 07:21:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssh88-0007sq-Ve for guix-patches@gnu.org; Mon, 23 Sep 2024 07:21:25 -0400 Received: from smtp.umanwizard.com ([54.203.248.109]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssh7z-0003zw-5L for guix-patches@gnu.org; Mon, 23 Sep 2024 07:21:23 -0400 Received: from localhost ([98.171.11.233]) by smtp.umanwizard.com ; 23 Sep 2024 11:21:09 +0000 X-Fes-Received-For: guix-patches@gnu.org X-Fes-Received-From: From: Brennan Vincent X-Envelope-From: b681f718b15b9b38e4d28a653bdf5f5ea974939a Mon Sep 17 00:00:00 2001 Date: Mon, 23 Sep 2024 07:21:07 -0400 Message-ID: <871q1ad3a4.fsf@denver.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain X-Fes-Encrypted: true X-Fes-Ehlo-Domain: localhost Received-SPF: pass client-ip=54.203.248.109; envelope-from=brennan@umanwizard.com; helo=smtp.umanwizard.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.01 X-Spam-Score: -4.01 X-Migadu-Queue-Id: 7547F770E6 X-Migadu-Scanner: mx10.migadu.com X-TUID: Lo21M76GA61t When trying to pass a local-file beginning with a dot to something like home-files-service-type, one gets an error message like: guix home: error: invalid name: `.vimrc' which does not explain what went wrong. This update should make it more clear. Change-Id: I045a663bc6cd9844677c65b38a31d3941cf212b5 --- nix/libstore/store-api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 781fb9e693..38a1403a71 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc @@ -61,7 +61,7 @@ void checkStoreName(const string & name) /* Disallow names starting with a dot for possible security reasons (e.g., "." and ".."). */ if (string(name, 0, 1) == ".") - throw Error(format("invalid name: `%1%'") % name); + throw Error(format("invalid name: `%1%' (can't begin with dot)") % name); foreach (string::const_iterator, i, name) if (!((*i >= 'A' && *i <= 'Z') || (*i >= 'a' && *i <= 'z') || base-commit: 6ea75bb9bcc52521f0bb3f121799745fdc17f1c9 -- 2.46.0