Bug 257807 - "pkg repo" command broken in 1.17.X
Summary: "pkg repo" command broken in 1.17.X
Status: Closed Works As Intended
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: 2021-08-13 09:47 UTC by pascal.guitierrez
Modified: 2021-08-17 20:54 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pascal.guitierrez 2021-08-13 09:47:28 UTC
reading the man page describes:
pkg repo <repo-name>

ls /tmp/test    
curl-7.77.0.txz

Under pkg 1.16.X:
pkg repo /tmp/test 
Creating repository in /tmp/test: 100%
Packing files for repository: 100%

Under pkg 1.17.X:
pkg repo /tmp/test 
pkg: No package files have been found
Cannot create repository catalogue

Is this a bug or has something changed between pkg versions?
Comment 1 Shawn Webb 2021-08-13 14:01:32 UTC
(In reply to pascal.guitierrez from comment #0)
This commit was what broke `pkg repo`. Reverting it make the command happy again.

https://github.com/freebsd/pkg/commit/727f1c948eb5fe2d16c867db9e195c50166bf903
Comment 2 pascal.guitierrez 2021-08-14 03:45:09 UTC
(In reply to Shawn Webb from comment #1)

actually perhaps this is not a bug, since the default pkg extension has been changed from .txz to .pkg?

from the commit message:

- only consider the .pkg when creating a repository
  add an option REPO_ACCEPT_LEGACY_PKG to keep index old pkg

renaming the packages to *.pkg makes it work as expected:

pkg repo /tmp/test 
Creating repository in /tmp/test: 100%
Packing files for repository: 100%

ls /tmp/test | paste -
curl-7.77.0.pkg
meta.conf
meta.pkg
meta.txz
packagesite.pkg
packagesite.txz


and also when:
env REPO_ACCEPT_LEGACY_PKG=true pkg repo /tmp/test
Creating repository in /tmp/test: 100%
Packing files for repository: 100%

works on previous .txz files

so i'd say this is a non-issue?
Comment 3 Baptiste Daroussin freebsd_committer 2021-08-17 15:00:33 UTC
Pascel analysis is the right one, this is a not an issue.
Comment 4 dewayne 2021-08-17 20:54:53 UTC
(In reply to pascal.guitierrez from comment #2)
Thank-you for providing 
env REPO_ACCEPT_LEGACY_PKG=true
as I'm sure that many others that customise their ports will benefit from an ability to revert inhibiting behaviour.