Description of problem: Needs a better error handling when uploading files that are not rpm Version-Release number of selected component (if applicable): [root@pulp-candidate ~]# rpm -qa pulp-rpm-server pulp-rpm-server-2.0.1-1.fc17.noarch [root@pulp-candidate ~]# How reproducible: Steps to Reproduce: 1. [root@pulp-candidate ~]# pulp-admin repo uploads rpm --repo-id new-repo --file install.log +----------------------------------------------------------------------+ RPM Upload +----------------------------------------------------------------------+ Extracting necessary metdata for each RPM... [==================================================] 100% Analyzing: install.log An unexpected error has occurred. More information can be found in the client log file ~/.pulp/admin.log. 2. 3. Actual results: Expected results: Additional info: 2012-08-27 10:06:30,781 - ERROR - Client-side exception occurred Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 475, in run exit_code = Cli.run(self, args) File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 891, in run exit_code = command_or_section.execute(self.prompt, remaining_args) File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 184, in execute return self.method(*arg_list, **clean_kwargs) File "/usr/lib/pulp/admin/extensions/rpm_upload/pulp_cli.py", line 115, in create unit_key, metadata = _generate_rpm_data(f) File "/usr/lib/pulp/admin/extensions/rpm_upload/pulp_cli.py", line 173, in _generate_rpm_data headers = ts.hdrFromFdno(fd) File "/usr/lib64/python2.7/site-packages/rpm/transaction.py", line 154, in hdrFromFdno raise rpm.error("error reading package header") error: error reading package header
Added a much more graceful way of telling the user: $ pulp-admin rpm repo uploads rpm --repo-id bz --file /tmp/non-rpm +----------------------------------------------------------------------+ Puppet Module Upload +----------------------------------------------------------------------+ Extracting necessary metdata for each request... [==================================================] 100% Analyzing: non-rpm error: not an rpm package Metadata for /tmp/non-rpm could not be generated. The specific error is as follows: The given file is not a valid RPM
Merge pull request #91 from pulp/jdob-852072 852072 - Added the ability to circumvent the upload workflow in the commit 80f34418c36d52077bf9a731fff7cf745b7cb4cd
build: 0.331
[root@pulp-master ~]# rpm -q pulp-rpm-server pulp-rpm-server-0.0.331-1.fc17.noarch [root@pulp-master ~]# [root@pulp-master ~]# pulp-admin rpm repo uploads rpm --repo-id pulp --file install.log +----------------------------------------------------------------------+ Puppet Module Upload +----------------------------------------------------------------------+ Extracting necessary metdata for each request... [==================================================] 100% Analyzing: install.log Metadata for install.log could not be generated. The specific error is as follows: The given file is not a valid RPM [root@pulp-master ~]#
Pulp v2.0 released