Project

General

Profile

Actions

Regression #13712

closed

PHP error: pkg-utils.inc

Added by Steve Wheeler 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
High
Category:
Package System
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Release Notes:
Force Exclusion
Affected Plus Version:
23.01
Affected Architecture:
All

Description

When switching repos in 23.01:

PHP ERROR: Type: 1, File: /etc/inc/pkg-utils.inc, Line: 1550, Message: Uncaught ArgumentCountError: Too few arguments to function pkg_switch_repo(), 1 passed in /usr/local/www/pkg_mgr_install.php on line 292 and exactly 2 expected in /etc/inc/pkg-utils.inc:1550
Stack trace:
#0 /usr/local/www/pkg_mgr_install.php(292): pkg_switch_repo('/usr/local/etc/...')
#1 {main}
thrown @ 2022-11-30 14:51:01

Tested in:

23.01-DEVELOPMENT (amd64)
built on Wed Nov 30 06:05:59 UTC 2022
FreeBSD 14.0-CURRENT

Does not affect 2.7


Files

clipboard-202212091105-mifzu.png (143 KB) clipboard-202212091105-mifzu.png Lev Prokofev, 12/09/2022 02:05 AM
Actions #1

Updated by Ryan Coleman about 2 months ago

Steve Wheeler wrote:

When switching repos in 23.01:

[...]

Tested in:
[...]

Does not affect 2.7

Experienced this on 12.02 build as well. Cannot install packages, 5100 installed default to 22.05-RELEASE and not DEVEL branch.
Netgate 5100
Netgate Device ID: df16d6687347793dccee

Actions #2

Updated by Christian McDonald about 2 months ago

  • Status changed from New to Feedback
  • Assignee set to Christian McDonald
Actions #3

Updated by Christian McDonald about 2 months ago

  • % Done changed from 0 to 100
Actions #4

Updated by Jim Pingle about 2 months ago

  • Release Notes changed from Default to Force Exclusion
Actions #5

Updated by Danilo Zrenjanin about 2 months ago

  • Status changed from Feedback to Resolved

Tested against:

23.01-DEVELOPMENT (amd64)
built on Thu Dec 08 06:08:06 UTC 2022
FreeBSD 14.0-CURRENT

It works as expected. I am marking this ticket resolved.

Actions #6

Updated by Lev Prokofev about 2 months ago

Tested on

23.01-DEVELOPMENT (amd64)
built on Thu Dec 08 06:08:06 UTC 2022
FreeBSD 14.0-CURRENT

It works fine but, if you go to the Update=>Update settings tab choose any branch or just click "Save" you'll get

Fatal error: Uncaught ArgumentCountError: Too few arguments to function pkg_switch_repo(), 1 passed in /usr/local/www/system_update_settings.php on line 68 and exactly 2 expected in /etc/inc/pkg-utils.inc:1544 Stack trace: #0 /usr/local/www/system_update_settings.php(68): pkg_switch_repo('/usr/local/etc/...') #1 {main} thrown in /etc/inc/pkg-utils.inc on line 1544 PHP ERROR: Type: 1, File: /etc/inc/pkg-utils.inc, Line: 1544, Message: Uncaught ArgumentCountError: Too few arguments to function pkg_switch_repo(), 1 passed in /usr/local/www/system_update_settings.php on line 68 and exactly 2 expected in /etc/inc/pkg-utils.inc:1544 Stack trace: #0 /usr/local/www/system_update_settings.php(68): pkg_switch_repo('/usr/local/etc/...') #1 {main} thrown

Actions #7

Updated by Danilo Zrenjanin about 2 months ago

  • Status changed from Resolved to Feedback
Actions #8

Updated by Kris Phillips about 2 months ago

Not seeing

Lev Prokofev wrote in #note-6:

Tested on

23.01-DEVELOPMENT (amd64)
built on Thu Dec 08 06:08:06 UTC 2022
FreeBSD 14.0-CURRENT

It works fine but, if you go to the Update=>Update settings tab choose any branch or just click "Save" you'll get

Fatal error: Uncaught ArgumentCountError: Too few arguments to function pkg_switch_repo(), 1 passed in /usr/local/www/system_update_settings.php on line 68 and exactly 2 expected in /etc/inc/pkg-utils.inc:1544 Stack trace: #0 /usr/local/www/system_update_settings.php(68): pkg_switch_repo('/usr/local/etc/...') #1 {main} thrown in /etc/inc/pkg-utils.inc on line 1544 PHP ERROR: Type: 1, File: /etc/inc/pkg-utils.inc, Line: 1544, Message: Uncaught ArgumentCountError: Too few arguments to function pkg_switch_repo(), 1 passed in /usr/local/www/system_update_settings.php on line 68 and exactly 2 expected in /etc/inc/pkg-utils.inc:1544 Stack trace: #0 /usr/local/www/system_update_settings.php(68): pkg_switch_repo('/usr/local/etc/...') #1 {main} thrown

Not seeing this issue on the Dec 10th builds. I suspect this is resolved, but would like a second person to confirm.

Actions #9

Updated by Steve Wheeler about 2 months ago

  • Status changed from Feedback to Resolved

I was able to replicate that previously. Looks good in the current snap on all archs.

Tested:

23.01-DEVELOPMENT (amd64)
built on Sat Dec 10 03:22:16 UTC 2022
FreeBSD 14.0-CURRENT

Actions

Also available in: Atom PDF