You are not logged in.

#276 2010-02-08 05:41:22

aeosynth
Member
From: California
Registered: 2010-02-06
Posts: 115
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

Would it be possible to add a link to the aur page when outputting info (-Si) ? I always check it to read the comments and to make sure the package isn't out of date. Thanks.

Offline

#277 2010-02-09 21:58:55

extofme
Member
From: here + now
Registered: 2009-10-10
Posts: 174
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

Perhaps this should be moved to community contrib?


what am i but an extension of you?

Offline

#278 2010-02-10 02:38:01

MajorTom
Member
Registered: 2008-09-12
Posts: 58

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

I'm fairly certain that things which install other things from AUR will remain in AUR despite the number of votes.

Offline

#279 2010-02-10 11:35:25

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

MajorTom wrote:

I'm fairly certain that things which install other things from AUR will remain in AUR despite the number of votes.

I'm fairly certain he meant this thread should be moved to the community contributions forum.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#280 2010-02-10 14:20:17

MajorTom
Member
Registered: 2008-09-12
Posts: 58

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

I'm quite certain I responded without thinking too much.
<overworked>

Offline

#281 2010-02-10 15:27:33

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

I quick hack, but if anyone wants to use powerpill they can always just change this in /usr/bin/packer:

$pacman="$(type -p pacman)"
outputpacman="$(type -p pacman-color)"
if [[ $outputpacman ]]; then
  COLOR1='\e[1;39m'
  COLOR2='\e[1;32m'
  COLOR3='\e[1;35m'
  COLOR4='\e[1;36m'
  COLOR5='\e[1;34m'
  COLOR6='\e[1;33m'
  COLOR7='\e[1;31m'
  ENDCOLOR='\e[0m'
else
  outputpacman="$pacman"
fi

To this:

#$pacman="$(type -p pacman)"
outputpacman="$(type -p powerpill)"
#if [[ $outputpacman ]]; then
#  COLOR1='\e[1;39m'
#  COLOR2='\e[1;32m'
#  COLOR3='\e[1;35m'
#  COLOR4='\e[1;36m'
#  COLOR5='\e[1;34m'
#  COLOR6='\e[1;33m'
#  COLOR7='\e[1;31m'
#  ENDCOLOR='\e[0m'
#else
#  outputpacman="$pacman"
#fi

I would hope a proper implementation would come soon though, as this is _very_ hackish as well as bug ridden.

Last edited by smartboyathome (2010-02-10 15:40:09)

Offline

#282 2010-02-10 23:40:29

aeosynth
Member
From: California
Registered: 2010-02-06
Posts: 115
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

I got some errors while installing chromium:

