summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-01-16 08:27:28 +0000
committersobomax <sobomax@FreeBSD.org>2001-01-16 08:27:28 +0000
commitf1f3937ff22dfd5e0f3fa04ab769ccb7fe9a18f7 (patch)
treeae904b98a3e41fd88e5976bab928810acff045eb /usr.sbin
parent546b85a8456a42f91a7a548183f036931e5b3344 (diff)
downloadFreeBSD-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')
-rw-r--r--usr.sbin/pkg_install/create/main.c8
-rw-r--r--usr.sbin/pkg_install/create/perform.c5
2 files changed, 5 insertions, 8 deletions
diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c
index bb6a049..5e069d3 100644
--- a/usr.sbin/pkg_install/create/main.c
+++ b/usr.sbin/pkg_install/create/main.c
@@ -36,8 +36,8 @@ char *Mtree = NULL;
char *Pkgdeps = NULL;
char *Origin = NULL;
char PlayPen[FILENAME_MAX];
-int Dereference = 0;
-int PlistOnly = 0;
+int Dereference = FALSE;
+int PlistOnly = FALSE;
static void usage __P((void));
@@ -63,7 +63,7 @@ main(int argc, char **argv)
break;
case 'O':
- PlistOnly = YES;
+ PlistOnly = TRUE;
break;
case 'p':
@@ -115,7 +115,7 @@ main(int argc, char **argv)
break;
case 'h':
- Dereference = 1;
+ Dereference = TRUE;
break;
case 'D':
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";
OpenPOWER on IntegriCloud