$ pulp-admin --username=admin --password=admin package upload <rpm> * Starting Package Upload operation. See /var/log/pulp/client.log for more verbose output * Performing Package Uploads to Pulp server * Content Upload complete. $ echo $? 0 /var/log/pulp/client.log contains: 2011-02-22 16:28:32,613 [ERROR][MainThread] @ package.py:284 - Package [<rpm>] is not signed. Please use --nosig. Skipping 2011-02-22 16:28:32,613 [ERROR][MainThread] @ base.py:239 - error: 0 The --nosig message should be printed to stderr as well and exit code should be non-zero. BTW, when fixing this, please make sure this message is printed before *sha256sum* is computed and package upload is skipped; it would save some CPU power.
The error messages are printed if you use -v or verbose option. This is on purpose. Regarding the error codes, I'll look into it.
$ sudo pulp-admin package upload /home/pkilambi/Downloads/skytux-repo-1.0-4.noarch.rpm -v * Starting Package Upload * Performing Package Uploads to Pulp server Package [/home/pkilambi/Downloads/skytux-repo-1.0-4.noarch.rpm] is not signed. Please use --nosig. Skipping * Content Upload complete. [pkilambi@localhost unit]$ echo $? 65
Thanks for a quick fix! I'm still thinking about another improvement: Couldn't you replace "Content Upload complete." with "Content Upload succeeded." and "Content Upload failed." according to the exit code?
So, the reason I chose "complete" is because we're doing a batch uploads here and some could have succeed and some failed and skipped. So "complete" felt more appropriate. As the process itself is complete with succeed and failed as shown as verbose output.
Build: 0.141
verified [root@preethi ~]# rpm -q pulp pulp-0.0.143-1.fc14.noarch [root@preethi ~]# pulp-admin content upload --dir=/root/upload/ -r upload -v * Starting Package Upload * Performing Package Uploads to Pulp server Package [/root/upload/grinder-0.0.81-1.fc14.noarch.rpm] is not signed. Please use --nosig. Skipping Package [/root/upload/pulp-cds-0.0.143-1.fc14.noarch.rpm] is not signed. Please use --nosig. Skipping No applicable content to associate. [root@preethi ~]# pulp-admin content upload --dir=/root/upload/ -r upload -v --nosig * Starting Package Upload * Performing Package Uploads to Pulp server Successfully uploaded [grinder-0.0.81-1.fc14.noarch.rpm] to server Successfully uploaded [pulp-cds-0.0.143-1.fc14.noarch.rpm] to server * Performing Repo Associations Package association Complete for Repo [upload]: Packages: pulp-cds-0.0.143-1.fc14.noarch.rpm grinder-0.0.81-1.fc14.noarch.rpm Files: None * Content Upload complete.
Closing with Community Release 15 pulp-0.0.223-4.