Bugzilla – Bug 894
pkgsend should do more action verification
Last modified: 2009-02-13 12:07:54 UTC
You need to log in before you can comment on or make changes to this bug.
ewbox# pkgsend open test35@1 export PKG_TRANS_ID=1206743509_pkg%3A%2Ftest35%401%2C5.11%3A20080328T153149Z ewbox# export PKG_TRANS_ID=1206743509_pkg%3A%2Ftest35%401%2C5.11%3A20080328T153149Z ewbox# pkgsend add dir mode=0555 ewbox# pkgsend close Failed with 500 ewbox# echo $? 0 ewbox# server traceback during this transaction: 127.0.0.1 - - [28/Mar/2008 15:32:11] Internal failure: Traceback (most recent call last): File "/usr/lib/pkg.depotd", line 409, in do_GET exec op_call File "<string>", line 1, in ? File "/usr/lib/pkg.depotd", line 305, in close_0 t.close(request) File "modules/server/transaction.py", line 151, in close File "modules/server/transaction.py", line 290, in accept_publish File "modules/server/transaction.py", line 320, in publish_package File "/usr/lib/python2.4/vendor-packages/pkg/catalog.py", line 471, in update_searchdb self.__update_searchdb_unlocked(fmri_list) File "/usr/lib/python2.4/vendor-packages/pkg/catalog.py", line 452, in __update_searchdb_unlocked self.update_index(f, mfst.search_dict()) File "modules/manifest.py", line 259, in search_dict File "/usr/lib/python2.4/vendor-packages/pkg/actions/directory.py", line 151, in generate_indices return { KeyError: 'path' 127.0.0.1 - - [28/Mar/2008 15:32:11] "GET /close/0/1206743509_pkg%3A%2Ftest35%401%2C5.11%3A20080328T153149Z HTTP/1.1" 500 -
*** Bug 2354 has been marked as a duplicate of this bug. ***
Bulk move of pkgsend bugs to new category.
*** Bug 1238 has been marked as a duplicate of this bug. ***
Not enough error checking is done during action creation (in fromlist and fromstr notably).
pkgsend also needs to handled any errors related to action creation gracefully.
The case given in comment 0 will now fail this way: pkgsend add dir mode=0555 pkgsend: invalid action, 'dir mode=0555': required attribute, 'path', was not provided. In general, since the actions are now always built by pkgsend before being sent, this should allow the action class to perform all of the verification. The only thing the client (pkgsend) needs to do is to catch the appropriate exceptions and display any relevant messages.
Fixed in changeset 873 / b95d76c53b5eeece7335982e3ccf7047770decc4.