FS#4824 - pacman packages remote file search
Attached to Project:
Pacman
Opened by Alessio Bolognino (mOLOk) - Thursday, 15 June 2006, 11:53 GMT
Last edited by Xavier (shining) - Saturday, 03 October 2009, 16:54 GMT
Opened by Alessio Bolognino (mOLOk) - Thursday, 15 June 2006, 11:53 GMT
Last edited by Xavier (shining) - Saturday, 03 October 2009, 16:54 GMT
|
Details
I think that should be nice to be able to search for the
package
that owns a file on the ftp server (like apt-file does on debian). In my opinion is the only lack of pacman. The server could have a file obtained concatening all the $ tar tfz $package.pkg.tar.gz | egrep -v '{.PKGINFO|.FILELIST)' or something similar. with this file will be easy to write script to handle the search or include the feature in pacman. |
This task depends upon
Closed by Xavier (shining)
Saturday, 03 October 2009, 16:54 GMT
Reason for closing: Implemented
Additional comments about closing: you can use pkgfiles from pkgtools
Saturday, 03 October 2009, 16:54 GMT
Reason for closing: Implemented
Additional comments about closing: you can use pkgfiles from pkgtools
I used a lot this feature when I had Mandr(ake/iva) / Ubuntu so I wouls really like to be able to use it with ArchLinux.
It is very useful for example when you search for some peculiar binary file and you don't know in which package it is. For example yesteday I wanted to install uudecode but it was not easy to discover that is was in the sharutils package. The same thing happen for many programs.
With a such feature you would just have to grep the output for "bin/uudecode". And that's all.
I guess the smarter of you already thought about that but I'm not that smart :)
Anyway, the "hard thing" is to make pacman search into that files, something like pacman -Qo, but for synced repos.
I don't know of a really clean way to implement this... if anyone can give me a good idea that is simplistic in nature, I will implement it, but at this moment it seems as though all of these ideas are not that great.
Or add an option to pacman.conf to enable this feature. When enabled, it would download the FILELIST file from the server (separate from the current database, so the download could be separate).
http://www.archlinux.org/pipermail/arch-dev-public/2008-January/004358.html
Not easy to sum up with the conflicting points of view..
Store 2 db files for each repo on servers: extra.min.db.tar.gz and extra.full.tar.gz.
* min would be the default (-y) : KISS way
* full can be downloaded on request (-ya): feature-rich way (files + maybe changelog, see also: FS#9530)
As it was discussed many times, apart from files and changelog these dbs would be equivalent, and only small code modification is needed on client-side (in pacman) and on the server side (generate the full db too, with files and changelog) to implement it.
http://projects.archlinux.org/?p=dbscripts.git;a=blob_plain;f=cron-jobs/createFileLists;hb=HEAD
Now every mirror has a $repo.files.tar.gz next to its $repo.db.tar.gz, for each $repo.
Here is for example one script making use of it :
http://aur.archlinux.org/packages.php?ID=17941
http://aur.archlinux.org/packages/pkgtools/pkgtools/pkgfile
What about using a full repo.fulldb.tar.gz (with desc, depends, files) and repo.db.tar.gz (without files) database, and make repoext configurable in pacman.conf (db.tar.gz versus fulldb.tar.gz) maybe for each repo, making db.tar.gz the default.
What is wrong with it? Why changing something that works?
And I don't see any real benefits of your method, only one drawbacks which is that all desc,depends are duplicated (present in both repo.fulldb.tar.gz and repo.db.tar.gz)
You won, my main reason was: it is "nicer" and it is (would have been) easier to implement (repo.files.tar.gz is in database format). And personally I could hardly follow new and new scripts.
Or if you have files in sync db, you can do fileconflict test before downloading (I know, this is not implemented. See also trans001.py).
Or do we still want to incorporate the generation of file db in repo-add ?
FS#11302