Skip to content

Commit

Permalink
Merge pull request #484 from citrus-it/merge
Browse files Browse the repository at this point in the history
Upstream merge
  • Loading branch information
oetiker authored Jul 10, 2024
2 parents 9aec25c + 74a6385 commit f150c90
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 345 deletions.
6 changes: 3 additions & 3 deletions README.sync
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
The pkg5 components have been updated to the latest upstream solaris-ips
as of:

commit 616fce8ad21fc03eaa77ba38508c66c356f03d65
commit 2cb20af7cc68247c0a809de5378915a99d2bc17b
Author: Jakub Kulik <[email protected]>
Date: Wed May 29 05:44:20 2024 -0700
Date: Thu Jun 20 04:41:22 2024 -0700

36620736 TestPkgrepoMultiRepo.test_01_diff failing post 36247279
36752252 fix several real errors reported by pylint

-----------------------------------------------------------------------------

2 changes: 1 addition & 1 deletion src/modules/actions/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"""

import os
import subprocess
from pkg.actions import generic

from tempfile import mkstemp

import pkg.pkgsubprocess as subprocess
from pkg.client.debugvalues import DebugValues


Expand Down
2 changes: 1 addition & 1 deletion src/modules/client/bootenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import errno
import os
import shutil
import subprocess
import tempfile

from pkg.client import global_settings
Expand All @@ -35,7 +36,6 @@
import pkg.client.api_errors as api_errors
import pkg.misc as misc
import pkg.portable as portable
import pkg.pkgsubprocess as subprocess

# Since pkg(1) may be installed without libbe installed
# check for libbe and import it if it exists.
Expand Down
2 changes: 1 addition & 1 deletion src/modules/client/client_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3910,7 +3910,7 @@ def __handle_errors_json(
def _wrapper():
raise __e.wrapped

ret_json = __handle_errors_json(_wrapper, non_wrap_print=False)
__, ret_json = __handle_errors_json(_wrapper, non_wrap_print=False)

s = ""
if ret_json["status"] == 99:
Expand Down
2 changes: 1 addition & 1 deletion src/modules/client/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
#
import os.path
import subprocess
import sys

import pkg.misc as misc
import pkg.pkgsubprocess as subprocess
import pkg.portable as portable

from pkg.client.debugvalues import DebugValues
Expand Down
2 changes: 1 addition & 1 deletion src/modules/client/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import platform
import shutil
import stat
import subprocess
import sys
import tempfile
import time
Expand Down Expand Up @@ -68,7 +69,6 @@
import pkg.mediator as med
import pkg.misc as misc
import pkg.nrlock
import pkg.pkgsubprocess as subprocess
import pkg.portable as portable
import pkg.server.catalog
import pkg.smf as smf
Expand Down
1 change: 0 additions & 1 deletion src/modules/client/imageconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import pkg.config as cfg
import pkg.facet as facet
import pkg.misc as misc
import pkg.pkgsubprocess as subprocess
import pkg.portable as portable
import pkg.smf as smf
import pkg.variant as variant
Expand Down
1 change: 0 additions & 1 deletion src/modules/client/linkedimage/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
import pkg.fmri
import pkg.json as json
import pkg.misc as misc
import pkg.pkgsubprocess
import pkg.version

from pkg.client import global_settings
Expand Down
6 changes: 3 additions & 3 deletions src/modules/client/linkedimage/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
# standard python classes
import os
import tempfile
import subprocess


# pkg classes
import pkg.client.api_errors as apx
import pkg.client.pkgdefs as pkgdefs
import pkg.pkgsubprocess

from pkg.client.debugvalues import DebugValues

Expand Down Expand Up @@ -394,7 +394,7 @@ def _zonename():
# open a temporary file in text mode for compatible string handling
fout = tempfile.TemporaryFile(mode="w+")
ferrout = tempfile.TemporaryFile(mode="w+")
p = pkg.pkgsubprocess.Popen(cmd, stdout=fout, stderr=ferrout)
p = subprocess.Popen(cmd, stdout=fout, stderr=ferrout)
p.wait()
if p.returncode != 0:
cmd = " ".join(cmd)
Expand Down Expand Up @@ -471,7 +471,7 @@ def _list_zones(root, path_transform):
# open a temporary file in text mode for compatible string handling
fout = tempfile.TemporaryFile(mode="w+")
ferrout = tempfile.TemporaryFile(mode="w+")
p = pkg.pkgsubprocess.Popen(cmd, stdout=fout, stderr=ferrout)
p = subprocess.Popen(cmd, stdout=fout, stderr=ferrout)
p.wait()
if p.returncode != 0:
cmd = " ".join(cmd)
Expand Down
9 changes: 0 additions & 9 deletions src/modules/client/pkgremote.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,6 @@ def __rpc_server_fork(
fstderr = tempfile.TemporaryFile()

try:
# Under Python 3.4, os.pipe() returns non-inheritable
# file descriptors. On UNIX, subprocess makes file
# descriptors of the pass_fds parameter inheritable.
# Since our pkgsubprocess use posix_pspawn* and doesn't
# have an interface for pass_fds, we reuse the Python
# module subprocess here.
# unexpected-keyword-arg 'pass_fds';
# pylint: disable=E1123
# Redefinition of p type
p = subprocess.Popen(
pkg_cmd,
stdout=fstdout,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/cpiofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import stat
import time
import struct
import pkg.pkgsubprocess as subprocess
import subprocess

# cpio magic numbers
# XXX matches actual cpio archives and /etc/magic, but not archives.h
Expand Down
2 changes: 1 addition & 1 deletion src/modules/depotcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
import shlex
import signal
import ssl
import subprocess
import sys
import time

from urllib.error import HTTPError, URLError
from urllib.request import pathname2url, urlopen
from urllib.parse import urlunparse, urljoin

import pkg.pkgsubprocess as subprocess
import pkg.server.repository as sr


Expand Down
2 changes: 1 addition & 1 deletion src/modules/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ def _generic_update_index(

self.empty_index = False
else:
raise RuntimeError("Got unknown input_type: {0}", input_type)
raise RuntimeError(f"Got unknown input_type: {input_type}")

# Write out the helper dictionaries
self._write_assistant_dicts(tmp_index_dir)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/lint/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def open(self):
"""Start a new log file"""
pass

def format(self, message):
def format(self, message, ignore_linted=False):
"""Given a LintMessage message, format that object
appropriately."""
pass
Expand Down
2 changes: 1 addition & 1 deletion src/modules/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,7 @@ def __getitem__(self, key):

def __setitem__(self, key, value):
"""No assignments to factored manifests allowed."""
assert "FactoredManifests are not dicts"
assert False, "FactoredManifests are not dicts"

def __contains__(self, key):
if not self.loaded and not self.__load_attributes():
Expand Down
Loading

0 comments on commit f150c90

Please sign in to comment.