FreeBSD Bugzilla – Attachment 12884 Details for
Bug 24695
[patch] pkg_info: prefix search for a package
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.75 KB, created by
Edwin Groothuis
on 2001-01-28 17:00:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Edwin Groothuis
Created:
2001-01-28 17:00:01 UTC
Size:
2.75 KB
patch
obsolete
>Index: main.c >=================================================================== >RCS file: /home/ncvs/src/usr.sbin/pkg_install/info/main.c,v >retrieving revision 1.27 >diff -u -r1.27 main.c >--- main.c 2000/12/05 11:02:19 1.27 >+++ main.c 2001/01/28 16:49:12 >@@ -28,11 +28,12 @@ > "$FreeBSD: src/usr.sbin/pkg_install/info/main.c,v 1.27 2000/12/05 11:02:19 sobomax Exp $"; > #endif > >-static char Options[] = "acdDe:fhiIkl:LmopqrRst:v"; >+static char Options[] = "acdDe:fFhiIkl:LmopqrRst:v"; > > int Flags = 0; > Boolean AllInstalled = FALSE; > Boolean Quiet = FALSE; >+Boolean FuzzySearch = FALSE; > char *InfoPrefix = ""; > char PlayPen[FILENAME_MAX]; > char *CheckPkg = NULL; >@@ -86,6 +87,10 @@ > > case 'f': > Flags |= SHOW_PLIST; >+ break; >+ >+ case 'F': >+ FuzzySearch = TRUE; > break; > > case 'i': >Index: perform.c >=================================================================== >RCS file: /home/ncvs/src/usr.sbin/pkg_install/info/perform.c,v >retrieving revision 1.32 >diff -u -r1.32 perform.c >--- perform.c 2000/10/23 07:01:31 1.32 >+++ perform.c 2001/01/28 16:49:13 >@@ -137,9 +137,27 @@ > /* It's not an ininstalled package, try and find it among the installed */ > else { > char *tmp; >+ extern Boolean FuzzySearch; > >- sprintf(log_dir, "%s/%s", (tmp = getenv(PKG_DBDIR)) ? tmp : DEF_LOG_DIR, >- pkg); >+ tmp = getenv(PKG_DBDIR) ? tmp : DEF_LOG_DIR; >+ sprintf(log_dir, "%s/%s", tmp, pkg); >+ if (FuzzySearch==TRUE) { >+ DIR *dirp=opendir(tmp); >+ struct dirent *dp; >+ >+ while ((dp = readdir(dirp)) != NULL) >+ if (strncmp(dp->d_name, pkg, strlen(pkg))==0) >+ break; >+ closedir(dirp); >+ >+ if (dp==NULL) { >+ warnx("can't find a package prefixed with `%s'!", pkg); >+ return 1; >+ } >+ sprintf(log_dir, "%s/%s", tmp, dp->d_name); >+ pkg=dp->d_name; >+ } >+ > if (!fexists(log_dir)) { > warnx("can't find package `%s' installed or in a file!", pkg); > return 1; >Index: pkg_info.1 >=================================================================== >RCS file: /home/ncvs/src/usr.sbin/pkg_install/info/pkg_info.1,v >retrieving revision 1.31 >diff -u -r1.31 pkg_info.1 >--- pkg_info.1 2000/12/27 15:30:19 1.31 >+++ pkg_info.1 2001/01/28 16:49:13 >@@ -24,13 +24,13 @@ > .Nm pkg_info > .Nd a utility for displaying information on software packages > .Sh SYNOPSIS >-.Nm >-.Op Fl cdDfiIkLmopqrRsv >+.Nm pkg_info >+.Op Fl cdDfFiIkLmopqrRsv > .Op Fl e Ar package > .Op Fl l Ar prefix > .Op Fl t Ar template > .Ar pkg-name [pkg-name ...] >-.Nm >+.Nm pkg_info > .Fl a > .Op Ar flags > .Sh DESCRIPTION >@@ -69,6 +69,10 @@ > Show the install-message file for each package. > .It Fl f > Show the packing list instructions for each package. >+.It Fl F >+Threat the >+.Ar pkg-name >+as a prefix of the named package being search for. > .It Fl i > Show the install script (if any) for each package. > .It Fl I
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24695
: 12884