Remove support for RELENG_4 (__FreeBSD_version < 500039).

MFC after:	1 day
This commit is contained in:
Florent Thoumie 2008-06-16 23:41:11 +00:00
parent 8fecbb4e34
commit 74572e9e63
5 changed files with 1 additions and 30 deletions

View File

@ -223,12 +223,7 @@ main(int argc, char **argv)
if (!((ptr = strrchr(remotepkg, '.')) && ptr[1] == 't' &&
(ptr[2] == 'b' || ptr[2] == 'g') && ptr[3] == 'z' &&
!ptr[4]))
if (strlcat(remotepkg,
#if defined(__FreeBSD_version) && __FreeBSD_version >= 500039
".tbz",
#else
".tgz",
#endif
if (strlcat(remotepkg, ".tbz",
sizeof(temppackageroot)) >= sizeof(temppackageroot))
errx(1, "package name too long");
}

View File

@ -308,11 +308,7 @@ pkg_do(char *pkg)
ext = strrchr(pkg_fullname, '.');
if (ext == NULL)
#if defined(__FreeBSD_version) && __FreeBSD_version >= 500039
ext = ".tbz";
#else
ext = ".tgz";
#endif
snprintf(path, FILENAME_MAX, "%s/%s%s", getenv("_TOP"), p->name, ext);
if (fexists(path))
cp = path;

View File

@ -43,11 +43,7 @@ int PlistOnly = FALSE;
int Recursive = FALSE;
int Regenerate = TRUE;
int Help = FALSE;
#if defined(__FreeBSD_version) && __FreeBSD_version >= 500039
enum zipper Zipper = BZIP2;
#else
enum zipper Zipper = GZIP;
#endif
static void usage(void);

View File

@ -350,11 +350,7 @@ unpack(const char *pkg, const char *flist)
}
}
else
#if defined(__FreeBSD_version) && __FreeBSD_version >= 500039
comp = "-j";
#else
comp = "-z";
#endif
if (vsystem("/usr/bin/tar -xp %s -f '%s' %s", comp, pkg, flist ? flist : "")) {
warnx("tar extract of %s failed!", pkg);
return 1;

View File

@ -72,11 +72,7 @@ fileGetURL(const char *base, const char *spec, int keep_package)
*(cp + 1) = '\0';
strcat(cp, "All/");
strcat(cp, spec);
#if defined(__FreeBSD_version) && __FreeBSD_version >= 500039
strcat(cp, ".tbz");
#else
strcat(cp, ".tgz");
#endif
}
else
return NULL;
@ -88,11 +84,7 @@ fileGetURL(const char *base, const char *spec, int keep_package)
*/
strcpy(fname, hint);
strcat(fname, spec);
#if defined(__FreeBSD_version) && __FreeBSD_version >= 500039
strcat(fname, ".tbz");
#else
strcat(fname, ".tgz");
#endif
}
}
else
@ -141,11 +133,7 @@ fileGetURL(const char *base, const char *spec, int keep_package)
for (fd = getdtablesize() - 1; fd >= 3; --fd)
close(fd);
execl("/usr/bin/tar", "tar",
#if defined(__FreeBSD_version) && __FreeBSD_version >= 500039
Verbose ? "-xpjvf" : "-xpjf",
#else
Verbose ? "-xpzvf" : "-xpzf",
#endif
"-", (char *)0);
_exit(2);
}