Search for files?

Bug #245347 reported by Rehan Khan
2
Affects Status Importance Assigned to Milestone
Smart Package Manager
New
Wishlist
Unassigned

Bug Description

Imported: http://tracker.labix.org/issue236

Reason: Feature Request and Documentation hint

further details: https://blueprints.launchpad.net/smart/+spec/bug-reporting-migration

msg837 (view) Author: MaxiPunkt Date: 2006-10-27.14:49:28

> Sorry.. my mistake. It's 'path' not 'file'.
Ah, o.k. - now I got it:

path:*smart-root

Perhaps you could think about implementiing this option as an extra button in
smart-gui?? As you already have an option to choose between searching
"automaticly" or in "descriptions" just with a simple mouse-click...

Just a thought how to make things even easier...

Well, I want to thank you guys for your patience! ;-)

msg836 (view) Author: niemeyer Date: 2006-10-27.14:15:13

> > Use file:*yourpath in the search box..
> ???
> But you are aware that I want to search for a FILE inside a package
> WITHOUT having to know its full path, aren't you?!?!

Yes, I am.. boss.

> Didn't really get what you wanted to say, tried out several things in
> smart-gui now:
>
> smart-root:*
> smart-root:/*
> file:*smart-root
> file:*/smart-root
>
> No luck either!

Sorry.. my mistake. It's 'path' not 'file'.

msg835 (view) Author: MaxiPunkt Date: 2006-10-27.13:58:03

> Can you tell me one of your channels I can test it?
Channel Mandriva-Contrib (containing smart, etc.)
ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/Mandrakelinux/official/2007.0/i586/media/contrib/release

> Use file:*yourpath in the search box..
???
But you are aware that I want to search for a FILE inside a package WITHOUT
having to know its full path, aren't you?!?!
Didn't really get what you wanted to say, tried out several things in smart-gui now:

smart-root:*
smart-root:/*
file:*smart-root
file:*/smart-root

No luck either!

msg833 (view) Author: niemeyer Date: 2006-10-27.12:49:51

Hello,

Use file:*yourpath in the search box.. this works in the command
line as well. 'smart search' is special in the sense that it will
check if there's a '/' somewhere in the name and try to match it
as a path automatically.

Best regards,

msg832 (view) Author: netmask Date: 2006-10-27.12:44:27

Well, this should be working OOTB since it only depends on the information
provided by the channels. Since I don't have any channels that provide it, I
really can't help debugging the problem. Can you tell me one of your channels I
can test it?

msg831 (view) Author: MaxiPunkt Date: 2006-10-27.12:38:30

Don't halloo till you're out of the wood!

This trick doesn't work for smart-gui!!! :-(

Any thoughts?

msg830 (view) Author: MaxiPunkt Date: 2006-10-27.12:25:59

> Can you please try with wildcards, like '*smart-root'?
I already did, as you can read in msg814! This doesn't work!

But now I did something different:

[max@MaxWLAN ~]$ smart search */smart-root
Lade Zwischenspeicher...
Update Zwischenspeicher...
################################################################### [100%]

smart - Next generation package handling tool

[max@MaxWLAN ~]$

Surprise, surprise!!! :-) the "*/<filename>" did it!

O.k., so nice to see that it works, in the end.

Funny thing about this issue, that you guys are unsure yourself about how these
things have to be done! ;-)
Perhaps you should give a hint on your FAQ-page, like:

search for packages can be performed when doing:
$ smart search {*}<packagename>

search for filenames can be performed when doing:
$ smart search {<path> or *}/<filename>

Have a nice weekend and keep up your good work! I really like smart very much!

msg829 (view) Author: netmask Date: 2006-10-27.10:31:55

When searching for 'smart-root', it only looks for exact matches, either in
packages or provides. It's the correct behavior.

Can you please try with wildcards, like '*smart-root'?

msg828 (view) Author: MaxiPunkt Date: 2006-10-27.09:04:19

> Mandriva: works with full hdlist (not synthesis)
> This is already implemented, it works either with wildcards or not
No, as I described - it doesn't work for me!

I have Mandriva 2007 with smart 0.4.2 and for the channels I only have hdlist's
with full informations about the packages.

Just an example to show you the problem:

The file "/usr/bin/smart-root" is in the package "smart"

Let's search for the file "smart-root" now:

[max@MaxWLAN ~]$ smart search smart-root
Lade Zwischenspeicher...
Update Zwischenspeicher... ######################################## [100%]

[max@MaxWLAN ~]$

So smart didn't find anything! So let's search for the full path:

[max@MaxWLAN ~]$ smart search /usr/bin/smart-root
Lade Zwischenspeicher...
Update Zwischenspeicher...
###################################################### [100%]

smart - Next generation package handling tool

[max@MaxWLAN ~]$

Now smart found the file inside the package!

msg823 (view) Author: netmask Date: 2006-10-26.15:27:02

This is already implemented, it works either with wildcards or not, BUT the
channel you're using MUST supply that information.

SuSE: AFAIK, no channel provides file information
Mandriva: works with full hdlist (not synthesis)
FC: don't know for sure

Please check with your distribution which channel provides this information.

Closing ticket.

msg814 (view) Author: MaxiPunkt Date: 2006-10-25.19:12:51

> (1) The command "smart search /absolute/filename"
Well, I was talking about smart-gui.

But you're right, searching including the ABSOLUTE PATH of the file works, also
in smart-gui.

But do you think that being able to search for a file only with knowing it's
absolute path makes much sense? For me it's not!

Tried now to use wildcards like "*filename" but it fails.

So it would be nice if you would think about a more practical file-searching
without having to know the full path of the file.

msg813 (view) Author: ahanke Date: 2006-10-25.18:21:07

Actually I think that this is already implemented. Which distribution and which
channel types are you using?

The following works for me if the resulting package is in an apt-rpm channel:

(1) The command "smart search /absolute/filename"
(2) Enter the absolute filename into the search filed in the GUI

Whether this can work at all depends on the channel type. Some channel types
(e.g. yast2) simply don't provide filelists, in that case there's nothing smart
can do about it.

msg812 (view) Author: MaxiPunkt Date: 2006-10-25.18:06:57

Is it possible in smart-gui not only to search for package-names, but also
inside packages for file-names?

Couldn't find out how... If it shouldn't possible - please implement this feature!

Thank you in advance for your reply!

Revision history for this message
Rehan Khan (rasker) wrote :

The long and the short of it is:

1) add file search instructions to the documentation

2) add button on gui search bar to search for files.

Changed in smart:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.