+Mon Oct 25 19:10:50 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
+
+ * Mark more strings for translation in libdpkg and dpkg
+ * Don't bother translating debug-statements
+
Mon Oct 25 11:55:35 EDT 1999 Ben Collins <bcollins.debian.org>
* scripts/dpkg-shlibdeps: start using objdump as opposed to ldd, this
// RFSH(whatinfowin); /* fixme-ncurses: why does ncurses need this ? */
clearok(curscr,TRUE);
redrawall();
- if (debug) fprintf(debug,_("baselist[%p]::kd_redraw() done\n"),this);
+ if (debug) fprintf(debug,"baselist[%p]::kd_redraw() done\n",this);
}
void baselist::kd_searchagain() {
}
void baselist::startdisplay() {
- if (debug) fprintf(debug,_("baselist[%p]::startdisplay()\n"),this);
+ if (debug) fprintf(debug,"baselist[%p]::startdisplay()\n",this);
cbreak(); noecho(); nonl(); keypad(stdscr,TRUE);
clear(); wnoutrefresh(stdscr);
baselist::baselist(keybindings *kb) {
if (debug)
- fprintf(debug,_("baselist[%p]::baselist()\n"),this);
+ fprintf(debug,"baselist[%p]::baselist()\n",this);
bindings= kb;
nitems= 0;
void baselist::dosearch() {
int offset, index, searchlen;
searchlen= strlen(searchstring);
- if (debug) fprintf(debug,_("packagelist[%p]::dosearch(); searchstring=`%s' len=%d\n"),
+ if (debug) fprintf(debug,"packagelist[%p]::dosearch(); searchstring=`%s' len=%d\n",
this,searchstring,searchlen);
for (offset=1, index=greaterint(topofscreen,cursorline+1);
offset<nitems;
void baselist::wordwrapinfo(int offset, const char *m) {
int usemax= xmax-5;
- if (debug) fprintf(debug,_("baselist[%p]::wordwrapinfo(%d, `%s')\n"),this,offset,m);
+ if (debug) fprintf(debug,"baselist[%p]::wordwrapinfo(%d, `%s')\n",this,offset,m);
int wrapping=0;
for (;;) {
int offleft=offset; while (*m == ' ' && offleft>0) { m++; offleft--; }
if (!p) break;
m= ++p;
}
- if (debug) fprintf(debug,_("baselist[%p]::wordwrapinfo() done\n"),this);
+ if (debug) fprintf(debug,"baselist[%p]::wordwrapinfo() done\n",this);
}
baselist::~baselist() { }
void methodlist::kd_abort() { }
void methodlist::kd_quit() {
- if (debug) fprintf(debug,_("methodlist[%p]::kd_quit() setting coption=%p\n"),
+ if (debug) fprintf(debug,"methodlist[%p]::kd_quit() setting coption=%p\n",
this, table[cursorline]);
coption= table[cursorline];
}
void methodlist::setwidths() {
- if (debug) fprintf(debug,_("methodlist[%p]::setwidths()\n"),this);
+ if (debug) fprintf(debug,"methodlist[%p]::setwidths()\n",this);
status_width= 1;
gap_width= 1;
int newcursor= -1;
if (debug)
- fprintf(debug,_("methodlist[%p]::methodlist()\n"),this);
+ fprintf(debug,"methodlist[%p]::methodlist()\n",this);
table= new struct option*[noptions];
setcursor(newcursor);
if (debug)
- fprintf(debug,_("methodlist[%p]::methodlist done; noptions=%d\n"), this, noptions);
+ fprintf(debug,"methodlist[%p]::methodlist done; noptions=%d\n", this, noptions);
}
methodlist::~methodlist() {
- if (debug) fprintf(debug,_("methodlist[%p]::~methodlist()\n"),this);
+ if (debug) fprintf(debug,"methodlist[%p]::~methodlist()\n",this);
delete[] table;
}
int response;
const keybindings::interpretation *interp;
- if (debug) fprintf(debug,_("methodlist[%p]::display()\n"),this);
+ if (debug) fprintf(debug,"methodlist[%p]::display()\n",this);
setupsigwinch();
startdisplay();
- if (debug) fprintf(debug,_("methodlist[%p]::display() entering loop\n"),this);
+ if (debug) fprintf(debug,"methodlist[%p]::display() entering loop\n",this);
for (;;) {
if (whatinfo_height) wcursyncup(whatinfowin);
if (doupdate() == ERR) ohshite(_("doupdate failed"));
if (response == ERR) ohshite(_("getch failed"));
interp= (*bindings)(response);
if (debug)
- fprintf(debug,_("methodlist[%p]::display() response=%d interp=%s\n"),
+ fprintf(debug,"methodlist[%p]::display() response=%d interp=%s\n",
this,response, interp ? interp->action : _("[none]"));
if (!interp) { beep(); continue; }
(this->*(interp->mfn))();
pop_cleanup(ehflag_normaltidy); // unset the SIGWINCH handler
enddisplay();
- if (debug) fprintf(debug,_("methodlist[%p]::display() done\n"),this);
+ if (debug) fprintf(debug,"methodlist[%p]::display() done\n",this);
return interp->qa;
}
whatinfovb.reset();
werase(infopad); wmove(infopad,0,0);
- if (debug) fprintf(debug,_("methodlist[%p]::redrawinfo()\n"), this);
+ if (debug) fprintf(debug,"methodlist[%p]::redrawinfo()\n", this);
itd_description();
ohshite(_("unable to read `%.250s' directory for reading methods"),pathbuf);
}
- if (debug) fprintf(debug,_("readmethods(`%s',...) directory open\n"), pathbase);
+ if (debug) fprintf(debug,"readmethods(`%s',...) directory open\n", pathbase);
while ((dent= readdir(dir)) != 0) {
c= dent->d_name[0];
- if (debug) fprintf(debug,_("readmethods(`%s',...) considering `%s' ...\n"),
+ if (debug) fprintf(debug,"readmethods(`%s',...) considering `%s' ...\n",
pathbase,dent->d_name);
if (c != '_' && !isalpha(c)) continue;
for (p= dent->d_name+1; (c= *p) != 0 && isalnum(c) && c != '_'; p++);
if (access(pathbuf,R_OK|X_OK))
ohshite(_("unable to access method script `%.250s'"),pathbuf);
}
- if (debug) fprintf(debug,_(" readmethods(`%s',...) scripts ok\n"), pathbase);
+ if (debug) fprintf(debug," readmethods(`%s',...) scripts ok\n", pathbase);
strcpy(pathinmeth,METHODOPTIONSFILE);
names= fopen(pathbuf,"r");
meth->back= 0;
if (methods) methods->back= meth;
methods= meth;
- if (debug) fprintf(debug,_(" readmethods(`%s',...) new method"
- " name=`%s' path=`%s' pathinmeth=`%s'\n"),
+ if (debug) fprintf(debug," readmethods(`%s',...) new method"
+ " name=`%s' path=`%s' pathinmeth=`%s'\n",
pathbase, meth->name, meth->path, meth->pathinmeth);
while ((c= fgetc(names)) != EOF) {
}
strcpy(pathinmeth,METHODOPTIONSFILE);
- if (debug) fprintf(debug,_(" readmethods(`%s',...) new option"
+ if (debug) fprintf(debug," readmethods(`%s',...) new option"
" index=`%s' name=`%s' summary=`%.20s'"
" strlen(description=%s)=%ld"
- " method name=`%s' path=`%s' pathinmeth=`%s'\n"),
+ " method name=`%s' path=`%s' pathinmeth=`%s'\n",
pathbase,
opt->index, opt->name, opt->summary,
opt->description ? "`...'" : "null",
fclose(names);
}
closedir(dir);
- if (debug) fprintf(debug,_("readmethods(`%s',...) done\n"), pathbase);
+ if (debug) fprintf(debug,"readmethods(`%s',...) done\n", pathbase);
delete[] pathbuf;
}
if (errno == ENOENT) return;
ohshite(_("unable to open current option file `%.250s'"),methoptfile);
}
- if (debug) fprintf(debug,_("getcurrentopt() cmethopt open\n"));
+ if (debug) fprintf(debug,"getcurrentopt() cmethopt open\n");
if (!fgets(methoptbuf,sizeof(methoptbuf),cmo)) { fclose(cmo); return; }
if (fgetc(cmo) != EOF) { fclose(cmo); return; }
if (!feof(cmo)) { fclose(cmo); return; }
- if (debug) fprintf(debug,_("getcurrentopt() cmethopt eof\n"));
+ if (debug) fprintf(debug,"getcurrentopt() cmethopt eof\n");
fclose(cmo);
- if (debug) fprintf(debug,_("getcurrentopt() cmethopt read\n"));
+ if (debug) fprintf(debug,"getcurrentopt() cmethopt read\n");
l= strlen(methoptbuf); if (!l || methoptbuf[l-1] != '\n') return;
methoptbuf[--l]= 0;
- if (debug) fprintf(debug,_("getcurrentopt() cmethopt len and newline\n"));
+ if (debug) fprintf(debug,"getcurrentopt() cmethopt len and newline\n");
p= strchr(methoptbuf,' '); if (!p) return;
- if (debug) fprintf(debug,_("getcurrentopt() cmethopt space\n"));
+ if (debug) fprintf(debug,"getcurrentopt() cmethopt space\n");
*p++= 0;
- if (debug) fprintf(debug,_("getcurrentopt() cmethopt meth name `%s'\n"), methoptbuf);
+ if (debug) fprintf(debug,"getcurrentopt() cmethopt meth name `%s'\n", methoptbuf);
for (meth= methods; meth && strcmp(methoptbuf,meth->name); meth= meth->next);
if (!meth) return;
- if (debug) fprintf(debug,_("getcurrentopt() cmethopt meth found; opt `%s'\n"),p);
+ if (debug) fprintf(debug,"getcurrentopt() cmethopt meth found; opt `%s'\n",p);
for (opt= options; opt && (opt->meth != meth || strcmp(p,opt->name)); opt= opt->next);
if (!opt) return;
- if (debug) fprintf(debug,_("getcurrentopt() cmethopt opt found\n"));
+ if (debug) fprintf(debug,"getcurrentopt() cmethopt opt found\n");
coption= opt;
}
int would_like_to_install(pkginfo::pkgwant wantvalue, pkginfo *pkg) {
/* Returns: 1 for yes, 0 for no, -1 for if they want to preserve an error condition. */
- if (debug) fprintf(debug,_("would_like_to_install(%d, %s) status %d\n"),
+ if (debug) fprintf(debug,"would_like_to_install(%d, %s) status %d\n",
wantvalue,pkg->name,pkg->status);
if (wantvalue == pkginfo::want_install) return 1;
pkginfoperfile *r;
r= useavailable(pkg) ? &pkg->available : &pkg->installed;
if (debug)
- fprintf(debug,_("packagelist[%p]::findinfo(%s) useavailable=%d\n"),this,pkg->name,useavailable(pkg));
+ fprintf(debug,"packagelist[%p]::findinfo(%s) useavailable=%d\n",this,pkg->name,useavailable(pkg));
if (!r->valid) blankpackageperfile(r);
return r;
}
// Return 2 if we made a change due to a Recommended, Depends or Conficts,
// or 1 if we offered or made a change because of an Optional line.
if (debug)
- fprintf(debug,_("packagelist[%p]::resolvesuggest()\n"),this);
+ fprintf(debug,"packagelist[%p]::resolvesuggest()\n",this);
int changemade, maxchangemade;
maxchangemade= 0;
for (;;) {
for (index=0; index<nitems; index++) {
if (!table[index]->pkg->name) continue;
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::resolvesuggest() loop[%i] %s / %d\n"),
+ fprintf(debug,"packagelist[%p]::resolvesuggest() loop[%i] %s / %d\n",
this, index, table[index]->pkg->name, changemade);
dependency *depends;
for (depends= findinfo(table[index]->pkg)->depends;
changemade= checkdependers(depends->list->ed,changemade);
}
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::resolvesuggest() loop[%i] %s / -> %d\n"),
+ fprintf(debug,"packagelist[%p]::resolvesuggest() loop[%i] %s / -> %d\n",
this, index, table[index]->pkg->name, changemade);
}
if (!changemade) break;
maxchangemade= greaterint(maxchangemade, changemade);
}
if (debug)
- fprintf(debug,_("packagelist[%p]::resolvesuggest() done; maxchangemade=%d\n"),
+ fprintf(debug,"packagelist[%p]::resolvesuggest() done; maxchangemade=%d\n",
this,maxchangemade);
return maxchangemade;
}
if (!trythis->clientdata) return 0;
if (depdebug && debug)
- fprintf(debug,_("update_best_to_change(best=%s{%d}, test=%s{%d});\n"),
+ fprintf(debug,"update_best_to_change(best=%s{%d}, test=%s{%d});\n",
best ? best->pkg->name : "", best ? (int)best->spriority : -1,
trythis->name, trythis->clientdata->spriority);
return 0;
yes:
- if (depdebug && debug) fprintf(debug,_("update_best_to_change(); yes\n"));
+ if (depdebug && debug) fprintf(debug,"update_best_to_change(); yes\n");
best=trythis->clientdata; return 0;
}
ed= ped->clientdata;
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::deselect_one_of(): er %s{%d} ed %s{%d} [%p]\n"),
+ fprintf(debug,"packagelist[%p]::deselect_one_of(): er %s{%d} ed %s{%d} [%p]\n",
this, er->pkg->name, er->spriority, ed->pkg->name, ed->spriority, display);
perpackagestate *best;
else best= ed; // ... failing that, the second
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::deselect_one_of(): best %s{%d}\n"),
+ fprintf(debug,"packagelist[%p]::deselect_one_of(): best %s{%d}\n",
this, best->pkg->name, best->spriority);
if (best->spriority >= sp_deselecting) return 0;
int r, foundany;
if (depdebug && debug) {
- fprintf(debug,_("packagelist[%p]::resolvedepcon([%p] %s --%s-->"),
+ fprintf(debug,"packagelist[%p]::resolvedepcon([%p] %s --%s-->",
this,depends,depends->up->name,gettext(relatestrings[depends->type]));
for (possi=depends->list; possi; possi=possi->next)
fprintf(debug," %s",possi->ed->name);
possi && !deppossatisfied(possi,&fixbyupgrade);
possi= possi->next);
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): depends found %s\n"),
+ fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): depends found %s\n",
this,depends,
possi ? possi->ed->name : _("[none]"));
if (possi) return 0;
if (depends->type == dep_suggests) return r;
if (fixbyupgrade) {
- if (depdebug && debug) fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): "
- "fixbyupgrade %s\n"), this,depends,fixbyupgrade->pkg->name);
+ if (depdebug && debug) fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): "
+ "fixbyupgrade %s\n", this,depends,fixbyupgrade->pkg->name);
best= fixbyupgrade;
} else {
best= 0;
if (!foundany) addunavailable(possi);
}
if (!best) {
- if (depdebug && debug) fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): "
- "mustdeselect nobest\n"), this,depends);
+ if (depdebug && debug) fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): "
+ "mustdeselect nobest\n", this,depends);
return r;
}
}
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): select best=%s{%d}\n"),
+ fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): select best=%s{%d}\n",
this,depends, best->pkg->name, best->spriority);
if (best->spriority >= sp_selecting) return r;
best->selected= best->suggested= pkginfo::want_install;
mustdeselect:
best= depends->up->clientdata;
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): mustdeselect best=%s{%d}\n"),
+ fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): mustdeselect best=%s{%d}\n",
this,depends, best->pkg->name, best->spriority);
if (best->spriority >= sp_deselecting) return r;
case dep_conflicts:
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): conflict\n"),
+ fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict\n",
this,depends);
if (would_like_to_install(depends->up->clientdata->selected,depends->up) == 0)
return 0;
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): conflict installing 1\n"),
+ fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict installing 1\n",
this,depends);
if (!deppossatisfied(depends->list,0)) return 0;
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): conflict satisfied - ouch\n"),
+ fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict satisfied - ouch\n",
this,depends);
if (depends->up != depends->list->ed) {
r= deselect_one_of(depends->up, provider->up->up, depends); if (r) return r;
}
if (depdebug && debug)
- fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): no desel\n"), this,depends);
+ fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): no desel\n", this,depends);
return 0;
default:
}
void packagelist::setwidths() {
- if (debug) fprintf(debug,_("packagelist[%p]::setwidths()\n"),this);
+ if (debug) fprintf(debug,"packagelist[%p]::setwidths()\n",this);
if (verbose) {
status_hold_width= 9;
if (table[cursorline]->pkg->name) {
whatinfovb(_("interrelationships affecting "));
whatinfovb(table[cursorline]->pkg->name);
- if (debug) fprintf(debug,_("packagelist[%p]::idt_relations(); `%s'\n"),
+ if (debug) fprintf(debug,"packagelist[%p]::idt_relations(); `%s'\n",
this,table[cursorline]->relations.string());
waddstr(infopad,table[cursorline]->relations.string());
} else {
varbufrecord(&vb,table[cursorline]->pkg,&table[cursorline]->pkg->installed);
vb.terminate();
if (debug)
- fprintf(debug,_("packagelist[%p]::idt_statuscontrol(); `%s'\n"),this,vb.string());
+ fprintf(debug,"packagelist[%p]::idt_statuscontrol(); `%s'\n",this,vb.string());
waddstr(infopad,vb.string());
}
}
varbufrecord(&vb,table[cursorline]->pkg,&table[cursorline]->pkg->available);
vb.terminate();
if (debug)
- fprintf(debug,_("packagelist[%p]::idt_availablecontrol(); `%s'\n"),this,vb.string());
+ fprintf(debug,"packagelist[%p]::idt_availablecontrol(); `%s'\n",this,vb.string());
waddstr(infopad,vb.string());
}
}
werase(infopad); wmove(infopad,0,0);
if (debug)
- fprintf(debug,_("packagelist[%p]::redrawinfo(); #=%d\n"), this,
+ fprintf(debug,"packagelist[%p]::redrawinfo(); #=%d\n", this,
(int)(currentinfo - baseinfo));
(this->*currentinfo->display)();
table= newtable;
}
- if (debug) fprintf(debug,_("packagelist[%p]::addheading(%d,%d,%d,%s,%s)\n"),
+ if (debug) fprintf(debug,"packagelist[%p]::addheading(%d,%d,%d,%s,%s)\n",
this,ssavail,ssstate,priority,
otherpriority ? otherpriority : _("<null>"),
section ? section : _("<null>"));
void packagelist::sortinplace() {
sortpackagelist= this;
- if (debug) fprintf(debug,_("packagelist[%p]::sortinplace()\n"),this);
+ if (debug) fprintf(debug,"packagelist[%p]::sortinplace()\n",this);
qsort(table,nitems,sizeof(struct pkginfoperfile*),qsort_compareentries);
}
struct pkginfo *pkg;
int index;
- if (debug) fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() "
- "sortorder=%d nitems=%d\n"),this,statsortorder,nitems);
+ if (debug) fprintf(debug,"packagelist[%p]::ensurestatsortinfos() "
+ "sortorder=%d nitems=%d\n",this,statsortorder,nitems);
switch (statsortorder) {
case sso_unsorted:
- if (debug) fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() unsorted\n"),this);
+ if (debug) fprintf(debug,"packagelist[%p]::ensurestatsortinfos() unsorted\n",this);
return;
case sso_avail:
- if (debug) fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() calcssadone=%d\n"),
+ if (debug) fprintf(debug,"packagelist[%p]::ensurestatsortinfos() calcssadone=%d\n",
this,calcssadone);
if (calcssadone) return;
for (index=0; index < nitems; index++) {
if (debug)
- fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() i=%d pkg=%s\n"),
+ fprintf(debug,"packagelist[%p]::ensurestatsortinfos() i=%d pkg=%s\n",
this,index,table[index]->pkg->name);
pkg= table[index]->pkg;
if (!pkg->installed.valid) blankpackageperfile(&pkg->installed);
internerr(_("unknown stat in ensurestatsortinfo sso_avail"));
}
if (debug)
- fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() i=%d ssavail=%d\n"),
+ fprintf(debug,"packagelist[%p]::ensurestatsortinfos() i=%d ssavail=%d\n",
this,index,table[index]->ssavail);
}
calcssadone= 1;
break;
case sso_state:
- if (debug) fprintf(debug,_(_("packagelist[%p]::ensurestatsortinfos() calcsssdone=%d\n")),
+ if (debug) fprintf(debug,"packagelist[%p]::ensurestatsortinfos() calcsssdone=%d\n",
this,calcsssdone);
if (calcsssdone) return;
for (index=0; index < nitems; index++) {
if (debug)
- fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() i=%d pkg=%s\n"),
+ fprintf(debug,"packagelist[%p]::ensurestatsortinfos() i=%d pkg=%s\n",
this,index,table[index]->pkg->name);
switch (table[index]->pkg->status) {
case pkginfo::stat_unpacked:
internerr(_("unknown stat in ensurestatsortinfo sso_state"));
}
if (debug)
- fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() i=%d ssstate=%d\n"),
+ fprintf(debug,"packagelist[%p]::ensurestatsortinfos() i=%d ssstate=%d\n",
this,index,table[index]->ssstate);
}
#include "bindings.h"
void packagelist::add(pkginfo *pkg) {
- if (debug) fprintf(debug,_("packagelist[%p]::add(pkginfo %s)\n"),this,pkg->name);
+ if (debug) fprintf(debug,"packagelist[%p]::add(pkginfo %s)\n",this,pkg->name);
if (!recursive || // never add things to top level
!pkg->clientdata || // don't add pure virtual packages
pkg->clientdata->uprec) // don't add ones already in the recursive list
return;
- if (debug) fprintf(debug,_("packagelist[%p]::add(pkginfo %s) adding\n"),this,pkg->name);
+ if (debug) fprintf(debug,"packagelist[%p]::add(pkginfo %s) adding\n",this,pkg->name);
perpackagestate *state= &datatable[nitems];
state->pkg= pkg;
state->direct= state->original= pkg->clientdata->selected;
}
void packagelist::add(pkginfo *pkg, pkginfo::pkgwant nw) {
- if (debug) fprintf(debug,_("packagelist[%p]::add(pkginfo %s, %s)\n"),
+ if (debug) fprintf(debug,"packagelist[%p]::add(pkginfo %s, %s)\n",
this,pkg->name,gettext(wantstrings[nw]));
add(pkg); if (!pkg->clientdata) return;
pkg->clientdata->direct= nw;
selpriority np;
np= would_like_to_install(nw,pkg) ? sp_selecting : sp_deselecting;
if (pkg->clientdata->spriority > np) return;
- if (debug) fprintf(debug,_("packagelist[%p]::add(pkginfo %s, %s) setting\n"),
+ if (debug) fprintf(debug,"packagelist[%p]::add(pkginfo %s, %s) setting\n",
this,pkg->name,gettext(wantstrings[nw]));
pkg->clientdata->suggested= pkg->clientdata->selected= nw;
pkg->clientdata->spriority= np;
void packagelist::add(pkginfo *pkg, const char *extrainfo, showpriority showimp) {
if (debug)
- fprintf(debug,_("packagelist[%p]::add(pkginfo %s, \"...\", showpriority %d)\n"),
+ fprintf(debug,"packagelist[%p]::add(pkginfo %s, \"...\", showpriority %d)\n",
this,pkg->name,showimp);
add(pkg); if (!pkg->clientdata) return;
if (pkg->clientdata->dpriority < showimp) pkg->clientdata->dpriority= showimp;
for (search= *done; search && search->dep != check; search=search->next);
if (search) return 1;
- if (debug) fprintf(debug,_("packagelist[%p]::alreadydone(%p,%p) new\n"),
+ if (debug) fprintf(debug,"packagelist[%p]::alreadydone(%p,%p) new\n",
this,done,check);
search= new doneent;
search->next= *done;
}
void packagelist::addunavailable(deppossi *possi) {
- if (debug) fprintf(debug,_("packagelist[%p]::addunavail(%p)\n"),this,possi);
+ if (debug) fprintf(debug,"packagelist[%p]::addunavail(%p)\n",this,possi);
if (!recursive) return;
if (alreadydone(&unavdone,possi)) return;
}
int packagelist::add(dependency *depends, showpriority displayimportance) {
- if (debug) fprintf(debug,_("packagelist[%p]::add(dependency[%p])\n"),this,depends);
+ if (debug) fprintf(debug,"packagelist[%p]::add(dependency[%p])\n",this,depends);
if (alreadydone(&depsdone,depends)) return 0;
pkginfo **newl;
keybindings *kb;
- if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p])\n"),sub);
+ if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p])\n",sub);
if (sub->resolvesuggest() != 0 && sub->deletelessimp_anyleft(initial)) {
- if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p]) once\n"),sub);
+ if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p]) once\n",sub);
if (unredisplay) unredisplay->enddisplay();
for (;;) {
newl= sub->display();
if (!newl) break;
- if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p]) newl\n"),sub);
+ if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p]) newl\n",sub);
kb= sub->bindings; delete sub;
sub= new packagelist(kb,newl);
if (sub->resolvesuggest() <= 1) break;
if (!sub->deletelessimp_anyleft(dp_must)) break;
- if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p]) again\n"),sub);
+ if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p]) again\n",sub);
}
if (unredisplay) unredisplay->startdisplay();
}
delete sub;
- if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p]) done\n"),sub);
+ if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p]) done\n",sub);
}
int packagelist::deletelessimp_anyleft(showpriority than) {
if (debug)
- fprintf(debug,_("packagelist[%p]::dli_al(%d): nitems=%d\n"),this,than,nitems);
+ fprintf(debug,"packagelist[%p]::dli_al(%d): nitems=%d\n",this,than,nitems);
int insat, runthr;
for (runthr=0, insat=0;
runthr < nitems;
}
}
nitems= insat;
- if (debug) fprintf(debug,_("packagelist[%p]::dli_al(%d) done; nitems=%d\n"),
+ if (debug) fprintf(debug,"packagelist[%p]::dli_al(%d) done; nitems=%d\n",
this,than,nitems);
return nitems;
}
freq[c]++;
}
for (i=npackages; i>0 && freq[i]==0; i--);
- while (i>=0) { fprintf(file,"size %7d occurs %5d times\n",i,freq[i]); i--; }
+ while (i>=0) { fprintf(file,_("size %7d occurs %5d times\n"),i,freq[i]); i--; }
if (ferror(file)) ohshite(_("failed write during hashreport"));
}
case msdbrw_readonly:
cstatus= msdbrw_readonly; break;
default:
- internerr("unknown readwritereq");
+ internerr(_("unknown readwritereq"));
}
updatefnbuf= m_malloc(strlen(adir)+sizeof(UPDATESDIR)+IMPORTANTMAXLEN+5);
va_end(al);
cep->next= econtext->cleanups;
econtext->cleanups= cep;
- if (cep == &emergency.ce) { e= errno; ohshite("out of memory for new cleanup entry"); }
+ if (cep == &emergency.ce) { e= errno; ohshite(_("out of memory for new cleanup entry")); }
onerr_abort--;
}
int c, l;
ep= startp;
- if (!*ep) parseerr(0,filename,lno, warnto,warncount,pigp,0, "%s is missing",what);
+ if (!*ep) parseerr(0,filename,lno, warnto,warncount,pigp,0, _("%s is missing"),what);
while ((c= *ep) && !isspace(c)) ep++;
l= (int)(ep-startp);
while (nvip->name && (strncasecmp(nvip->name,startp,l) || nvip->name[l])) nvip++;
const char *filename, int lno, FILE *warnto, int *warncount,
const char *value, const struct fieldinfo *fip) {
pifp->essential=
- *value ? convert_string(filename,lno,"yes/no in `essential' field", -1,
+ *value ? convert_string(filename,lno,_("yes/no in `essential' field"), -1,
warnto,warncount,pigp,
value,booleaninfos,0)
: 0;
pigp->want= want_hold;
pigp->eflag &= ~eflagf_obsoletehold;
}
- pigp->status= convert_string(filename,lno,"third (status) word in `status' field", -1,
+ pigp->status= convert_string(filename,lno,_("third (status) word in `status' field"), -1,
warnto,warncount,pigp, ep,statusinfos,0);
}
varbufprintf(vb,"%lu:",version->epoch);
break;
default:
- internerr("bad versiondisplayepochwhen in varbufversion");
+ internerr(_("bad versiondisplayepochwhen in varbufversion"));
}
if (version->version) varbufaddstr(vb,version->version);
if (version->revision && *version->revision) {
struct varbuf *vb;
- if (!informativeversion(version)) return "<none>";
+ if (!informativeversion(version)) return _("<none>");
vb= &bufs[bufnum]; bufnum++; if (bufnum == 10) bufnum= 0;
varbufreset(vb);
case dvr_earlierstrict: return r < 0;
case dvr_laterstrict: return r > 0;
case dvr_exact: return r == 0;
- default: internerr("unknown verrel");
+ default: internerr(_("unknown verrel"));
}
}
if (!thirdpkg->clientdata->fileslistvalid) {
debug(dbg_eachfiledetail,
- "process_archive ... already disappeared !");
+ _("process_archive ... already disappeared !"));
continue;
}
/* We've found a package that can take this file. */
nifd->namenode->flags |= fnnf_new_inarchive;
debug(dbg_eachfile,
- "tarobject ti->Name=`%s' Mode=%lo owner=%u.%u Type=%d(%c)"
- " ti->LinkName=`%s' namenode=`%s' flags=%o instead=`%s'",
+ _("tarobject ti->Name=`%s' Mode=%lo owner=%u.%u Type=%d(%c)"
+ " ti->LinkName=`%s' namenode=`%s' flags=%o instead=`%s'"),
ti->Name, (long)ti->Mode, (unsigned)ti->UserID, (unsigned)ti->GroupID, ti->Type,
ti->Type == '\0' ? '_' :
ti->Type >= '0' && ti->Type <= '6' ? "-hlcbdp"[ti->Type - '0'] : '?',
"diverted version of `%.250s'%.10s%.100s%.10s"),
nifd->namenode->name,
nifd->namenode->divert->camefrom->name,
- divpkg ? " (package: " : "",
+ divpkg ? _(" (package: ") : "",
divpkg ? divpkg->name : "",
divpkg ? ")" : "");
}
/* Perhaps we're removing a conflicting package ? */
if (otherpkg->clientdata->istobe == itb_remove) continue;
if (does_replace(tc->pkg,&tc->pkg->available,otherpkg)) {
- printf("Replacing files in old package %s ...\n",otherpkg->name);
+ printf(_("Replacing files in old package %s ...\n"),otherpkg->name);
otherpkg->clientdata->replacingfilesandsaid= 1;
} else {
if (S_ISDIR(stab.st_mode)) {
if (pkg->want != want_install) {
if (f_alsoselect) {
if (saywhy) {
- printf("Selecting previously deselected package %s.\n",pkg->name);
+ printf(_("Selecting previously deselected package %s.\n"),pkg->name);
pkg->want= want_install;
}
return 1;
} else {
- if (saywhy) printf("Skipping deselected package %s.\n",pkg->name);
+ if (saywhy) printf(_("Skipping deselected package %s.\n"),pkg->name);
return 0;
}
}
} else if (r == 0) {
if (f_skipsame && /* same version fully installed ? */
pkg->status == stat_installed && !(pkg->eflag &= eflagf_reinstreq)) {
- if (saywhy) fprintf(stderr, "Version %.250s of %.250s already installed, "
- "skipping.\n",
+ if (saywhy) fprintf(stderr, _("Version %.250s of %.250s already installed, "
+ "skipping.\n"),
versiondescribe(&pkg->installed.version,vdew_never),
pkg->name);
return 0;
needepochs= epochsdiffer(&pkg->available.version,&pkg->installed.version) ?
vdew_always : vdew_never;
if (fc_downgrade) {
- if (saywhy) fprintf(stderr, DPKG " - warning: downgrading %.250s "
- "from %.250s to %.250s.\n", pkg->name,
+ if (saywhy) fprintf(stderr, _("%s - warning: downgrading %.250s "
+ "from %.250s to %.250s.\n"), DPK, pkg->name,
versiondescribe(&pkg->installed.version,needepochs),
versiondescribe(&pkg->available.version,needepochs));
return 1;
} else {
- if (saywhy) fprintf(stderr, "Will not downgrade %.250s from version %.250s "
- "to %.250s, skipping.\n", pkg->name,
+ if (saywhy) fprintf(stderr, _("Will not downgrade %.250s from version %.250s "
+ "to %.250s, skipping.\n"), pkg->name,
versiondescribe(&pkg->installed.version,needepochs),
versiondescribe(&pkg->available.version,needepochs));
return 0;
switch (cc) {
case 'i': case 'y': what= cfof_install | cfof_backup; break;
case 'n': case 'o': what= cfof_keep | cfof_backup; break;
- default: internerr("unknown response");
+ default: internerr(_("unknown response"));
}
}
break;
default:
- internerr("unknown what");
+ internerr(_("unknown what"));
}
conff->hash= nfstrsave(newdisthash);
case dep_predepends: varbufaddstr(addto, _(" pre-depends on ")); break;
case dep_recommends: varbufaddstr(addto, _(" recommends ")); break;
case dep_conflicts: varbufaddstr(addto, _(" conflicts with ")); break;
- default: internerr("unknown deptype");
+ default: internerr(_("unknown deptype"));
}
varbufdependency(addto, dep);
}
case stat_halfconfigured: case stat_unpacked:
return 1;
default:
- internerr("unknown status depending");
+ internerr(_("unknown status depending"));
}
break;
case itb_installnew: case itb_preinstall:
break;
default:
- internerr("unknown istobe depending");
+ internerr(_("unknown istobe depending"));
}
/* Describe the dependency, in case we have to moan about it. */
}
break;
default:
- internerr("unknown istobe depended");
+ internerr(_("unknown istobe depended"));
}
varbufaddstr(whynot, linebuf);
gettext(statusstrings[provider->up->up->status]));
break;
default:
- internerr("unknown istobe provider");
+ internerr(_("unknown istobe provider"));
}
varbufaddstr(whynot, linebuf);
}
/* If the package wasn't installed at all, and we haven't said
* yet why this isn't satisfied, we should say so now.
*/
- sprintf(linebuf, " %.250s is not installed.\n", possi->ed->name);
+ sprintf(linebuf, _(" %.250s is not installed.\n"), possi->ed->name);
varbufaddstr(whynot, linebuf);
}
}
}
break;
default:
- internerr("unknown istobe conflict");
+ internerr(_("unknown istobe conflict"));
}
}
}
break;
default:
- internerr("unknown istobe conflict provider");
+ internerr(_("unknown istobe conflict provider"));
}
}
}
int l;
pdesc= pkg->installed.valid ? pkg->installed.description : 0;
- if (!pdesc) pdesc= "(no description available)";
+ if (!pdesc) pdesc= _("(no description available)");
p= strchr(pdesc,'\n');
if (!p) p= pdesc+strlen(pdesc);
l= (p - pdesc > maxl) ? maxl : (int)(p - pdesc);
return 0;
case stat_notinstalled: case stat_halfinstalled: case stat_configfiles:
if (thissect)
- *thissect= pkg->section && *pkg->section ? pkg->section : "<unknown>";
+ *thissect= pkg->section && *pkg->section ? pkg->section : _("<unknown>");
return 1;
default:
- internerr("unknown status checking for unpackedness");
+ internerr(_("unknown status checking for unpackedness"));
}
}
} else if (sects <= 12) {
for (se= sectionentries; se; se= se->next) {
sprintf(buf,"%d",se->count);
- printf(" %d in %s: ",se->count,se->name);
+ printf(_(" %d in %s: "),se->count,se->name);
width= 70-strlen(se->name)-strlen(buf);
while (width > 59) { putchar(' '); width--; }
it= iterpkgstart();
break;
default:
- internerr("unknown action");
+ internerr(_("unknown action"));
}
putchar('\n');
const char *reqversion) {
struct pkginfo *pkg;
- if (*argv) badusage("--assert-* does not take any arguments");
+ if (*argv) badusage(_("--assert-* does not take any arguments"));
modstatdb_init(admindir,msdbrw_readonly|msdbrw_noavail);
if (verrev_buf->epoch == ~0UL) {
case stat_unpacked: case stat_halfconfigured: case stat_halfinstalled:
if (versionsatisfied3(&pkg->configversion,verrev_buf,dvr_laterequal))
break;
- printf("Version of dpkg with working epoch support not yet configured.\n"
- " Please use `dpkg --configure dpkg', and then try again.\n");
+ printf(_("Version of dpkg with working epoch support not yet configured.\n"
+ " Please use `dpkg --configure dpkg', and then try again.\n"));
exit(1);
default:
- printf("dpkg not recorded as installed, cannot check for epoch support !\n");
+ printf(_("dpkg not recorded as installed, cannot check for epoch support !\n"));
exit(1);
}
}
switch (cipaction->arg) {
case act_printarch: arch= archp->to; break;
case act_printgnuarch: arch= archp->gnu; break;
- default: internerr("unknown action in printarch");
+ default: internerr(_("unknown action in printarch"));
}
if (!arch) {
*q= 0; arch= p;
void print_error_perpackage(const char *emsg, const char *arg) {
struct error_report *nr;
- fprintf(stderr, DPKG ": error processing %s (--%s):\n %s\n",
- arg, cipaction->olong, emsg);
+ fprintf(stderr, _("%s: error processing %s (--%s):\n %s\n"),
+ DPKG, arg, cipaction->olong, emsg);
nr= malloc(sizeof(struct error_report));
if (!nr) {
perror(_("dpkg: failed to allocate memory for new entry in list of failed packages."));
pkg->name);
return 0;
}
- printf("Package %s is on hold, not touching it. Use --force-hold to override.\n",
+ printf(_("Package %s is on hold, not touching it. Use --force-hold to override.\n"),
pkg->name);
return 1;
}
i->u.low.current= allfiles;
break;
default:
- internerr("iterfilestart no f_largemem");
+ internerr(_("iterfilestart no f_largemem"));
}
return i;
}
i->u.low.current= i->u.low.current->next;
break;
default:
- internerr("iterfilenext no f_largemem");
+ internerr(_("iterfilenext no f_largemem"));
}
return r;
}
}
break;
default:
- internerr("filesdbinit no f_largemem");
+ internerr(_("filesdbinit no f_largemem"));
}
}
case -1:
return findnamenode_low(name);
default:
- internerr("findnamenode no f_largemem");
+ internerr(_("findnamenode no f_largemem"));
}
}
#include "main.h"
const char *const statusstrings[]= {
- N_("not installed"), N_("unpacked but not configured"),
+ N_("not installed"),
+ N_("unpacked but not configured"),
N_("broken due to postinst failure"),
N_("installed"),
N_("broken due to failed removal"),
int instdirl;
if (*instdir) {
- if (chroot(instdir)) ohshite("failed to chroot to `%.250s'",instdir);
+ 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);
ifok,versiondescribe(&pkg->available.version,
vdew_nonambig),
(char*)0);
- sprintf(buf,"old %s script",description);
+ sprintf(buf,_("old %s script"),description);
if (stat(oldscriptpath,&stab)) {
if (errno == ENOENT) {
debug(dbg_scripts,"maintainer_script_alternative nonexistent %s `%s'",
char *endp;
if (*value == 'h') {
- if (fputs(
-DPKG " debugging option, --debug=<octal> or -D<octal>:\n\n\
+ if (printf(
+_("%s debugging option, --debug=<octal> or -D<octal>:\n\n\
number ref. in source description\n\
1 general Generally helpful progress information\n\
2 scripts Invocation and status of maintainer scripts\n\
1000 veryverbose Lots of drivel about eg the dpkg/info directory\n\
2000 stupidlyverbose Insane amounts of drivel\n\n\
Debugging options are be mixed using bitwise-or.\n\
-Note that the meanings and values are subject to change.\n",
- stdout) < 0) werr("stdout");
+Note that the meanings and values are subject to change.\n"),
+ DPKG) < 0) werr("stdout");
exit(0);
}
f_debug= strtoul(value,&endp,8);
- if (*endp) badusage("--debug requires an octal argument");
+ if (*endp) badusage(_("--debug requires an octal argument"));
}
static void setroot(const struct cmdinfo *cip, const char *value) {
v= strtoul(value,&ep,0);
if (*ep || v > INT_MAX)
- badusage("invalid integer for --%s: `%.250s'",cip->olong,value);
+ badusage(_("invalid integer for --%s: `%.250s'"),cip->olong,value);
*cip->iassignto= v;
}
const struct forceinfo *fip;
if (!strcmp(value,"help")) {
- if (fputs(_("dpkg forcing options - control behaviour when problems found:\n\
+ if (printf(_("%s forcing options - control behaviour when problems found:\n\
warn but continue: --force-<thing>,<thing>,...\n\
stop with error: --refuse-<thing>,<thing>,... | --no-force-<thing>,...\n\
Forcing things:\n\
\n\
WARNING - use of options marked [!] can seriously damage your installation.\n\
Forcing options marked [*] are enabled by default.\n"),
- stdout) < 0) werr("stdout");
+ DPKG) < 0) werr("stdout");
exit(0);
}
continue;
break;
default:
- internerr("unknown action for pending");
+ internerr(_("unknown action for pending"));
}
add_to_queue(pkg);
}
switch (cipaction->arg) {
case act_configure: case act_install: istobe= itb_installnew; break;
case act_remove: case act_purge: istobe= itb_remove; break;
- default: internerr("unknown action for queue start");
+ default: internerr(_("unknown action for queue start"));
}
for (rundown= queuehead; rundown; rundown= rundown->next) {
ensure_package_clientdata(rundown->pkg);
rundown->pkg->name);
break;
default:
- internerr("unknown action in duplicate");
+ internerr(_("unknown action in duplicate"));
}
rundown->pkg= 0;
} else {
deferred_remove(pkg);
break;
default:
- internerr("unknown action in queue");
+ internerr(_("unknown action in queue"));
}
if (ferror(stdout)) werr("stdout");
if (ferror(stderr)) werr("stderr");
case 3:
break;
default:
- internerr("unknown value for found");
+ internerr(_("unknown value for found"));
}
}
if (ok == 0 && (pkg->clientdata && pkg->clientdata->istobe == itb_remove))
/* It was a part - is it complete ? */
if (!stat(reasmbuf,&stab)) { /* Yes. */
filename= reasmbuf;
- pfilename= "reassembled package file";
+ pfilename= _("reassembled package file");
break;
} else if (errno == ENOENT) { /* No. That's it, we skip it. */
return;
badusage(_("--%s needs exactly one Packages file argument"),cipaction->olong);
break;
default:
- internerr("bad cipaction->arg in updateavailable");
+ internerr(_("bad cipaction->arg in updateavailable"));
}
if (!f_noact) {
case act_avclear:
break;
default:
- internerr("bad cipaction->arg in update available");
+ internerr(_("bad cipaction->arg in update available"));
}
varbufaddstr(&vb,admindir);