Skip to content

pkg bootstrap selects wrong PACKAGESITE #2329

Closed
@arrowd

Description

@arrowd

The config parsing code in /usr/src/usr.sbin/pkg/config.c only takes into account the last parsed UCL object. This is too naive and results in unexpected behavior.

For example, having this config

FreeBSD: { enabled: false }
MyRepo: {
   url: my_url
   enabled: false
}

MyRepo: {
    enabled: true
}

results in the last object being used to fill the program's config structure. The url become NULL, causing bootstrap to download from the official pkg repo despite it being disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions