1.1 --- a/plover/razor.c Fri Mar 23 20:29:24 2012 +0000
1.2 +++ b/plover/razor.c Fri Mar 23 20:29:50 2012 +0000
1.3 @@ -183,13 +183,19 @@
1.4 * script failures are treated as warnings. Be
1.5 * nice and tell the user _which_ script failed.
1.6 */
1.7 - fprintf(stderr,
1.8 - "%s: %s(%s-%s.%s) scriptlet failed, exit status %d\n",
1.9 - stage==RAZOR_STAGE_SCRIPTS_PRE?"error":"warning",
1.10 - action==RAZOR_INSTALL_ACTION_ADD?"%pre":"%preun",
1.11 - name,version,arch,r);
1.12 if (stage==RAZOR_STAGE_SCRIPTS_PRE)
1.13 + {
1.14 + fprintf(stderr,
1.15 + "error: %s(%s-%s.%s) scriptlet failed, exit status %d\n",
1.16 + action==RAZOR_INSTALL_ACTION_ADD?"%pre":"%preun",
1.17 + name,version,arch,r);
1.18 return -1;
1.19 + }
1.20 + else
1.21 + fprintf(stderr,
1.22 + "warning: %s(%s-%s.%s) scriptlet failed, exit status %d\n",
1.23 + action==RAZOR_INSTALL_ACTION_ADD?"%post":"%postun",
1.24 + name,version,arch,r);
1.25 }
1.26 }
1.27 return 0;
1.28 @@ -308,6 +314,14 @@
1.29 }
1.30 }
1.31 system=razor_root_get_system_set(root);
1.32 + if (!system)
1.33 + {
1.34 + fprintf(stderr,"Internal error: No system set\n");
1.35 + razor_root_close(root);
1.36 + if (relocations)
1.37 + razor_relocations_destroy(relocations);
1.38 + return -1;
1.39 + }
1.40 s=plover_strconcat(base,"/repodata",NULL);
1.41 if (s)
1.42 {
1.43 @@ -486,7 +500,7 @@
1.44 {
1.45 int i,retval=0;
1.46 char *install_root;
1.47 - struct razor_set *system,*set,*upstream;
1.48 + struct razor_set *system,*upstream;
1.49 struct razor_transaction *trans;
1.50 struct razor_root *root;
1.51 struct razor_error *error=NULL;