Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"pkg: unknown command: bootstrap" if system has an update pkg #6

Closed
freecris opened this issue Feb 28, 2025 · 4 comments
Closed

"pkg: unknown command: bootstrap" if system has an update pkg #6

freecris opened this issue Feb 28, 2025 · 4 comments

Comments

@freecris
Copy link

Hi,

if system has a pkg updated, running pkgbasify I got:
pkg: unknown command: bootstrap

Solution:
pkg delete -f pkg

Maybe this should be in the README file.

@ifreund
Copy link
Owner

ifreund commented Feb 28, 2025

What pkg version are you using? I cannot reproduce this issue or see why it would happen.

When I run pkg bootstrap on a system where pkg has already been bootstrapped it simply logs a message and exits cleanly.

@freecris
Copy link
Author

freecris commented Feb 28, 2025

Hi Isaac,

this is in a different box:

# uname -rms
FreeBSD 14.2-RELEASE-p1 amd64
# pkg -v
2.0.6
# ./pkgbasify.lua
Running this tool will irreversibly modify your system to use pkgbase.
This tool and pkgbase are experimental and may result in a broken system.
It is highly recommend to backup your system before proceeding.
Do you accept this risk and wish to continue? (y/n) y
pkg: unknown command: bootstrap

For more information on available commands and options see 'pkg help'.
Error: failed to bootstrap pkg.
# pkg bootstrap
pkg(8) already installed, use -f to force.
#

@ifreund
Copy link
Owner

ifreund commented Feb 28, 2025

Ok, I can reproduce the issue. pkg bootstrap still works on pkg 2.0.6 but pkg bootstrap -y seems to have regressed and now causes the very unhelpful "unknown command bootstrap" error to be logged. I'll add a workaround in pkgbasify and fix the bug in upstream pkg.

ifreund added a commit to ifreund/pkg that referenced this issue Feb 28, 2025
Currently, this causes pkg to exit with the very unhelpful error message
"pkg: unknown command: bootstrap"

This used to have the same behavior as `pkg bootstrap`in older versions
of pkg prior to commit fb9b331.

This commit restores the old behavior of `pkg bootstrap -y` and does not
affect the behavior if `-f` is passed.

Sponsored by:	The FreeBSD Foundation
References:	ifreund/pkgbasify#6
ifreund added a commit to ifreund/pkg that referenced this issue Feb 28, 2025
Currently, this causes pkg to exit with the very unhelpful error message
"pkg: unknown command: bootstrap"

This used to have the same behavior as `pkg bootstrap`in older versions
of pkg prior to commit fb9b331.

This commit restores the old behavior of `pkg bootstrap -y` and does not
affect the behavior if `-f` is passed.

Sponsored by:	The FreeBSD Foundation
References:	ifreund/pkgbasify#6
@ifreund
Copy link
Owner

ifreund commented Feb 28, 2025

Thanks for the bug report, this should be working now :)

bapt pushed a commit to freebsd/pkg that referenced this issue Feb 28, 2025
Currently, this causes pkg to exit with the very unhelpful error message
"pkg: unknown command: bootstrap"

This used to have the same behavior as `pkg bootstrap`in older versions
of pkg prior to commit fb9b331.

This commit restores the old behavior of `pkg bootstrap -y` and does not
affect the behavior if `-f` is passed.

Sponsored by:	The FreeBSD Foundation
References:	ifreund/pkgbasify#6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants