You are not logged in.

#301 2010-02-17 15:25:52

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

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

What happens if you change line 284 to just "$EDITOR PKGBUILD"?

Offline

#302 2010-02-17 15:56:08

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

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

That's not a solution I'm looking for. tongue
If I do packer -S packer the code will change again, so I want to find out what's causing this error externally instead of hacking the script.


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

Offline

#303 2010-02-17 16:02:58

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

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

In  /etc/profile

export EDITOR="nano"

Perhaps if the inverted commas were missing it caused the fault?


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

#304 2010-02-18 01:47:10

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

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

anonymous_user wrote:

What happens if you change line 284 to just "$EDITOR PKGBUILD"?

can't do that, would be the equivalent of writing:

$ PKGBUILD
bash: PKGBUILD: command not found

bash is strictly text replacement, the ":-vi" part means that if EDITOR is undefined, use text "vi" instead.

sHyLoCk wrote:

That's not a solution I'm looking for.
If I do packer -S packer the code will change again, so I want to find out what's causing this error externally instead of hacking the script.

sounds like either your login scripts are not being executed at all, or the EDITOR variable is being unset later on.  look at /etc/bash.bashrc, /etc/bash.bashrc.local, /etc/profile, /etc/profile.bash, /etc/profile.d/*, ~/.bashrc, ~/.profile; you could add some code to write to a temp file to assert the value of EDITOR along the way.


what am i but an extension of you?

Offline

#305 2010-02-18 02:23:24

Arm-the-Homeless
Member
Registered: 2008-12-22
Posts: 273

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

Solution:

sudo ln -s /usr/bin/nano /usr/bin/vi

tongue

Offline

#306 2010-02-18 02:42:49

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

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

Arm-the-Homeless wrote:

Solution:

sudo ln -s /usr/bin/nano /usr/bin/vi

tongue

Check Post #294
I'm faster than you tongue


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

Offline

#307 2010-02-18 09:11:25

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

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

I tried to put this

export EDITOR=nano

in ~bashrc without succes. But in this morning after I started my laptop I found that Nano is working. So after you put

export EDITOR=nano

in ~bashrc restart your computer. I hope this may help you.

Offline

#308 2010-02-18 09:20:08

kalpik
Member
From: India
Registered: 2007-05-08
Posts: 163
Website

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

OR, just do "source .bashrc"

Offline

#309 2010-02-18 18:25:52

tjwoosta
Member
Registered: 2008-12-18
Posts: 453

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

Sorry if this has been mentioned, I skimmed through the thread a didnt see anything but then again it is a long one. Anyway is there any way to make packer show me which of the packages are installed when I do a search?

Like if I do a search for vim. With yaourt it will search vim and put "INSTALLED" next to all of the packages which are already installed. With packer it doest show this.

Last edited by tjwoosta (2010-02-18 18:26:25)

Offline

#310 2010-02-18 18:53:20

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 3,523
Website

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

tjwoosta wrote:

Sorry if this has been mentioned, I skimmed through the thread a didnt see anything but then again it is a long one. Anyway is there any way to make packer show me which of the packages are installed when I do a search?

Like if I do a search for vim. With yaourt it will search vim and put "INSTALLED" next to all of the packages which are already installed. With packer it doest show this.

Yeah, it's been talked about kind of a lot. No one's really found a way to do it really quickly, but some people still have some ideas about ways to do it.

Offline

#311 2010-02-18 20:18:48

milomak
Member
Registered: 2009-11-04
Posts: 49

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

the one thing i love about yaourt is that it tells you which package is installed. which is really important, i think, when you are playing in the aur space. The Out of Date flag is also very useful.

Last edited by milomak (2010-02-18 20:19:07)

Offline

#312 2010-02-18 22:11:59

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 3,523
Website

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

milomak wrote:

the one thing i love about yaourt is that it tells you which package is installed. which is really important, i think, when you are playing in the aur space. The Out of Date flag is also very useful.

Oh no, it's like this thread is going in circles! tongue

Here is the official response from the author: http://bbs.archlinux.org/viewtopic.php? … 07#p691807 You can follow the thread from there to learn more about the problem.

Offline

#313 2010-02-19 01:09:17

MajorTom
Member
From: Canada, GTA
Registered: 2008-09-12
Posts: 58

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

The 'installed' status is one of the first things noticed when switching to packer from yaourt. It's understandable.
I suppose to make everyone happy Matt would need to include something like --installed switch to do this. Then, those who don't mind the performance hit would simply alias packer='packer --installed'.

Offline

#314 2010-02-19 17:21:43

Bregol
Member
Registered: 2008-08-15
Posts: 175

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

Or make it a -v flag or to give verbose search output (installed, aur votes, out-of-date). That way you can do a fast search like it does now, or you can turn up the verbosity and get more search info at the cost of some speed. Not to keep this thread going in circles, but I agree that an optional flag would be the way to keep the ability for fast searches, while at the same time drawing in people like me who have a hard time giving up yaourt because of the extra info it gives.


Nai haryuvalyë melwa rë

Offline

#315 2010-02-19 18:37:52

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

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

patch to add [INSTALLED] to -Ss output:

--- a/packer 2010-02-20 03:52:54.652968727 -0600
+++ b/packer  2010-02-20 03:19:34.566502119 -0600
@@ -640,11 +640,6 @@
     description=( $(grep -F '"Description":"' "$parsefile" | sed -e 's/^"Description":"//' -e 's/"$/ /') )
   fi
   aurtotal="${#aurname[@]}"
+  while read x; do
+    eval ${x}
+  done < <({ tr " " "\n" | grep -n -f <(pacman -Qq | sed -e "s,.*,^\\0\$,g") |
+             sed -e "s,^\([0-9]*\):\(.*\),aur_inst[\\1]=\" [INSTALLED]\",g"; } \
+             <<<${aurname[*]})

   # Echo out the -Ss formatted package information
   if [[ $option = search ]]; then
@@ -654,7 +649,7 @@
       done
     else
       for ((i=0 ; i<$aurtotal ; i++)); do
-        echo -e "${COLOR3}aur/${COLOR1}${aurname[$i]} ${COLOR2}${version[$i]}${ENDCOLOR}\n    ${description[$i]}"
+        echo -e "${COLOR3}aur/${COLOR1}${aurname[$i]} ${COLOR2}${version[$i]}${ENDCOLOR}${aur_inst[${i}+1]}\n    ${description[$i]}"
       done
     fi
   else

this isn't the best way, and prob has flaws, but it only queries pacman once... there is no reason to query pacman over and over for each match.  the better way would probably be to use the "comm" command along with some changes elsewhere.  however, this way creates a truncated version of the ${aurname} array, where the index is +1 to ${aurname}... this means you dont even have to test for it when actually outputting.

EXAMPLE:

$ packer -Ss --auronly btrfs                      
aur/btrfs-progs 0.19-4                                                   
    Btrfs filesystem utilities                                           
aur/btrfs-git 20081227-1                                                 
    A Checksumming Copy on Write Filesystem                              
aur/btrfs-progs-git 20081227-1 [INSTALLED]                               
    Btrfs filesystem utilities                                           
aur/mkinitcpio-btrfs 0.1-3 [INSTALLED]                                   
    Extensive hook for operations on a BTRFS based root device

[UPDATE] bug in regex would have quietly failed after 9 matches.  did away with second grep call; use ${aurname} directly instead

Last edited by extofme (2010-02-21 00:22:40)


what am i but an extension of you?

Offline

#316 2010-02-19 21:33:50

r6
Member
From: Melbourne
Registered: 2008-07-02
Posts: 155

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

extofme, you can use pacman -Qq instead of pacman -Q | cut -d " ".

The patch works great and should be implemented in my opinion.

Last edited by r6 (2010-02-19 21:35:00)

Offline

#317 2010-02-19 23:15:13

bruenig
Member
Registered: 2007-05-20
Posts: 175

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

Ok guys. I will add [installed] support and then see just how much slower it really is and paste the results. Then you other hackers can look at the code and make it faster and we will see if it ever gets to a point where it isn't a disaster. (by the way, pacman output never tells us whether packages are installed, and no one seems to have been messed up by that!)

extofme, that is some crazy shit you have hacked together there. Could you tell me if it works on cases like this:

Let's say I the package is 'vim' and I have 'vim-foo' installed. Will that be counted as a match or not? This is something I kept having problems with when trying to do big mass matching like that.

Last edited by bruenig (2010-02-19 23:18:36)

Offline

#318 2010-02-19 23:19:57

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 3,523
Website

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

I think I found a bug in the "installed" patch.

I tried the patch and the patch to the patch. It tells me what packages I have installed from the AUR, but not from the main repositories.

Offline

#319 2010-02-19 23:30:24

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

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

r6 wrote:

... you can use pacman -Qq instead of pacman -Q | cut -d " ".

right on, thanx updated

drcouzelis wrote:

I tried the patch and the patch to the patch. It tells me what packages I have installed from the AUR, but not from the main repositories.

your prob right.  that was just some crackerjack shiz i put together in 5 min.  i just searched for "aur/"; you would need more changes somewhere else for that.

bruenig wrote:

Let's say I the package is 'vim' and I have 'vim-foo' installed. Will that be counted as a match or not?

yeah it handles that.  i did have that problem, but this part:

... <(pacman -Qq | sed -e "s,.*,^\\0\$,g") ...

changes the regexes sent to the outside grep from:

vim
vim-foo

to:

^vim$
^vim-foo$

where ^ matches [BEGIN LINE] and $ matches [END LINE]

Last edited by extofme (2010-02-20 09:14:03)


what am i but an extension of you?

Offline

#320 2010-02-20 09:57:57

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

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

for the sake of thoroughness, there was a bug and it should be faster/cleaner now.  see [UPDATE] @ end of post


what am i but an extension of you?

Offline

#321 2010-02-20 10:21:55

kaivalagi
Member
From: Norwich, UK
Registered: 2009-11-05
Posts: 145

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

Can this [installed] status code be initiated by way of a switch, so if you don't want it to slow things down then don't ask packer to output it? There would be an extra check for the switch worst case...Just a thought

Edit: Just saw this:

Bregol wrote:

Or make it a -v flag or to give verbose search output (installed, aur votes, out-of-date). That way you can do a fast search like it does now, or you can turn up the verbosity and get more search info at the cost of some speed. Not to keep this thread going in circles, but I agree that an optional flag would be the way to keep the ability for fast searches, while at the same time drawing in people like me who have a hard time giving up yaourt because of the extra info it gives.

+1 smile

Last edited by kaivalagi (2010-02-20 10:24:07)


Running Arch 64 (Made the switch to Arch 10/2009)
AUR | BZR

Offline

#322 2010-02-21 00:07:03

venky80
Member
Registered: 2007-05-13
Posts: 996

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

is this hosted in any repository?


DELL XPS 1640 with ATI Mobility Radeon  HD 3670. Arch Linux KDE Minimal Install

Offline

#323 2010-02-21 21:04:26

MajorTom
Member
From: Canada, GTA
Registered: 2008-09-12
Posts: 58

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

venky80 wrote:

is this hosted in any repository?

I don't think it is but there really is no need for that:

$ wget http://aur.archlinux.org/packages/packe … r/PKGBUILD
$ makepkg
$ pacman -U packer*

Offline

#324 2010-02-23 08:43:26

kaivalagi
Member
From: Norwich, UK
Registered: 2009-11-05
Posts: 145

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

venky80 wrote:

is this hosted in any repository?

If you don't have an existing tool for AUR installs then follow MajorTom's instructions, if you have yaourt or similar then you can installed packer using it e.g. "yaourt -S packer"

Don't forget to reinstall packer from time to time also, just run "packer -S packer"

Last edited by kaivalagi (2010-02-23 08:44:30)


Running Arch 64 (Made the switch to Arch 10/2009)
AUR | BZR

Offline

#325 2010-02-24 03:07:29

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

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

When installing a package from the AUR, would it be possible to show the sizes of the package and dependencies?

Last edited by anonymous_user (2010-02-24 03:07:46)

Offline

Board footer

Powered by FluxBB