You are not logged in.

#26 2009-10-13 10:47:50

aky
Member
From: BTW, I use Arch Windows...
Registered: 2009-03-14
Posts: 35

Re: pkgtools -- Archlinux package-related scripts

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

#27 2009-10-13 14:18:10

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: pkgtools -- Archlinux package-related scripts

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)

Offline

#28 2009-10-14 08:07:08

aky
Member
From: BTW, I use Arch Windows...
Registered: 2009-03-14
Posts: 35

Re: pkgtools -- Archlinux package-related scripts

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 smile

Offline

#29 2010-07-24 15:23:51

bram85
Member
From: Eindhoven
Registered: 2008-11-21
Posts: 26
Website

Re: pkgtools -- Archlinux package-related scripts

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

#30 2010-07-24 15:40:37

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: pkgtools -- Archlinux package-related scripts

bram85 wrote:

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

Offline

#31 2010-07-24 16:32:42

bram85
Member
From: Eindhoven
Registered: 2008-11-21
Posts: 26
Website

Re: pkgtools -- Archlinux package-related scripts

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. hmm

Offline

#32 2010-07-24 17:37:25

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: pkgtools -- Archlinux package-related scripts

Thanks, applied

Offline

#33 2010-09-11 15:05:05

hdhoang
Member
Registered: 2010-09-11
Posts: 13

Re: pkgtools -- Archlinux package-related scripts

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

#34 2011-09-01 17:04:26

LeCrayonVert
Member
Registered: 2010-09-01
Posts: 134

Re: pkgtools -- Archlinux package-related scripts

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 wink


I believe in a world I can and do understand. A rational universe, explained through rational means.

Offline

#35 2011-09-01 17:24:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pkgtools -- Archlinux package-related scripts

LeCrayonVert wrote:

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 wink

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

#36 2011-09-01 17:56:53

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: pkgtools -- Archlinux package-related scripts

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.

Offline

#37 2011-09-01 18:01:09

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pkgtools -- Archlinux package-related scripts

Daenyth wrote:

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

#38 2011-09-01 18:02:27

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: pkgtools -- Archlinux package-related scripts

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.

Offline

#39 2011-09-01 18:05:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pkgtools -- Archlinux package-related scripts

Daenyth wrote:

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

#40 2011-09-02 18:19:55

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: pkgtools -- Archlinux package-related scripts

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

Offline

#41 2011-09-02 18:34:08

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: pkgtools -- Archlinux package-related scripts

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.

Offline

#42 2011-09-02 18:36:22

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: pkgtools -- Archlinux package-related scripts

falconindy wrote:

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)

Offline

#43 2011-09-02 18:42:38

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: pkgtools -- Archlinux package-related scripts

Well yeah, but if you're gearing up for a release now isn't the time to be making sweeping changes wink

Offline

#44 2011-09-06 19:10:47

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: pkgtools -- Archlinux package-related scripts

I'll be working on this tonight. I hope to get most of the way to a release, if not released to community tonight.

Offline

#45 2011-09-10 00:12:24

chenxiaolong
Member
From: /home/chenxiaolong
Registered: 2010-11-03
Posts: 784

Re: pkgtools -- Archlinux package-related scripts

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

#46 2012-03-18 12:33:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pkgtools -- Archlinux package-related scripts

'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

#47 2012-05-05 08:23:57

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: pkgtools -- Archlinux package-related scripts

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

#48 2012-05-14 19:39:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pkgtools -- Archlinux package-related scripts

Offline

Board footer

Powered by FluxBB