You are not logged in.
i'd sugest adding an else clause to the if clause testing for pkgfile return in pkgfile-hook.bash to note the user incase the command is not to be found in any of the available packages
i changed this:
if [ ! -z "$pkgs" ]; then
echo -e "\n$_prev_command may be found in the following packages:\n$pkgs"
fi
into this:
if [ ! -z "$pkgs" ]; then
echo -e "$_prev_command may be found in the following packages:\n$pkgs"
echo -e "pacman -S <pkg> to install one of the afore mentioned packages"
else
echo -e "bash: $_prev_command: command not found"
fi
this way you will still be prompted with the default bash' behaviour if there is no package containing the binary you typed on the command line instead of no message at all [looking like all was fine and the typed command just worked, which is not correct/true]
and an usage example:
aky@aky-work ~ $ sendmail
sendmail may be found in the following packages:
community/esmtp (1.0-1) : /usr/sbin/sendmail
extra/courier-mta (0.62.1-1) : /usr/bin/sendmail
extra/courier-mta (0.62.1-1) : /usr/sbin/sendmail
extra/exim (4.69-1) : /usr/sbin/sendmail
extra/postfix (2.6.5-1) : /usr/sbin/sendmail
extra/ssmtp (2.62-4) : /usr/sbin/sendmail
pacman -S <pkg> to install one of the afore mentioned packages
aky@aky-work ~ $ kk
bash: kk: command not found
aky@aky-work ~ $
note the "kk" case
Last edited by aky (2009-10-13 11:19:40)
Offline
The first sounds reasonable enough... I'll see if I can pass it back to bash with a return code so that it gets localized properly. I don't actually use the feature myself, so I hadn't considered that. The second is redundant, although you're welcome to modify it for your own installation.
Edit: http://bugs.archlinux.org/task/16615
Last edited by Daenyth (2009-10-13 14:38:52)
[git] | [AURpkgs] | [arch-games]
Offline
i'm not so good at bash scripting so what i changed there is more of a workaround, but what you plan to do [return 1 from "not found hook" and let bash handle it in this case] seems the right way to solve this
thanks
Offline
When I run 'pkgfile --update' as a normal user, which fails due to lack of permissions, the pkgfile lock file is still left behind in /var/lock. I'd say the lock should be removed.
Offline
When I run 'pkgfile --update' as a normal user, which fails due to lack of permissions, the pkgfile lock file is still left behind in /var/lock. I'd say the lock should be removed.
That's fixed. If you're already up to date it's fixed in git
[git] | [AURpkgs] | [arch-games]
Offline
Not all cases were fixed, so I just sent you a pull request at Github which takes care of the remaining cases. Hmm, and I just discovered I messed up the indentation of the first hunk.
Offline
Offline
I think the zsh hook should define "command_not_found_handler" as http://zsh.sourceforge.net/Doc/Release/ … html#SEC40 recommends, instead of precmd and preexec.
If you still use precmd/preexec, you should use "add-zsh-hook precmd pkgfile-hook" instead of defining them, which would not interfere with earlier and later definitions (eg by the user). See http://zsh.sourceforge.net/Doc/Release/ … tml#SEC272
Offline
Hi,
Following this topic https://bbs.archlinux.org/viewtopic.php … 85#p984585
Could you please adjust pkgfile to take into account the *.db.tar.gz in addition to *.files.tar.gz ?
Thx
I believe in a world I can and do understand. A rational universe, explained through rational means.
Offline
Hi,
Following this topic https://bbs.archlinux.org/viewtopic.php … 85#p984585
Could you please adjust pkgfile to take into account the *.db.tar.gz in addition to *.files.tar.gz ?
Thx
Does that *.db.tar.gz really work for you?? Or do you mean that it silences pkgfile? Can you use pkgfile to search graysky's repo?
Last edited by karol (2011-09-01 17:25:17)
Offline
Can you please file an issue on github with more specific info on how it fails so I have it in one spot? Next week I should have some time to work on it and I'd like to prep a new release to go out during that time.
[git] | [AURpkgs] | [arch-games]
Offline
Can you please file an issue on github with more specific info on how it fails so I have it in one spot? Next week I should have some time to work on it and I'd like to prep a new release to go out during that time.
pkgfile "fails" because there's no *.files.tar.gz in that repo.
Offline
Please file the ticket on github. As far as I know, the file lists are always in a .files.tar.gz file and not in the package db. If the .files file isn't present, the repo provides no file lists.
[git] | [AURpkgs] | [arch-games]
Offline
Please file the ticket on github. As far as I know, the file lists are always in a .files.tar.gz file and not in the package db. If the .files file isn't present, the repo provides no file lists.
Yes, *I* know it, it's not a bug, *.db.tar.gz is not *.files.tar.gz, it serves a different purpose.
Offline
I'm gearing up for the release. Anyone who wants to review the current state of it can do so here: https://github.com/Daenyth/pkgtools/pull/34
[git] | [AURpkgs] | [arch-games]
Offline
Offline
Might want to fix pkgfile in anticipation of pacman4... any place where you're parsing debug output (there's 2 of them), you need to merge stderr back to stdout.
I could probably reconsider the way I do that anyway. I'll make that change though, thanks.
Edit: Done
Last edited by Daenyth (2011-09-02 18:41:15)
[git] | [AURpkgs] | [arch-games]
Offline
I'll be working on this tonight. I hope to get most of the way to a release, if not released to community tonight.
[git] | [AURpkgs] | [arch-games]
Offline
Daenyth: Could you check the Bash scripts in pkgtools? With pkgtools 23 installed, no "./configure" or autotools scripts work. Trying to run those scripts results in a memory leak that completely fills up the RAM almost instantly. I only have the command not found hook enabled in /etc/pkgtools/pkgfile.conf. I've tested this on 4 computers, 2 were upgraded to version 23, 2 were fresh installs. All have the exact same problem. Hopefully this is something that is easy to fix.
Thanks in advance!
EDIT: falconindy has created a workaround and uploaded it to the community repository. Version 23-2 no longer has this problem. https://bbs.archlinux.org/viewtopic.php … 39#p988739
Last edited by chenxiaolong (2011-09-10 01:41:34)
Offline
'pkgfile rox-filer' doesn't return a thing. 'pkgfile ROX-Filer' works but the name is hard to guess.
Isn't pkgfile supposed to be case-insensitive unless invoked with '-c' switch?
'nosr -i rox-filer' works.
Offline
pkgfile isn't working for me at all after a restart. Initially it did in a couple places (I named them here but no more. I believe it is not being recognized by bash correctly.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Have you tried using nosr?
https://aur.archlinux.org/packages.php?ID=51938
Offline