mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
- 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.
This commit is contained in:
parent
d69a5f7d9c
commit
b038b9c421
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71095
@ -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':
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user