From ffdd95144d91bbe70b7085db0ac76bac74571854 Mon Sep 17 00:00:00 2001 From: flz Date: Mon, 16 Jun 2008 23:41:11 +0000 Subject: Remove support for RELENG_4 (__FreeBSD_version < 500039). MFC after: 1 day --- usr.sbin/pkg_install/add/main.c | 7 +------ usr.sbin/pkg_install/add/perform.c | 4 ---- usr.sbin/pkg_install/create/main.c | 4 ---- usr.sbin/pkg_install/lib/file.c | 4 ---- usr.sbin/pkg_install/lib/url.c | 12 ------------ 5 files changed, 1 insertion(+), 30 deletions(-) (limited to 'usr.sbin/pkg_install') diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c index 1556897..c681f98 100644 --- a/usr.sbin/pkg_install/add/main.c +++ b/usr.sbin/pkg_install/add/main.c @@ -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"); } diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c index b4130d1..872c7a8 100644 --- a/usr.sbin/pkg_install/add/perform.c +++ b/usr.sbin/pkg_install/add/perform.c @@ -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; diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c index eb8fa15..0ff8234 100644 --- a/usr.sbin/pkg_install/create/main.c +++ b/usr.sbin/pkg_install/create/main.c @@ -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); diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c index e406caa..0b74ddf 100644 --- a/usr.sbin/pkg_install/lib/file.c +++ b/usr.sbin/pkg_install/lib/file.c @@ -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; diff --git a/usr.sbin/pkg_install/lib/url.c b/usr.sbin/pkg_install/lib/url.c index 29e9beb..1cf5d31 100644 --- a/usr.sbin/pkg_install/lib/url.c +++ b/usr.sbin/pkg_install/lib/url.c @@ -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); } -- cgit v1.1