Bugzilla – Bug 850
pkgsend traceback if invalid or unavailable repository url specified
Last modified: 2009-02-13 12:07:40 UTC
You need to log in before you can comment on or make changes to this bug.
pkgsend gives large traceback if pkg.depotd is not running or if the wrong url is provided with the -s option. below are tracebacks from the following: pkgsend open test@1 (when no pkg.depotd server running) pkgsend -s http://localhost:88 open test@1 (while pkg.depotd running on port 80) There are also tracebacks when malformed url's are used pkgsend -s tar open test@1 Commands and tracebacks: # pkgsend open test@1 Traceback (most recent call last): File "/usr/bin/pkgsend", line 345, in ? ret = main_func() File "/usr/bin/pkgsend", line 314, in main_func trans_open(pcfg, pargs) File "/usr/bin/pkgsend", line 105, in trans_open status, id = t.open(config, pargs[0]) File "/usr/lib/python2.4/vendor-packages/pkg/publish/transaction.py", line 57, in open headers = {"Client-Release": os.uname()[2]}) File "/usr/lib/python2.4/vendor-packages/pkg/misc.py", line 77, in versioned_urlopen c = url_opener(req) File "/usr/lib/python2.4/urllib2.py", line 358, in open response = self._open(req, data) File "/usr/lib/python2.4/urllib2.py", line 376, in _open '_open', req) File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain result = func(*args) File "/usr/lib/python2.4/urllib2.py", line 1021, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.4/urllib2.py", line 996, in do_open raise URLError(err) URLError: <urlopen error (146, 'Connection refused')> ewbox# pkgsend -s http://localhost:80 open test@1 export PKG_TRANS_ID=1206405459_pkg%3A%2Ftest%401%2C5.11%3A20080324T173739Z ewbox# pkgsend -s http://localhost:88 open test@1 Traceback (most recent call last): File "/usr/bin/pkgsend", line 345, in ? ret = main_func() File "/usr/bin/pkgsend", line 314, in main_func trans_open(pcfg, pargs) File "/usr/bin/pkgsend", line 105, in trans_open status, id = t.open(config, pargs[0]) File "/usr/lib/python2.4/vendor-packages/pkg/publish/transaction.py", line 57, in open headers = {"Client-Release": os.uname()[2]}) File "/usr/lib/python2.4/vendor-packages/pkg/misc.py", line 77, in versioned_urlopen c = url_opener(req) File "/usr/lib/python2.4/urllib2.py", line 358, in open response = self._open(req, data) File "/usr/lib/python2.4/urllib2.py", line 376, in _open '_open', req) File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain result = func(*args) File "/usr/lib/python2.4/urllib2.py", line 1021, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.4/urllib2.py", line 996, in do_open raise URLError(err) URLError: <urlopen error (146, 'Connection refused')> pkgsend -s tar open test@1 Traceback (most recent call last): File "/usr/bin/pkgsend", line 345, in ? ret = main_func() File "/usr/bin/pkgsend", line 314, in main_func trans_open(pcfg, pargs) File "/usr/bin/pkgsend", line 105, in trans_open status, id = t.open(config, pargs[0]) File "/usr/lib/python2.4/vendor-packages/pkg/publish/transaction.py", line 57, in open headers = {"Client-Release": os.uname()[2]}) File "/usr/lib/python2.4/vendor-packages/pkg/misc.py", line 55, in versioned_urlopen raise ValueError, "Malformed URL: %s" % base_uri ValueError: Malformed URL: tar
Bulk move of pkgsend bugs to new category.
Taking this one, accepting
We need to catch the exceptions and print something reasonable, moving to fix in progress
Assigning to Brad, as I assume he meant to pick this up.
Resetting assignee (and maybe changing status back to accepted) since Brad's leaving Sun and likely won't be able to work on this bug.
Repository URLs should be validated and repository communication errors caught.
Fixed in changeset 873 / b95d76c53b5eeece7335982e3ccf7047770decc4.