Bugzilla – Bug 2430
pkgsend add of non-existent file causes traceback
Last modified: 2009-02-13 12:08:22 UTC
You need to log in before you can comment on or make changes to this bug.
While working with pkgsend to test out my changes for bug 1324, I forgot to create a file I was adding to a test package. This is the resulting traceback: pkgsend add file /tmp/libc.so.1 mode=0555 owner=root group=bin path=/lib/libc.so.1 Traceback (most recent call last): File "/export/home/swalker/devel/pkg-1324/proto/root_i386/usr/bin/pkgsend", line 408, in ? ret = main_func() File "/export/home/swalker/devel/pkg-1324/proto/root_i386/usr/bin/pkgsend", line 379, in main_func trans_add(pcfg, pargs) File "/export/home/swalker/devel/pkg-1324/proto/root_i386/usr/bin/pkgsend", line 177, in trans_add status, msg, body = t.add(config, trans_id, action) File "/usr/lib/python2.4/vendor-packages/pkg/publish/transaction.py", line 101, in add datastream = action.data() File "/export/home/swalker/devel/pkg-1324/proto/root_i386/usr/bin/pkgsend", line 167, in opener return open(args[1], "rb") IOError: [Errno 2] No such file or directory: '/tmp/libc.so.1' ========= It really should fail with a friendlier message.
Bulk move of pkgsend bugs to new category.
The file action just needs to do a bit more robust checking and the pkgsend program needs to catch those related exceptions.
The case in comment 0 now fails this way: pkgsend add file /tmp/libc.so.1 mode=0555 owner=root group=bin pkgsend: No such file: '/tmp/libc.so.1'.
Fixed in changeset 873 / b95d76c53b5eeece7335982e3ccf7047770decc4.