Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Oct 2025 14:55:29 +0900 (JST)
From:      Yasuhiro Kimura <yasu@FreeBSD.org>
To:        freebsd-current@freebsd.org
Subject:   Re: How to make `pkg version` work fine with private pkgbase repository
Message-ID:  <20251008.145529.172147507683569904.yasu@FreeBSD.org>
In-Reply-To: <aOXw49lwd4OGF2yI@amaryllis.le-fay.org>
References:  <20251008.135359.1026187049848325621.yasu@FreeBSD.org> <aOXw49lwd4OGF2yI@amaryllis.le-fay.org>

next in thread | previous in thread | raw e-mail | index | archive | help
From: Lexi Winter <ivy@freebsd.org>
Subject: Re: How to make `pkg version` work fine with private pkgbase repository
Date: Wed, 8 Oct 2025 06:04:35 +0100

>> As is explained in pkg-version(8) man page, `pkg version` summarizies
>> installed versions of packages.
>>[...] 
>> But it doesn't seem to work well if repostory is build with
>> `make (update-)packages`
>>[...] 
>> root@rolling-vm-freebsd5[159]# pkg version -v -n FreeBSD-kernel-generic
>> FreeBSD-kernel-generic-16.snap20251008030957 ?   orphaned: base/FreeBSD-kernel-generic
> 
> using 'pkg version -vR' makes this work.

Thanke for letting me know. By specifying '-R' option the command
works fine as below.

root@rolling-vm-freebsd5[167]# cat /usr/local/etc/pkg/repos/FreeBSD-base.conf
FreeBSD-base: {
  url: "file:///usr0/freebsd/src/repo/${ABI}/latest",
  enabled: yes
  priority: 0
}
root@rolling-vm-freebsd5[168]# pkg version -R -v -n FreeBSD-kernel-generic
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
Updating Poudriere repository catalogue...
Poudriere repository is up to date.
All repositories are up to date.
FreeBSD-kernel-generic-16.snap20251008030957 =   up-to-date with remote
root@rolling-vm-freebsd5[169]# 

> i am not entirely sure why,
> but based on the description of the -R flag in the manpage, it seems
> like pkg will default to consulting /usr/ports if it's available,
> rather than using the repository.  this obviously doesn't work for
> base packages since they don't exist in ports.

I guess such behavior of pkg is influenced by ancient pkg_* commands
that was initially developed when common way to install ports package
was `cd /usr/ports/category/name ; make install`.
 
>> BTW, are there any common(?) or normative(?) or official(?) terms that
>> mean "package built from ports tree" and "package built from src tree"
>> respectively?
> 
> i would call these "ports packages" and "base packages".  this matches
> the default repository names, "FreeBSD-ports" and "FreeBSD-base".

Looks nice. Let me adopt them.

---
Yasuhiro Kimura



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20251008.145529.172147507683569904.yasu>