aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2001-01-16 08:27:28 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2001-01-16 08:27:28 +0000
commitb038b9c421bb77bc0c7dbd90b8a6d8949bf0b9f1 (patch)
tree5ff8679efed677f8020b4978d398293e19cbb450 /usr.sbin
parentd69a5f7d9ca74d520235b7225f922ba749f74c06 (diff)
downloadsrc-b038b9c421bb77bc0c7dbd90b8a6d8949bf0b9f1.tar.gz
src-b038b9c421bb77bc0c7dbd90b8a6d8949bf0b9f1.zip
- 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.
Notes
Notes: svn path=/head/; revision=71095
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 bb6a04929f80..5e069d30db2e 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 ff38910909ca..b87c55ac37ba 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";