+2008-07-01 Guillem Jover <guillem@debian.org>
+
+ * src/depcon.c (findbreakcyclerecursive): Use the debug function
+ instead of reimplementing its logic.
+ * src/help.c (preexecscript): Likewise.
+
2008-07-01 Egmont Koblinger <egmont@uhulinux.hu>
* src/processarc.c (process_archive): Properly lstat the correct
pkg->color = gray;
if (f_debug & dbg_depcondetail) {
- fprintf(stderr,"D0%05o: findbreakcyclerecursive %s ",dbg_depcondetail,pkg->name);
- for (sol=sofar; sol; sol=sol->back) fprintf(stderr," <- %s",sol->pkg->name);
- fprintf(stderr,"\n");
+ struct varbuf str_pkgs = VARBUF_INIT;
+
+ for (sol = sofar; sol; sol = sol->back) {
+ varbufaddstr(&str_pkgs, " <- ");
+ varbufaddstr(&str_pkgs, sol->pkg->name);
+ }
+ varbufaddc(&str_pkgs, '\0');
+ debug(dbg_depcondetail, "findbreakcyclerecursive %s %s", pkg->name,
+ str_pkgs.buf);
+ varbuffree(&str_pkgs);
}
thislink.pkg= pkg;
thislink.back= sofar;
if (chroot(instdir)) ohshite(_("failed to chroot to `%.250s'"),instdir);
}
if (f_debug & dbg_scripts) {
- fprintf(stderr,"D0%05o: fork/exec %s (",dbg_scripts,path);
- while (*++argv) fprintf(stderr," %s",*argv);
- fputs(" )\n",stderr);
+ struct varbuf args = VARBUF_INIT;
+
+ while (*++argv) {
+ varbufaddc(&args, ' ');
+ varbufaddstr(&args, *argv);
+ }
+ varbufaddc(&args, '\0');
+ debug(dbg_scripts, "fork/exec %s (%s )", path, args.buf);
+ varbuffree(&args);
}
instdirl= strlen(instdir);
if (!instdirl) return path;