* Fixed `dpkg-deb --help' and dpkg-deb(1) from reporting --no-check
when it's actually --nocheck (went with the hardcoded option, so
this is just a documentation fix).
+ * Added better check in disk.setup for a working NFS server. Makes
+ it compatible with other non-Linux servers.
+ * Corrected dpkg(8)'s example of using dpkg -i (showed it used with
+ a .tar.gz instead of a .deb)
+ * Applied patch to correct improper TMPDIR handling in dpkg-deb
+ * When encountering an error in extracting the tar archives in the
+ packages, we should abort the install, not simply give an error
+ and continue.
+ * Make dpkg give the builtin arch if there was an error while exec()'ing
+ the C compiler with --print-architecture. We still fail if the
+ output from gcc was bad in some way, since they may be of importance.
Sun Oct 17 11:51:36 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Updated the deb-control(5) man page with all the current fields
and uses
* Made the large info screen show 5 lines of the pkglist so that
- it scrolled properly, and still showed the cursor
+ it scrolled properly, and still showed the cursor in dselect
* Removed references to dpkg(5) which seems to not exist anymore
* Fixed `dpkg-deb --help' and dpkg-deb(1) from reporting --no-check
when it's actually --nocheck (went with the hardcoded option, so
this is just a documentation fix).
+ * Added better check in disk.setup for a working NFS server. Makes
+ it compatible with other non-Linux servers.
+ * Corrected dpkg(8)'s example of using dpkg -i (showed it used with
+ a .tar.gz instead of a .deb)
+ * Applied patch to correct improper TMPDIR handling in dpkg-deb
+ * When encountering an error in extracting the tar archives in the
+ packages, we should abort the install, not simply give an error
+ and continue.
+ * Make dpkg give the builtin arch if there was an error while exec()'ing
+ the C compiler with --print-architecture. We still fail if the
+ output from gcc was bad in some way, since they may be of importance.
-- Wichert Akkerman <wakkerma@debian.org> UNRELEASED
PREINSTFILE, POSTINSTFILE, PRERMFILE, POSTRMFILE, 0
};
- char *m;
+ char *m, *tmpd, *tmpf;
const char *debar, *directory, *const *mscriptp, *versionstring, *arch;
char *controlfile;
struct pkginfo *checkedinfo;
struct arbitraryfield *field;
FILE *ar, *gz, *cf;
- int p1[2],p2[2], warns, errs, n, c, subdir;
+ int p1[2],p2[2], warns, errs, n, c, subdir, gzfd;
pid_t c1,c2,c3,c4,c5;
struct stat controlstab, datastab, mscriptstab, debarstab;
char conffilename[MAXCONFFILENAME+1];
execlp(TAR,"tar","-cf","-",".",(char*)0); ohshite(_("failed to exec tar -cf"));
}
close(p1[1]);
- if (!(gz= tmpfile())) ohshite(_("failed to make tmpfile (control)"));
+
+ if (!(tmpd = getenv("TMPDIR")))
+ tmpd= "/tmp";
+ tmpf= malloc(strlen(tmpd) + strlen("/dpkg.XXXXXX"));
+ strcpy(tmpf, tmpd);
+ strcat(tmpf, "/dpkg.XXXXXX");
+ if (!(gzfd= mkstemp(tmpf)) || !(gz= fdopen(gzfd, "r+")))
+ ohshite(_("failed to make tmpfile (control)"));
+
+
if (!(c2= m_fork())) {
m_dup2(p1[0],0); m_dup2(fileno(gz),1); close(p1[0]);
execlp(GZIP,"gzip","-9c",(char*)0); ohshite(_("failed to exec gzip -9c"));
if (!oldformatflag) {
fclose(gz);
- if (!(gz= tmpfile())) ohshite(_("failed to make tmpfile (data)"));
+ strcpy(tmpf, tmpd);
+ strcat(tmpf, "/dpkg.XXXXXX");
+ if (!(gzfd= mkstemp(tmpf)) || !(gz= fdopen(gzfd, "r+")))
+ ohshite(_("failed to make tmpfile (data)"));
}
+ free(tmpf);
m_pipe(p2);
if (!(c4= m_fork())) {
m_dup2(p2[1],1); close(p2[0]); close(p2[1]);
const char **debarp,
const char **directoryp,
int admininfo) {
- static char dbuf[L_tmpnam];
+ char *dbuf;
pid_t c1;
*debarp= *(*argvp)++;
if (!*debarp) badusage(_("--%s needs a .deb filename argument"),cipaction->olong);
- if (!tmpnam(dbuf)) ohshite(_("failed to make temporary filename"));
+ dbuf = tempnam(NULL, "dpkg");
+ if (!dbuf) ohshite(_("failed to make temporary filename"));
*directoryp= dbuf;
if (!(c1= m_fork())) {
waitsubproc(c1,"rm -rf",0);
push_cleanup(cu_info_prepare,-1, 0,0, 1, (void*)dbuf);
extracthalf(*debarp, dbuf, "mx", admininfo);
+ free(dbuf);
}
static int ilist_select(const struct dirent *de) {
"editors":
.br
\fB cd /cdrom/hamm/hamm/binary/editors\fP
-\fB dpkg -i vim_4.5-3.tar.gz\fP
+\fB dpkg -i vim_4.5-3.deb\fP
.br
To make a local copy of the package selection states:
if (!(c1= m_fork())) {
m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
execlp(ccompiler,ccompiler,"--print-libgcc-file-name",(char*)0);
- ohshite(_("failed to exec C compiler `%.250s'"),ccompiler);
+ /* if we have a problem excuting the C compiler, we don't
+ * want to fail. If there is a problem with the compiler,
+ * like not being installed, or CC being set incorrectly,
+ * then important problems will show up elsewhere, not in
+ * dpkg. If a C compiler is not important to the reason we
+ * are being called, then we should just give them the built
+ * in arch.
+ */
+ if (printf("%s\n",architecture) == EOF) werr("stdout");
+ if (fflush(stdout)) werr("stdout");
+ exit 0;
}
close(p1[1]);
while ((c= getc(ccpipe)) != EOF) varbufaddc(&vb,c);
ohshite(_("error reading dpkg-deb tar output"));
} else if (feof(tc.backendpipe)) {
waitsubproc(c1,BACKEND " --fsys-tarfile (EOF)",1);
- ohshit(_("unexpected EOF in filesystem tarfile - corrupted package archive"));
+ ohshite(_("unexpected EOF in filesystem tarfile - corrupted package archive"));
} else {
- ohshit(_("corrupted filesystem tarfile - corrupted package archive"));
+ ohshite(_("corrupted filesystem tarfile - corrupted package archive"));
}
}
tmpf= tc.backendpipe;
if [ -z "$response" ]; then continue; fi
if [ -x /usr/bin/rpcinfo ]
then
- if rpcinfo -u "$response" mountd >/dev/null
+ if rpcinfo -u "$response" mountd | grep -q 'ready'
then
nfsserver="$response"
else