$ packer -S chromium-browser-bin
/tmp/packertmp-1000/chromium-browser-bin.PKGBUILD: line 45: msg: command not found
/tmp/packertmp-1000/chromium-browser-bin.PKGBUILD: line 48: msg2: command not found
/tmp/packertmp-1000/chromium-browser-bin.PKGBUILD: line 54: [: : integer expression expected
/tmp/packertmp-1000/chromium-browser-bin.PKGBUILD: line 59: devel_update: command not found

These errors don't show up with makepkg.

Offline

#283 2010-02-11 01:17:39

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

i get those same errors if i source chromium-browser-bin's PKGBUILD with aurget; i think that's where the trouble lies (not with packer) wink.

Offline

#284 2010-02-11 19:30:04

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

I get some strange errors when packer try to resolve dependency from Aur packet on Aur.

Edit gmpc-git PKGBUILD with $EDITOR? [Y/n] 

==> Determining latest git revision...
  -> Version found: 20100211
==> Making package: gmpc-git 20100211-1 i686 (Thu Feb 11 20:16:07 CET 2010)
==> Checking Runtime Dependencies...
==> Missing Dependencies:
  -> libmpd-git
==> Checking Buildtime Dependencies...
==> ERROR: Could not resolve all dependencies.
The build failed.

However packer is able to find the same dependency.

[cedric@cedric-laptop ~]$ packer -Si libmpd-git
Repository     : aur
Name           : libmpd-git
Version        : 20090525-1
URL            : http://sarine.nl/libmpd
Licenses       : GPL
Groups         : None
Provides       : libmpd
Depends On     : glibc glib2
Make Depends   : git
Optional Deps  : None
Conflicts With : libmpd libmpd-svn
Replaces       : None
Architecture   : x86_64 i686
Description    : Signal based wrapper around libmpdclient

If you look at the pkgbuild, there is nothing unusual there :

depends=('libglade' 'libmpd-git' 'libsoup')
makedepends=('git' 'intltool' 'gob2' 'pkgconfig' 'vala')

Also, Pacman provides an option "asdeps" which is useful when you want to manually install a dependency first because there is some problem with them. Could you provide the same option to be able to do the same with AUR packets ? (Yaourt may already be doing that).


Cedric Girard

Offline

#285 2010-02-12 00:12:20

akurei
Member
From: Bochum, NRW, Germany
Registered: 2009-05-25
Posts: 152
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

yaourt does alphabetically list the packages in AUR.
packer does not.

Am I missing something? Or does "sorting the AUR packagelist" impact performance too much?

Offline

#286 2010-02-12 12:30:21

evilgnome
Member
Registered: 2009-02-20
Posts: 62

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

Thanks, packer is great!

I use this python script so that I only have to use one command for the all the things yaourt used to do for me. I know it's probably stupid for various reasons, but it's readable and it does what I want.

import os
import sys

if sys.argv[1] == '-C':
    os.system('/home/evilgnome/Code/pacnew-update.sh')
else:
    command = 'packer '
    packer_args = ['-S', '-Su', '-Syu', '-Ss', '-Ssq', '-Si', '-G']

    if sys.argv[1].startswith('-') and sys.argv[1] not in packer_args:
        command = 'sudo pacman-color '

    os.system(command + ' '.join(sys.argv[1:]))

The pacnew-update.sh script is basically straight from the arch wiki's pacnew page. I just thought I'd post this in case someone else finds it useful.

Offline

#287 2010-02-15 12:23:27

Rydgel
Member
From: France
Registered: 2008-09-04
Posts: 166
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

Truly awesome big_smile

mv yaourt /dev/null

Offline

#288 2010-02-16 00:29:43

grogers3.14
Member
Registered: 2010-02-15
Posts: 12

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

Love it! I never thought the AUR could be so fast big_smile

A couple of feature requests and suggestions on how to do it without too much speed loss:

1. Show whether package is installed in search results. Use

/usr/bin/pacman -Q <pkg name> &>/dev/null && <command when package is installed>
[graham@laptop ~]$ time /usr/bin/pacman -Q packer
packer 20100215-1

real    0m0.007s
user    0m0.003s
sys    0m0.003s

[graham@laptop ~]$ time /usr/bin/pacman -Q this-is-not-installed
error: package "this-is-not-installed" not found

real    0m0.010s
user    0m0.007s
sys    0m0.003s

[graham@laptop ~]$ time /usr/bin/pacman -Q multiple packages packer
error: package "multiple" not found
error: package "packages" not found
packer 20100215-1

real    0m0.010s
user    0m0.003s
sys    0m0.007s

Pretty quick! I would use /usr/bin/pacman though, because using pacman-color -Q is a little slower. The multiple package search might be slower, since you would have to check the output.

Edit: a pipe to sed works. There might be better ways, but I'll leave that as an exercise to the reader. Maybe there is a way to redirect the stderr directly, instead of pushing it through stdout.

[graham@laptop ~]$ time /usr/bin/pacman -Q multiple packages packer 2>&1 | sed -nr 's/error: package "(.+?)" not found/\1/p'
multiple
packages

real    0m0.010s
user    0m0.013s
sys    0m0.003s

2. Show if a package is out of date in search results and during update, like when installing an out of date package e.g

[graham@laptop ~]$ packer -Su
Password: 
:: Starting full system upgrade...
 local database is up to date
:: Synchronizing aur database...
 aur                                         17  17 [#####################] 100%
:: Starting full aur upgrade...
 local database is up to date
warning: <pkg name> is flagged as out of date

You have to download the rpc.php when you check for updates and for the search results, so it shouldn't make a lot of difference to the speed.

Other than that, its perfect!

Last edited by grogers3.14 (2010-02-16 00:48:57)

Offline

#289 2010-02-16 19:18:49

pxc
Member
Registered: 2010-02-16
Posts: 4

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

Hi, I have a couple of small feature requests:

Would it be possible to change the behavior of Packer such that it compiles all AUR packages, storing them in /var/cache/something, before installing them? This way there could be a single confirm/cancel prompt for AUR packages, just like with normal Arch packages. It could reduce the interactivity without going all-out with "--noconfirm --noedit". If you prefer the default behavior remain the way it is currently, that's fine. A command line switch that did this would be very helpful.

I would also like the ability to do a "packer -Su" without updating the "AUR repository" cache. In that case, it could only attempt to upgrade AUR packages already known to be newer than the currently installed ones, and re-fetch their metadata for accurate versioning, etc., instead of re-fetching the entire repository's package list.

Thanks!

--Patrick C.

Offline

#290 2010-02-16 19:44:22

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

pxc wrote:

Would it be possible to change the behavior of Packer such that it compiles all AUR packages, storing them in /var/cache/something, before installing them? This way there could be a single confirm/cancel prompt for AUR packages, just like with normal Arch packages.

I am hoping for that feature too. I think it's a great idea.

The problem is, I think it would require bruenig (or someone) to rewrite a lot of packer code. hmm

Offline

#291 2010-02-17 01:35:16

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

Below is an initial patch for supporting powerpill, note that it doesn't work yet as it seems to give me some funny EOF error which I can't explain (it doesn't seem to be coming from any code I input, as it comes from line 735, but I only get the error after applying the patch). It should give someone else (possibly bruenig?) a starting off point for implementing support, though. Note that this patch does add the flag --nopp, as I thought that someone might like a way to disable powerpill if they don't want to use it yet still have it installed.

*** packer.old    2010-02-10 07:07:36.369695498 -0800
--- packer    2010-02-16 17:23:33.984160539 -0800
***************
*** 26,31 ****
--- 26,33 ----
    outputpacman="$pacman"
  fi
  
+ powerpill="$(type -p powerpill)"
+ 
  trap ctrlc INT
  ctrlc() {
    echo
***************
*** 53,58 ****
--- 55,61 ----
    echo '    --auronly   - only do actions for aur'
    echo '    --devel     - update devel packages during -Su'
    echo '    --skipinteg - when using makepkg, do not check md5s'
+   echo '    --nopp      - do not use powerpill (only required when installed)'
    echo '    -h          - outputs this message'
    exit
  }
***************
*** 380,391 ****
   
    # If only pacman packages, then call pacman
    if [[ $pacmanpackages && -z $aurtargets ]]; then
!     runasroot $outputpacman "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}"
      exit
    elif [[ $aurtargets ]]; then
      # First install the explicit pacman packages, let pacman prompt
      if [[ $pacmanpackages ]]; then
!       runasroot $outputpacman "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}"
      fi
  
      # Test if aurpackages are already installed; echo warning if so
--- 383,402 ----
   
    # If only pacman packages, then call pacman
    if [[ $pacmanpackages && -z $aurtargets ]]; then
!     if [[ $powerpill ]]; then
!       runasroot $powerpill "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}"
!     else
!       runasroot $outputpacman "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}"
!     fi
      exit
    elif [[ $aurtargets ]]; then
      # First install the explicit pacman packages, let pacman prompt
      if [[ $pacmanpackages ]]; then
!       if [[ $powerpill ]]; then
!         runasroot $powerpill "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}"
!       else
!         runasroot $outputpacman "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}"
!       fi
      fi
  
      # Test if aurpackages are already installed; echo warning if so
***************
*** 429,435 ****
  
      # Install pacman dependencies
      if [[ $pacmandepends ]]; then
!       runasroot $outputpacman --noconfirm --asdeps -S -- "${pacmandepends[@]}" || err "Installation failed."
      fi 
  
      # Install aur dependencies
--- 440,450 ----
  
      # Install pacman dependencies
      if [[ $pacmandepends ]]; then
!       if [[ $powerpill ]]; then
!         runasroot $powerpill "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}" || err "Installation failed."
!       else
!         runasroot $outputpacman "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}" || err "Installation failed."
!       fi
      fi 
  
      # Install aur dependencies
***************
*** 479,484 ****
--- 494,500 ----
      '--auronly') auronly='1' ;;
      '--devel') devel='1' ;;
      '--skipinteg') MAKEPKGOPTS="--skipinteg" ;;
