* script failures are treated as warnings. Be
* nice and tell the user _which_ script failed.
*/
- fprintf(stderr,
- "%s: %s(%s-%s.%s) scriptlet failed, exit status %d\n",
- stage==RAZOR_STAGE_SCRIPTS_PRE?"error":"warning",
- action==RAZOR_INSTALL_ACTION_ADD?"%pre":"%preun",
- name,version,arch,r);
if (stage==RAZOR_STAGE_SCRIPTS_PRE)
+ {
+ fprintf(stderr,
+ "error: %s(%s-%s.%s) scriptlet failed, exit status %d\n",
+ action==RAZOR_INSTALL_ACTION_ADD?"%pre":"%preun",
+ name,version,arch,r);
return -1;
+ }
+ else
+ fprintf(stderr,
+ "warning: %s(%s-%s.%s) scriptlet failed, exit status %d\n",
+ action==RAZOR_INSTALL_ACTION_ADD?"%post":"%postun",
+ name,version,arch,r);
}
}
return 0;
}
}
system=razor_root_get_system_set(root);
+ if (!system)
+ {
+ fprintf(stderr,"Internal error: No system set\n");
+ razor_root_close(root);
+ if (relocations)
+ razor_relocations_destroy(relocations);
+ return -1;
+ }
s=plover_strconcat(base,"/repodata",NULL);
if (s)
{
{
int i,retval=0;
char *install_root;
- struct razor_set *system,*set,*upstream;
+ struct razor_set *system,*upstream;
struct razor_transaction *trans;
struct razor_root *root;
struct razor_error *error=NULL;