diff options
author | sobomax <sobomax@FreeBSD.org> | 2001-01-16 08:27:28 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2001-01-16 08:27:28 +0000 |
commit | f1f3937ff22dfd5e0f3fa04ab769ccb7fe9a18f7 (patch) | |
tree | ae904b98a3e41fd88e5976bab928810acff045eb /usr.sbin/pkg_install/create/perform.c | |
parent | 546b85a8456a42f91a7a548183f036931e5b3344 (diff) | |
download | FreeBSD-src-f1f3937ff22dfd5e0f3fa04ab769ccb7fe9a18f7.zip FreeBSD-src-f1f3937ff22dfd5e0f3fa04ab769ccb7fe9a18f7.tar.gz |
- Fix a nasty bug where pkg_create doesn't gzip package if lengh of package
name is less than 5 and doesn't contain recognizeable suffix (one of .tar or
.tgz), while gzip's it if lengh of the name greater than 4. For example
`pkg_create [options] pkg1' will create pkg1.tar, while
`pkg_create [options] pkg11' will create pkg11.tgz;
- use TRUE/FALSE as a values for boolean variables instead of explicit 1/0 and
erroneous YES in one case.
MFC candidate.
Diffstat (limited to 'usr.sbin/pkg_install/create/perform.c')
-rw-r--r-- | usr.sbin/pkg_install/create/perform.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index ff38910..b87c55a 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -46,7 +46,7 @@ pkg_perform(char **pkgs) Package plist; int len; char *suf; - int compress = 0; + int compress = TRUE; /* default is to compress packages */ /* Preliminary setup */ sanity_check(); @@ -76,9 +76,6 @@ pkg_perform(char **pkgs) compress = FALSE; pkg[len - 4] = '\0'; } - else - /* default is to compress packages */ - compress = TRUE; } if (compress) suf = "tgz"; |