+     '--nopp') unset $powerpill ;;
      '--') shift ; packageargs+=("$@") ; break ;;
      -*) err "Option \`$1' is not valid." ;;
      *) packageargs+=("$1") ;;
***************
*** 502,508 ****
    sourcemakepkgconf
    # Pacman update
    if ! [[ $auronly ]]; then
!     runasroot $outputpacman "${PACOPTS[@]}" "$pacmanarg"
    fi
  
    # Aur update
--- 518,528 ----
    sourcemakepkgconf
    # Pacman update
    if ! [[ $auronly ]]; then
!     if [[ $powerpill ]]; then
!       runasroot $powerpill "${PACOPTS[@]" "$pacmanarg"
!     else
!       runasroot $outputpacman "${PACOPTS[@]}" "$pacmanarg"
!     fi
    fi
  
    # Aur update

Offline

#292 2010-02-17 05:40:59

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

How do I use nano for editing instead of vi?
I don't have vi installed. I have this set in /etc/profile:

EDITOR=nano; export $EDITOR

But still I get:

Edit fbsplash PKGBUILD with $EDITOR? [Y/n] y
/usr/bin/packer: line 284: vi: command not found
Edit fbsplash.install with $EDITOR? [Y/n] y
/usr/bin/packer: line 302: vi: command not found

