Bug 246130 - ports-mgmt/pkg: variables not expanded (except ABI)
Summary: ports-mgmt/pkg: variables not expanded (except ABI)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-02 21:43 UTC by Stéphane D'Alu
Modified: 2021-01-01 23:10 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (pkg)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane D'Alu 2020-05-02 21:43:02 UTC
According to pkg.conf manual, the following variables are expanded during the parsing of pkg.conf: ABI, OSNAME, RELEASE, VERSION_MAJOR, VERSION_MINOR, ARCH

Using a variable other than ABI, the expansion is not performed.

poudriere: {
    url: https://xxxx/poudriere/packages/$RELEASE/
}

$ pkg --version
1.14.2

$ pkg update
pkg: https://xxxx/poudriere/packages/$RELEASE//packagesite.txz: Not Found
Comment 1 Stéphane D'Alu 2020-11-06 10:47:00 UTC
Same behaviour with 1.15.10
Comment 2 Lasse Brandt Thomsen 2020-12-04 08:47:23 UTC
ABI works.
ARCH, VERSION_MINOR, VERSION_MAJOR does not.

repo config url:
http://poudriere/freebsd${VERSION_MAJOR}${VERSION_MINOR}-default/${ABI}/${ARCH}

Translates to:
http://poudriere/freebsd${VERSION_MAJOR}${VERSION_MINOR}-default/FreeBSD:12:amd64/${ARCH}/meta.txz: Not Found

2020/12/04 09:35:57 [error] 757#100584: *39202 open() "/poudriere/data/packages/freebsd${VERSION_MAJOR}${VERSION_MINOR}-default/FreeBSD:12:amd64/${ARCH}/meta.conf" failed (2: No such file or directory)

pkg --version 1.15.10 on FreeBSD 12.2-RELEASE-p1
Comment 3 Lasse Brandt Thomsen 2020-12-04 10:43:06 UTC
I discovered the same issue in Github:
https://github.com/freebsd/pkg/issues/1897

And fixed in:
https://github.com/freebsd/pkg/commit/740c384344fc50ca7b0c839ce8da135fd6bbc003