Project

General

Profile

Bug #11249

onu: futile to change stickiness of a system publisher

Added by Michal Nowak 8 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

On OpenIndiana (and I believe OmniOS CE) zone with repository from which osnet-incorporation comes from being a system repository:

$ pkg list -Hv osnet-incorporation
pkg://openindiana.org/consolidation/osnet/osnet-incorporation@0.5.11-2018.0.0.18595:20190615T015246Z i--

$ pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
openindiana.org (non-sticky, syspub) origin   online T <system-repository>

The onu script fails while attempting to set non-stickiness to the openindiana.org publisher:

$ pfexec ~/ws/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/onu \
-t "$(date -u +nightly-%Y%m%d-%H%MZ)" \
-d "/export/home/newman/ws/illumos-gate/packages/i386/nightly/" 
Created successfully
Mounted successfully on: '/tmp/onu.4eaOv1'

pkg set-publisher: Cannot change the stickiness of a system publisher
pkg -R /tmp/onu.4eaOv1 set-publisher --no-refresh --non-sticky openindiana.org failed: exit code 1

Such an attempt to set a system repository from within a zone is futile.

The script better check if the repository is non-system before attempting to set non-stickiness, and check if it perhaps already is non-sticky (thus not bother further), otherwise error out asking the administrator to set non-stickiness from global zone.

Also available in: Atom PDF