Project

General

Profile

Bug #8803

when use-system-repo is set to true and later reverted back pkg tries to rebuild files in /var/pkg on every operation

Added by Alexander Pyhalov almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
Start date:
2017-11-14
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

When zone is configured to use system publisher, and then this property is reverted back, pkg tries to rebuild files in /var/pkg on every operation (in fact, during Image class initialization).

To reproduce the issue

1) create (linked image) zone ;

2) configure zone-proxyd in GZ /zones-proxy-client in zone and set use-system-repo zone's image property to true ;

3) run pkg publisher as root; # don't know if it's necessary

4) set use-system-repo property back to false;

5) run "pkg publisher" as non-privileged user
(or almost any pkg-related command)

And we get

Traceback (most recent call last):
  File "/usr/bin/pkgdepend", line 592, in <module>
    __ret = main_func()
  File "/usr/bin/pkgdepend", line 578, in main_func
    return resolve(pargs, img_dir)
  File "/usr/bin/pkgdepend", line 311, in resolve
    exact_match=provided_image_dir)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/api.py", line 370, in __init__
    cmdpath=self.cmdpath)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 231, in __init__
    progtrack)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 526, in find_root
    startd=startd, progtrack=progtrack)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 1000, in __set_dirs
    self.__rebuild_image_catalogs()
  File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 3230, in __rebuild_image_catalogs
    orig_state_root = self.salvage(self._statedir, full_path=True)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 3934, in salvage
    misc.move(orig, sdir)
  File "/usr/lib/python2.7/vendor-packages/pkg/misc.py", line 215, in move
    os.rename(src, dst)

History

#1

Updated by Alexander Pyhalov almost 3 years ago

  • Assignee set to Alexander Pyhalov
  • Status changed from New to Resolved

Also available in: Atom PDF