From owner-freebsd-current@freebsd.org Sun Nov 15 19:33:37 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8037466906 for ; Sun, 15 Nov 2020 19:33:37 +0000 (UTC) (envelope-from guyyur@gmail.com) Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CZ2SJ5nX7z3LqG for ; Sun, 15 Nov 2020 19:33:36 +0000 (UTC) (envelope-from guyyur@gmail.com) Received: by mail-wm1-x332.google.com with SMTP id 10so21909686wml.2 for ; Sun, 15 Nov 2020 11:33:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=zQYdt3Eo9aMCYRwssbaNIh1C73ooJ81pOBJNfimOcsw=; b=DRzkL3qXWemZvDeC+MpQLeSV9Tc4AVAlQh8ErwfH+zpJTrL8affB0YLNoljswGGPgx orl1nxtc09by4hntUc01DXepx988HmVEPblIF5MgYNcVmoH9dLIdTy2pY4kYBeV+hC51 D/582sz7/IwUmtO1BmmEF0eJsMwoV0kvuJpoVxB3xTd1YnSTEQ0MfO1E6bg6p3XypxQl yMTbNPqbvW3sz0dwRgJUXhJC8VERherAuyaIfBOsJSG7hR/BiS+QA6DOs+b7pWvcgLJU pRdSUFjRzMMmIoG3jWrSy7ERdsnshINsnEij+vx3XNHFJE02IaPXwJOOJAAf4HdUhUUr 0ZRA== X-Gm-Message-State: AOAM531UqejWi12arRg68/PaItaUoUNbkk5vflUuBK31KjbZ2tEL7ghV GQkNyW8J1N/RCzWpu4PspUA= X-Google-Smtp-Source: ABdhPJz90XKXIiR7Nu5QdOqfsu9C0xMhRmz1pGfATQtEZdDMWTTOTyh3iASX/bgVc6AwnLPqElFXHA== X-Received: by 2002:a05:600c:2048:: with SMTP id p8mr12263684wmg.165.1605468815172; Sun, 15 Nov 2020 11:33:35 -0800 (PST) Received: from ?IPv6:2a02:ed0:33dd:4e01:f768:e5be:b86:e0e6? ([2a02:ed0:33dd:4e01:f768:e5be:b86:e0e6]) by smtp.gmail.com with ESMTPSA id 15sm16738190wmg.1.2020.11.15.11.33.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Nov 2020 11:33:34 -0800 (PST) Subject: Re: pkg.c revision 367687 breaks pkg To: Scott Long , freebsd-current References: From: Guy Yur Message-ID: <4e5fe0a6-7325-d413-f68f-2c0ebaa34763@gmail.com> Date: Sun, 15 Nov 2020 21:33:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 4CZ2SJ5nX7z3LqG X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::332:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::332:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::332:from]; FREEMAIL_CC(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-current] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2020 19:33:37 -0000 On 15/11/20 8:55 pm, Scott Long wrote: > This is fixed in revision 367701 > > Scott Hi, I am on revision 367710 (newer) and have the same problem. sysctlbyname() returns an empty string and length of 1. sysctl() with name converted to mib works fine. ssize_t tmplen; char path[1000] = { 0 }; tmplen = getlocalbase(path, sizeof(path)); printf("%s : %zd\n", path, tmplen); tmplen = sizeof(path); if (sysctlbyname("user.localbase", path, (size_t *)&tmplen, NULL, 0) == 0)   printf("%s : %zd\n", path, tmplen); int mib[100] = { 0 }; size_t miblen; if (sysctlnametomib("user.localbase", mib, &miblen) == 0) {   for (int i = 0; i < miblen; i++)     printf("%d ", mib[i]);   printf("\n"); } tmplen = sizeof(path); if (sysctl(mib, miblen, path, (size_t *)&tmplen, NULL, 0) == 0)   printf("%s : %zd\n", path, tmplen); prints:  : 1  : 1 8 21 /usr/local : 11 Thanks, Guy Yur > >> On Nov 15, 2020, at 11:52 AM, Manfred Antar wrote: >> >> pkg.c revision 367687 breaks pkg : >> >> (pkg)5052}pkg >> The package management tool is not yet installed on your system. >> Do you want to fetch and install it now? [y/N]: >> >> This is after upgrading to the latest pkg and libutil. >> pkg.c version 367075 works: >> >> (pkg)5057}pkg >> pkg: not enough arguments >> Usage: pkg [-v] [-d] [-l] [-N] [-j |-c |-r ] [-C ] [-R ] [-o var=value] [-4|-6] [] >> >> For more information on available commands and options see 'pkg help’. >> > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"