You are not logged in.
Pages: 1
This project has been renamed pkgfile and replaces pkgfile from pkgtools in the official repos.
To continue my trend of absurd application naming, I present: nosr: It's pkgfile in pure C, with mostly the same feature set but a bit more robustitude (aka not parsing pacman debug output).
Usage: nosr [options] target
Operations:
-l, --list list contents of a package
-s, --search search for packages containing the target (default)
-u, --update update repo files lists
Filtering:
-b, --binaries return only files contained in a bin dir
-g, --glob enable matching with glob characters
-i, --ignorecase use case insensitive matching
-R, --repo REPO search a specific repo
-r, --regex enable matching with pcre
-h, --help display this help and exit
-v, --verbose output more
Dependencies are currently:
glibc (derp)
pcre
libcurl (this becomes libalpm once pacman 4.0 is released)
libarchive
It's, of course, in the AUR under nosr-git. Source and manpage are available on github.
I'll also throw it out there that this is somewhat of a prototype for functionality to be added in pacman. It's not yet certain what form it'll take -- a separate binary or integration into /usr/bin/pacman itself, but I'm fairly confident that this will be shipped in some form with pacman 4.1. Go forth, find me bugs. Give me reasonable feature requests. Become a wizard.
Q: Wat. Why nosr?
Randy Morris (rson) was the inspiration for me to write cower. Given how many people enjoy it, I figure it was fitting to give him some credit in some small way.
Q: Does Daenyth approve of this?
Yup. He's already agreed to bequeath to me the name pkgfile should this end up as a separate binary -- a situation which I think would benefit everyone.
Last edited by falconindy (2012-09-15 18:13:47)
Offline
Sweet!
Offline
Not actually nosr-related, but maybe you know why some repos don't provide files.tar.gz?
I've asked on the wiki and I've e-mailed a few maintainers asking them why they don't provide files db but got zero response <sad panda>
Offline
Not actually nosr-related, but maybe you know why some repos don't provide files.tar.gz?
I've asked on the wiki and I've e-mailed a few maintainers asking them why they don't provide files db but got zero response <sad panda>
Because it requires more work... I doubt I will ever provide one for my repo.
Offline
karol wrote:Not actually nosr-related, but maybe you know why some repos don't provide files.tar.gz?
I've asked on the wiki and I've e-mailed a few maintainers asking them why they don't provide files db but got zero response <sad panda>Because it requires more work... I doubt I will ever provide one for my repo.
So it's a bit like changelogs? Makes sense.
Offline
I like the % counting when running 'nosr -u' - very neat :-)
[karol@black ~]$ nosr -u
testing.files.tar.gz 149.02 KiB [100.00%]
community-testing.files.tar.gz 15.42 KiB [ 55.55%]
...
I have a little question: pacman got updated and I had to rebuild nosr due to soname bump. Are you using any automated way of doing this?
Offline
libarchive was updated, forcing a rebuild.
My New Year's resolution was to drink less coffee but I somehow don't think it's going to work ;P
Thanks for your patience & sorry for my slip-ups.
Offline
Shameless self bump. I've spent some time over the past few days looking for performance improvements in nosr and cleaned up a few bugs. Results have yielded a ~40-60% reduced runtime, making it now 5-10x faster than pkgfile.
For those curious, the major changes:
- backport fixes in alpm's archive_fgets() function (we had a really silly bug that trounced throughput here)
- repack downloaded repo files as uncompressed CPIO archives.
- read repo files with mmap (and prefault the mapped pages with MAP_POPULATE).
- use PCRE's JIT option for pre-compiling regexes.
- avoid matching binaries such as /opt/bin/foo/bar/baz. Only match binaries which are in an immedate bin directory (like /bin/baz).
- new feature: -d, --directory: enable matching/printing directories
Still only available as a -git package.
Last edited by falconindy (2012-07-06 19:47:25)
Offline
Great application. Really like it (assuming nosr has actually been renamed back to pkgfile?). I was writing a command not found function for it last night ( https://bbs.archlinux.org/viewtopic.php … 0#p1138610 ) and realized this morning that you had already done so haha. I have a question about the function though. Why does it return 0 error code instead of 127 when the command is found? So that you know pkgfile itself is working correctly? Or did you do it that way to suppress the "bash: $1: command not found" message?
Offline
Pages: 1