Author Topic: pacli - command line pacman/yaourt helper with advanced functions.  (Read 2804 times)

0 Members and 1 Guest are viewing this topic.

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: pacli - command line pacman/yaourt helper with advanced functions.
« Reply #15 on: 19. December 2015, 01:39:23 »
Might be worth it. However, suspect that they use some higher level language than bash, like python or perl. I can properly read and write only bash, but that could point us to what database they are using.
I also suspect they use pregenerated databasefile to make searches fast. We could do this too in bash with temporary file, like we do with aur package list now. Make query to generate temporary file run on background when pacli is started. This should cause a spike in cpu usage on startup, but no extra bandwith usage, so it might be okay. We could also make it check for that file first, so there is only one operation per boot.

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: pacli - command line pacman/yaourt helper with advanced functions.
« Reply #16 on: 19. December 2015, 05:31:52 »
I gave the for loop solution a try. It looks like this:

Code: [Select]
#!/bin/bash
for pkg in $(pacman -Slq); do
echo "$pkg : $( pacman -Si $pkg | awk '/Description/ {for (i=3; i<NF; i++) printf $i " "; print $NF}')" > /tmp/package_list
done

I don't yet know exactly how slow it is, but very slow.  It took longer than for me to open this page and write this message. So impractically slow. It is still running.

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: pacli - command line pacman/yaourt helper with advanced functions.
« Reply #17 on: 19. December 2015, 06:22:29 »
Okay, we can do it if we add package-query as dependency. This gives the desired result in about 1s:

Code: [Select]
package-query -Sl -f "%n - %d"

This is the working line for option 7:
Code: [Select]
sudo pacman -S $(package-query -Sl -f "%n - %d" | fzf-tmux -e -m  --reverse --prompt='Select packages to install (use TAB to toggle selection) >' | awk '{print $1}') --color always
I'm not sure how to do that for aur packages though.

I think we should maybe add it, the new depencies are less than 0,5mb together.
« Last Edit: 19. December 2015, 06:25:08 by Chrysostomus »

Offline eugen-b

  • Support Team
  • ****
  • Posts: 3191
  • Branch: testing
  • Desktop: LXDE, Fluxbox, JWM, LXQt, bspwm
  • GPU Card: Intel 82945G/GZ
  • GPU driver: free
  • Kernel: 4.5, 4.6
  • Skill: Intermediate
Re: pacli - command line pacman/yaourt helper with advanced functions.
« Reply #18 on: 19. December 2015, 13:36:11 »
Okay, we can do it if we add package-query as dependency. This gives the desired result in about 1s:

Code: [Select]
package-query -Sl -f "%n - %d"

This is the working line for option 7:
Code: [Select]
sudo pacman -S $(package-query -Sl -f "%n - %d" | fzf-tmux -e -m  --reverse --prompt='Select packages to install (use TAB to toggle selection) >' | awk '{print $1}') --color always
I'm not sure how to do that for aur packages though.

I think we should maybe add it, the new depencies are less than 0,5mb together.

Brilliant!!
MSI Wind Nettop, Intel Atom 230 1.6GHz (64bit), 2GB RAM
DEs: NET-minimal + (LXDE / Fluxbox / JWM); LXQt OpenRC
how to install on btrfs subvolumes
http://manjaro.github.io/donate/

Offline excalibur1234

  • Global Moderator
  • *****
  • Posts: 2508
  • Branch: unstable
  • Desktop: net-minimal + LXQt
  • GPU driver: video-nouveau
  • Kernel: 4.6
  • Skill: Intermediate
Re: pacli - command line pacman/yaourt helper with advanced functions.
« Reply #19 on: 19. December 2015, 13:51:39 »
great.
if you or somebody else do not add it until next week, i can add it.

let's keep looking for a solution for AUR packages.
Need more information? Search here:   Manjaro Forum   |   Manjaro Wiki   |   Arch Wiki