This patch enable zypper searching file with full path, which is the function as 'yum provides'. --- src/Zypper.cc | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/Zypper.cc b/src/Zypper.cc index a43ec47..1bb5608 100644 --- a/src/Zypper.cc +++ b/src/Zypper.cc @@ -1795,6 +1795,7 @@ void Zypper::processCommandOptions() {"match-words", no_argument, 0, 0}, {"match-exact", no_argument, 0, 0}, {"search-descriptions", no_argument, 0, 'd'}, + {"search-file", no_argument, 0, 'f'}, {"case-sensitive", no_argument, 0, 'C'}, {"type", required_argument, 0, 't'}, {"sort-by-name", no_argument, 0, 0}, @@ -1821,6 +1822,7 @@ void Zypper::processCommandOptions() " --match-words Search for a match to whole words only.\n" " --match-exact Searches for an exact package name.\n" "-d, --search-descriptions Search also in package summaries and descriptions.\n" + "-f, --search-file Search also in package file list.\n" "-C, --case-sensitive Perform case-sensitive search.\n" "-i, --installed-only Show only packages that are already installed.\n" "-u, --uninstalled-only Show only packages that are not currently installed.\n" @@ -2390,6 +2392,7 @@ void Zypper::processCommandOptions() {"match-words", no_argument, 0, 0}, {"match-exact", no_argument, 0, 0}, {"search-descriptions", no_argument, 0, 'd'}, + {"search-file", no_argument, 0, 'f'}, {"case-sensitive", no_argument, 0, 'C'}, {"sort-by-name", no_argument, 0, 0}, {"sort-by-catalog", no_argument, 0, 0}, @@ -3653,6 +3656,12 @@ void Zypper::doCommand() query.addAttribute(sat::SolvAttr::summary); query.addAttribute(sat::SolvAttr::description); } + if (cOpts().count("search-file")) + { + query.addAttribute(sat::SolvAttr::filelist); + query.setFilesMatchFullPath(true); + query.setMatchExact(); + } init_target(*this); -- 1.7.2.2 -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org