View | Details | Raw Unified | Return to bug 24695
Collapse All | Expand All

(-)main.c (-1 / +6 lines)
Lines 28-38 Link Here
28
  "$FreeBSD: src/usr.sbin/pkg_install/info/main.c,v 1.27 2000/12/05 11:02:19 sobomax Exp $";
28
  "$FreeBSD: src/usr.sbin/pkg_install/info/main.c,v 1.27 2000/12/05 11:02:19 sobomax Exp $";
29
#endif
29
#endif
30
30
31
static char Options[] = "acdDe:fhiIkl:LmopqrRst:v";
31
static char Options[] = "acdDe:fFhiIkl:LmopqrRst:v";
32
32
33
int	Flags		= 0;
33
int	Flags		= 0;
34
Boolean AllInstalled	= FALSE;
34
Boolean AllInstalled	= FALSE;
35
Boolean Quiet		= FALSE;
35
Boolean Quiet		= FALSE;
36
Boolean FuzzySearch	= FALSE;
36
char *InfoPrefix	= "";
37
char *InfoPrefix	= "";
37
char PlayPen[FILENAME_MAX];
38
char PlayPen[FILENAME_MAX];
38
char *CheckPkg		= NULL;
39
char *CheckPkg		= NULL;
Lines 86-91 Link Here
86
87
87
	case 'f':
88
	case 'f':
88
	    Flags |= SHOW_PLIST;
89
	    Flags |= SHOW_PLIST;
90
	    break;
91
92
	case 'F':
93
	    FuzzySearch = TRUE;
89
	    break;
94
	    break;
90
95
91
	case 'i':
96
	case 'i':
(-)perform.c (-2 / +20 lines)
Lines 137-145 Link Here
137
    /* It's not an ininstalled package, try and find it among the installed */
137
    /* It's not an ininstalled package, try and find it among the installed */
138
    else {
138
    else {
139
	char *tmp;
139
	char *tmp;
140
	extern Boolean FuzzySearch;
140
141
141
	sprintf(log_dir, "%s/%s", (tmp = getenv(PKG_DBDIR)) ? tmp : DEF_LOG_DIR,
142
	tmp = getenv(PKG_DBDIR) ? tmp : DEF_LOG_DIR;
142
		pkg);
143
	sprintf(log_dir, "%s/%s", tmp, pkg);
144
	if (FuzzySearch==TRUE) {
145
	    DIR *dirp=opendir(tmp);
146
	    struct dirent *dp;
147
148
	    while ((dp = readdir(dirp)) != NULL)
149
		if (strncmp(dp->d_name, pkg, strlen(pkg))==0)
150
		    break;
151
	    closedir(dirp);
152
153
	    if (dp==NULL) {
154
		warnx("can't find a package prefixed with `%s'!", pkg);
155
		return 1;
156
	    }
157
	    sprintf(log_dir, "%s/%s", tmp, dp->d_name);
158
	    pkg=dp->d_name;
159
	}
160
143
	if (!fexists(log_dir)) {
161
	if (!fexists(log_dir)) {
144
	    warnx("can't find package `%s' installed or in a file!", pkg);
162
	    warnx("can't find package `%s' installed or in a file!", pkg);
145
	    return 1;
163
	    return 1;
(-)pkg_info.1 (-3 / +7 lines)
Lines 24-36 Link Here
24
.Nm pkg_info
24
.Nm pkg_info
25
.Nd a utility for displaying information on software packages
25
.Nd a utility for displaying information on software packages
26
.Sh SYNOPSIS
26
.Sh SYNOPSIS
27
.Nm
27
.Nm pkg_info
28
.Op Fl cdDfiIkLmopqrRsv
28
.Op Fl cdDfFiIkLmopqrRsv
29
.Op Fl e Ar package
29
.Op Fl e Ar package
30
.Op Fl l Ar prefix
30
.Op Fl l Ar prefix
31
.Op Fl t Ar template
31
.Op Fl t Ar template
32
.Ar pkg-name [pkg-name ...]
32
.Ar pkg-name [pkg-name ...]
33
.Nm
33
.Nm pkg_info
34
.Fl a
34
.Fl a
35
.Op Ar flags
35
.Op Ar flags
36
.Sh DESCRIPTION
36
.Sh DESCRIPTION
Lines 69-74 Link Here
69
Show the install-message file for each package.
69
Show the install-message file for each package.
70
.It Fl f
70
.It Fl f
71
Show the packing list instructions for each package.
71
Show the packing list instructions for each package.
72
.It Fl F
73
Threat the 
74
.Ar pkg-name
75
as a prefix of the named package being search for.
72
.It Fl i
76
.It Fl i
73
Show the install script (if any) for each package.
77
Show the install script (if any) for each package.
74
.It Fl I
78
.It Fl I

Return to bug 24695