~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#293 2010-02-17 05:44:56

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

See if this works:

export EDITOR=nano

Offline

#294 2010-02-17 07:52:30

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

Doesn't work. sad Still it looks for vi.

For now, I'm solving by

ln -sf /usr/bin/nano /usr/bin/vi

lol

Last edited by sHyLoCk (2010-02-17 11:31:01)


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#295 2010-02-17 12:10:47

botzoboy
Member
From: Romania/Deutschland
Registered: 2010-02-03
Posts: 90

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

I have some packages from aur who are not updated and when I do

packer -Syu

packer return me this message

:: Synchronizing aur database...

:: Starting full aur upgrade...
 local database is up to date

I also tried

packer -Syu --auronly

I get the same message.
Is there a fix to make packer to update AUR packages???

Offline

#296 2010-02-17 13:20:49

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

botzoboy wrote:

Is there a fix to make packer to update AUR packages???

Can you please provide more information?

What is the name of the package? What is the version that is installed on your computer? What is the most recent version?

Thanks!

Offline

#297 2010-02-17 13:46:19

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

export EDITOR="nano"

Works for me?

[Edit:] I added the inverted commas to "nano", as they are required.

Last edited by handy (2010-02-17 16:04:50)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#298 2010-02-17 14:27:22

MajorTom
Member
Registered: 2008-09-12
Posts: 58

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

sHyLoCk wrote:

How do I use nano for editing instead of vi?
I don't have vi installed. I have this set in /etc/profile

Don't know if it's gonna make a difference but try 'export EDITOR=nano' in ~/.bashrc (or whatever shell you use). If it still doesn't work, do the same in /root/.bashrc

Offline

#299 2010-02-17 14:41:44

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

no need to export.

EDITOR=nano packer

if you do use nano for everything though, you should probably export EDITOR and VISUAL as nano in bashrc anyway.

Offline

#300 2010-02-17 15:11:48

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: packer - New bash aur+pacman wrapper (replaces poorly written yaourt)

Still I get the vi not found error.
I have
export EDITOR=nano

in ~/.bashrc ,  /root/.bashrc and /etc/profile.
Still getting this:

/usr/bin/packer: line 284: vi: command not found

Anyway, something weird is happening in my system!
When I manually type this:

  eval ${EDITOR:-vi} PKGBUILD

nano shows up!! However when I run packer it tries to open vi! WTH! mad
I guess I can live with symlinking until I figure out what's up. sad


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

Board footer

Powered by FluxBB