summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/lib
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-08-25 01:00:16 +0000
committerobrien <obrien@FreeBSD.org>2002-08-25 01:00:16 +0000
commit3fd56acea66215f7298b66a553547384a81268ed (patch)
tree9a9fdba70dc305eae2eea69d80cbff7dd2c7c9da /usr.sbin/pkg_install/lib
parentcdcc7b3446c85c853dfe52a068a60cfe203c5afd (diff)
downloadFreeBSD-src-3fd56acea66215f7298b66a553547384a81268ed.zip
FreeBSD-src-3fd56acea66215f7298b66a553547384a81268ed.tar.gz
Find remaining hardcoded gzip bits and change to bzip2 bits.
Mark with XXX so someone that cares about being able to handle either bziped or gziped packages knows where the remaining nits are.
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r--usr.sbin/pkg_install/lib/file.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c
index 7150458..1878a89 100644
--- a/usr.sbin/pkg_install/lib/file.c
+++ b/usr.sbin/pkg_install/lib/file.c
@@ -176,7 +176,8 @@ fileGetURL(const char *base, const char *spec)
*(cp + 1) = '\0';
strcat(cp, "All/");
strcat(cp, spec);
- strcat(cp, ".tgz");
+ /* XXX: need to handle .tgz also */
+ strcat(cp, ".tbz");
}
else
return NULL;
@@ -188,7 +189,8 @@ fileGetURL(const char *base, const char *spec)
*/
strcpy(fname, hint);
strcat(fname, spec);
- strcat(fname, ".tgz");
+ /* XXX: need to handle .tgz also */
+ strcat(fname, ".tbz");
}
}
else
@@ -222,7 +224,8 @@ fileGetURL(const char *base, const char *spec)
dup2(pfd[0], 0);
for (fd = getdtablesize() - 1; fd >= 3; --fd)
close(fd);
- execl("/usr/bin/tar", "tar", Verbose ? "-xzpvf" : "-xzpf", "-",
+ /* XXX: need to handle .tgz also */
+ execl("/usr/bin/tar", "tar", Verbose ? "-xjvf" : "-xzf", "-",
(char *)0);
_exit(2);
}
@@ -252,7 +255,7 @@ fileFindByPath(const char *base, const char *fname)
{
static char tmp[FILENAME_MAX];
char *cp;
- const char *suffixes[] = {".tgz", ".tar", ".tbz", NULL};
+ const char *suffixes[] = {".tbz", ".tgz", ".tar", NULL};
int i;
if (fexists(fname) && isfile(fname)) {
@@ -457,7 +460,7 @@ unpack(const char *pkg, const char *flist)
strcpy(suff, cp + 1);
if (strchr(suff, 'z') || strchr(suff, 'Z')) {
if (strchr(suff, 'b'))
- strcpy(args, "-y");
+ strcpy(args, "-j");
else
strcpy(args, "-z");
}
OpenPOWER on IntegriCloud