topgrade-rs / topgrade

Upgrade all the things
GNU General Public License v3.0
1.84k stars 121 forks source link

--yes not working with FreeBSD pkg #179

Closed yonas closed 1 year ago

yonas commented 1 year ago

What did you expect to happen?

Passing -y or --yes to topgrade should make FreeBSD pkg upgrades proceed automatically.

What actually happened?

FreeBSD pkg asks and waits for confirmation.

Additional Details

OS: FreeBSD 13.1-RELEASE-p3 amd64

$ topgrade --dry-run

―― 14:21:01 - FreeBSD Packages ―――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /usr/local/bin/doas /usr/sbin/pkg upgrade

―― 14:21:01 - Cargo ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /home/yonas/.cargo/bin/cargo-install-update install-update --git --all
Dry running: /usr/local/bin/go env GOPATH

―― 14:21:01 - pip3 ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /usr/local/bin/python3 -m pip install --upgrade --user pip

―― 14:21:01 - chezmoi ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /usr/local/bin/chezmoi update

―― 14:21:01 - Vim ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /usr/local/bin/vim -u /home/yonas/.vimrc -U NONE -V1 -nNesS /tmp/.tmpy7TRyw

―― 14:21:01 - Neovim ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /usr/local/bin/nvim -u /home/yonas/.config/nvim/init.vim -U NONE -V1 -nNesS /tmp/.tmp8WoVyD

―― 14:21:01 - Node Package Manager ―――――――――――――――――――――――――――――――――――――――――――――
Dry running: /usr/local/bin/npm update -g

―― 14:21:01 - micro ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /usr/local/bin/micro -plugin update

―― 14:21:02 - FreeBSD Update ―――――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /usr/local/bin/doas /usr/sbin/freebsd-update fetch install

―― 14:21:02 - Summary ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
FreeBSD Packages: OK
cargo: OK
pip3: OK
chezmoi: OK
vim: OK
Neovim: OK
npm: OK
FreeBSD Upgrade: OK

pkg: http://vuxml.freebsd.org/freebsd/vuln.xml.xz: Forbidden
pkg: cannot fetch vulnxml file
topgrade -y -v                                                                                                                                                                                                     
 2022-11-13T19:22:32.643Z DEBUG topgrade::config > Configuration at /home/yonas/.config/topgrade.toml                                                                                                                
 2022-11-13T19:22:32.643Z DEBUG topgrade::config > Loaded configuration: ConfigFile { pre_commands: Some({}), post_commands: None, commands: Some({}), git_repos: None, predefined_git_repos: None, disable: None, ig
nore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, git_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: None, yay_arguments: None, 
no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, accept_all_windows_updates: None, bashit_branch: None, only: None, composer: Some(Composer { self_update: None }), brew: Some(Brew { greedy
_cask: None }), linux: Some(Linux { yay_arguments: None, arch_package_manager: None, show_arch_news: None, trizen_arguments: None, pikaur_arguments: None, dnf_arguments: None, apt_arguments: None, enable_tlmgr: No
ne, redhat_distro_sync: None, rpm_ostree: None, emerge_sync_flags: None, emerge_update_flags: None }), git: Some(Git { max_concurrency: None, arguments: None, repos: None, pull_predefined: None }), windows: Some(W
indows { accept_all_updates: None, self_rename: None, open_remotes_in_new_terminal: None, enable_winget: None }), npm: Some(NPM { use_sudo: None }), vim: None, firmware: Some(Firmware { upgrade: None }), vagrant: 
None, flatpak: Some(Flatpak { use_sudo: None }) }                                                                                                                                                                    
 2022-11-13T19:22:32.643Z DEBUG topgrade         > Version: 9.0.1                                                                                                                                                    
 2022-11-13T19:22:32.643Z DEBUG topgrade         > OS: x86_64-unknown-freebsd                                                                                                                                        
 2022-11-13T19:22:32.643Z DEBUG topgrade         > Args { inner: ["topgrade", "-y", "-v"] }                                                                                                                          
 2022-11-13T19:22:32.643Z DEBUG topgrade         > Binary path: Ok("/usr/local/bin/topgrade")                                                                                                                        
 2022-11-13T19:22:32.643Z DEBUG topgrade         > Self Update: false                                                                                                                                                
 2022-11-13T19:22:32.643Z DEBUG topgrade::utils  > Detected "/usr/local/bin/git" as "git"                                                                                                                            
 2022-11-13T19:22:32.643Z DEBUG topgrade::utils  > Detected "/usr/local/bin/doas" as "doas"                                                                                                                          
 2022-11-13T19:22:32.643Z DEBUG topgrade::utils  > Cannot find "pwsh"                                                                                                                                                
 2022-11-13T19:22:32.644Z DEBUG topgrade::utils  > Cannot find "powershell"                                                                                                                                          
 2022-11-13T19:22:32.644Z DEBUG topgrade::runner > Step "yadm"                                                                                                                                                       
 2022-11-13T19:22:32.644Z DEBUG topgrade::runner > Step "nix"                                                                                                                                                        
 2022-11-13T19:22:32.644Z DEBUG topgrade::runner > Step "home-manager"                                                                                                                                               
 2022-11-13T19:22:32.644Z DEBUG topgrade::runner > Step "asdf"                                                                                                                                                       
 2022-11-13T19:22:32.644Z DEBUG topgrade::runner > Step "pkgin"                                                                                                                                                      
 2022-11-13T19:22:32.644Z DEBUG topgrade::runner > Step "FreeBSD Packages"                                                                                                                                           

―― 14:22:32 - FreeBSD Packages ―――――――――――――――――――――――――――――――――――――――――――――――――                                                                                                                                     
 2022-11-13T19:22:32.645Z DEBUG topgrade::executor > Running "/usr/local/bin/doas" "/usr/sbin/pkg" "upgrade"                                                                                                         
Updating FreeBSD repository catalogue...                                                                                                                                                                             
FreeBSD repository is up to date.                                                                                                                                                                                    
All repositories are up to date.                                                                                                                                                                                     
Checking for upgrades (57 candidates): 100%                                                                                                                                                                          
Processing candidates (57 candidates): 100%
The following 58 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        ...
Installed packages to be UPGRADED:  
        ...

Installed packages to be REINSTALLED:
        ...

Number of packages to be installed: 1
Number of packages to be upgraded: 55
Number of packages to be reinstalled: 2

The process will require 27 MiB more space.
474 MiB to be downloaded.

Proceed with this action? [y/N]:
ercan1104 commented 1 year ago

Try to run in version 10.1.2. You can download from releases and put in /usr/bin/topgrade.

yonas commented 1 year ago

@ercan1104

You can download from releases...

I'm running FreeBSD. Are you able to publish a FreeBSD release?

ercan1104 commented 1 year ago

@ercan1104

You can download from releases...

I'm running FreeBSD. Are you able to publish a FreeBSD release?

You can build from source by Cargo.

yonas commented 1 year ago

@ercan1104 I just built from source. I'm getting the same error.

ercan1104 commented 1 year ago

@ercan1104 I just built from source. I'm getting the same error.

Which version did you built? Try to run topgrade --version or run the binary file which you have built.

yonas commented 1 year ago

Which version did you built?

Topgrade 10.1.2

I've submitted a pull request for this here: https://github.com/topgrade-rs/topgrade/pull/181

s34m commented 1 year ago

Closed with #198 by @yonas