From nobody Sun Apr 02 01:16:09 2023 X-Original-To: freebsd-questions@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 4Ppx1j30Bvz43gSf for ; Sun, 2 Apr 2023 01:16:25 +0000 (UTC) (envelope-from alexmiroslav@gmail.com) Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ppx1h3Cqgz3Jps for ; Sun, 2 Apr 2023 01:16:24 +0000 (UTC) (envelope-from alexmiroslav@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=LcSuzWPk; spf=pass (mx1.freebsd.org: domain of alexmiroslav@gmail.com designates 2a00:1450:4864:20::243 as permitted sender) smtp.mailfrom=alexmiroslav@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lj1-x243.google.com with SMTP id e9so11595884ljq.4 for ; Sat, 01 Apr 2023 18:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680398180; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=xvhCd4E4aeOJNMN8iWx1N2UqjREUwRNzOshOvHtY8XM=; b=LcSuzWPkYKm5xb+CKLctS7jGwPKZWN3z3VqiwSsskv4Alsb9lB7qoGVs5gMHMTNoc/ XbMJGWHRLfnFqjegtKon1c4/iKKqfmD6QNGJHevNC3M+UzD0U5TAocyMFiMAY37Wgejc Okr8r6DKjzSArhdKWfqiIusAJRSuMCXubBfNZC/RdfIrNfWxoyIVnZmXtQy5lGWd6sfu TlRHkENVx29m1SsQY8z04IMiL27ByN7ja5SeYb0N0YNAxdX3mVrIG6QMExBkTQx9Upsr KX75LUu0oNHkrGa+Y7dfdqS/uZ/qZdOn2EAL9BRoKBaS4CKbi9uIf1RUsydmb5icBu8e HINw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680398180; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xvhCd4E4aeOJNMN8iWx1N2UqjREUwRNzOshOvHtY8XM=; b=Hqs/wNkhg9+ypKpJuZdoD+UN64fnQspY3cpgOm1BImgV4+IdiYrqOkG7/EIuEozAeI EerEAg+TsnWopa+qV+7fppo9uzmQucNq2jgbKzxkMkHP3kdrwwtZHGDb6+scyd/XAndm hMOMOemeLc+/IO7wcAKN+5Hv5nSGvwYn6Bdn3zCl4jJHjOcZkskZrtCWTe9gG7PITf6z mbM305OQ/xf9QlXTu4L2JxaZcMcG+7rf8RDJN+CmVuDSzZapQ0n0Gyv7XamylQuZO/Af Lhpy0RMM6TOSTQZHppCxLKU5nthlvxjTV0NZh7KT0NRsB0set5fq63f7gGcwtKSRdrui JNtw== X-Gm-Message-State: AAQBX9dFOdVXQKG/0Kc/kECDycCOAgN4wVnJ2BKkM5xb71CgGf9rlW9d WQjM3ydT5/m3Sfijl7GGtWHRXV2Qo/XB6eJXnOY6XMtEJtTz5H5q0Ai1uJyG9CE= X-Google-Smtp-Source: AKy350bR37XlfPT6Ae4bRSJ6V/UixX/87snutCm8QEL1yAJF9DVHggL2gjbuaGoCKxbMU8YxTW9lQGZpIaC6F4KKN7U= X-Received: by 2002:a2e:3808:0:b0:299:a9db:a4 with SMTP id f8-20020a2e3808000000b00299a9db00a4mr9504580lja.6.1680398180582; Sat, 01 Apr 2023 18:16:20 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 From: Aleksandr Miroslav Date: Sat, 1 Apr 2023 18:16:09 -0700 Message-ID: Subject: "pkg upgrade foo" installs foo if not already installed, bug? To: freebsd-questions@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-2.99 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.988]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::243:from]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4Ppx1h3Cqgz3Jps X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N Observe the following: $ pkg info|grep -q cowsay && echo installed || echo not installed not installed $ sudo pkg upgrade -q -y cowsay $ pkg info|grep -q cowsay && echo installed || echo not installed installed It looks like when "pkg upgrade" is given an uninstalled package to upgrade, it installs it. (This is on 13.1-RELEASE.) I would think the expected behavior would be to throw an error because the package does not exist, or at least have a switch to control it. Am I misunderstanding how "pkg upgrade" should work, or was this behavior changed recently? (I quickly looked through bugzilla, the pkg src tree, and the GitHub issues for pkg and didn't find anything, but it's possible I may have missed something.)