Project

General

Profile

Actions

Bug #11664

closed

pkg apply-hot-fix: FileNotFoundError: [Errno 2] No such file or director

Added by Michal Nowak about 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
PKG (Image Packaging System)
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

(1) pkg apply-hot-fix is unhappy from + character in the p5p file name.

(2) It ends up badly if the package which is to be updated wasn't originally installed from the publisher in the p5p file.

{global} newman@lenovo:~ $ pfexec pkg apply-hot-fix -vn 'libusb-1+hplip.p5p'
Resolved URL to: file:///export/home/newman/libusb-1%2Bhplip.p5p
Retrieving installed package list...
Traceback (most recent call last):
  File "/usr/bin/pkg", line 5961, in handle_errors
    __ret = func(*args, **kwargs)
  File "/usr/bin/pkg", line 5947, in main_func
    pargs=pargs, **opts)
  File "/usr/bin/pkg", line 2334, in apply_hot_fix
    shutil.copy2(origin[7:], tmp_pth)
  File "/usr/lib/python3.5/shutil.py", line 257, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.5/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/export/home/newman/libusb-1%2Bhplip.p5p'

pkg: This is an internal error in pkg(5) version f4da5959.  Please log a
Service Request about this issue including the information above and this
message.

{global} newman@lenovo:~ $ ll /export/home/newman/libusb-1%2Bhplip.p5p
/export/home/newman/libusb-1%2Bhplip.p5p: No such file or directory

{global} newman@lenovo:~ $ ll /export/home/newman/libusb-1+hplip.p5p
-rw-r--r--   1 newman   staff      29.4M Sep  7 12:28 /export/home/newman/libusb-1+hplip.p5p

{global} newman@lenovo:~ $ mv libusb-1+hplip.p5p libusb-1_hplip.p5p

{global} newman@lenovo:~ $ pkg list print/filter/hplip
NAME (PUBLISHER)                                  VERSION                    IFO
print/filter/hplip (openindiana.org)              3.19.5-2018.0.0.0          i--

{global} newman@lenovo:~ $ pfexec pkg apply-hot-fix -vn 'libusb-1_hplip.p5p'
Resolved URL to: file:///export/home/newman/libusb-1_hplip.p5p
Retrieving installed package list...
Scanning package archive...
     pkg://userland/print/filter/hplip not installed, skipping.
    pkg://userland/library/libusb-1@1.0.23-2019.0.0.0:20190829T105240Z will be updated.

Traceback (most recent call last):
  File "/usr/bin/pkg", line 5961, in handle_errors
    __ret = func(*args, **kwargs)
  File "/usr/bin/pkg", line 5947, in main_func
    pargs=pargs, **opts)
  File "/usr/bin/pkg", line 2467, in apply_hot_fix
    publisher_set(**pubargs)
TypeError: publisher_set() missing 2 required positional arguments: 'li_erecurse' and 'verbose'

pkg: This is an internal error in pkg(5) version f4da5959.  Please log a
Service Request about this issue including the information above and this
message.
Actions #1

Updated by Alexander Pyhalov about 4 years ago

Second part of the issue (TypeError: publisher_set() missing 2 required positional arguments: 'li_erecurse' and 'verbose') should be fixed by https://github.com/OpenIndiana/pkg5/pull/68), which we missed.

Actions #2

Updated by Alexander Pyhalov about 4 years ago

  • Status changed from New to Resolved

First part of the issue is fixed by https://github.com/OpenIndiana/pkg5/pull/69

Actions

Also available in: Atom PDF