You are not logged in.

#1 2014-11-24 12:54:01

josealberto4444
Member
Registered: 2014-06-17
Posts: 14

[SOLVED] yaourt seems not to manage cache correctly

Firstly, I'll tell you that I put these options in /etc/yaourtrc to make yaourt save a copy of all the packages:

# Build
EXPORT=1
EXPORTDIR="/var/cache/pacman/pkg-local"

as it's written in the wiki. The problem is that, for example, when I try to update telegram-desktop, I always get an error like this:

==> Validating source files with md5sums...
    telegram-desktop.tar.xz ... FAILED
    telegram.svg ... Passed
    telegram ... Passed
    telegram.desktop ... Passed
==> ERROR: One or more files did not pass the validity check!
==> ERROR: Makepkg was unable to build telegram-desktop.

ans that's because, last time I updated telegram-desktop, yaourt exported the package into the cache as these two files:

# ls /var/cache/pacman/pkg-local/telegram*
/var/cache/pacman/pkg-local/telegram-desktop-0.6.11-1-x86_64.pkg.tar.xz  /var/cache/pacman/pkg-local/telegram-desktop.tar.xz

but I think the second one (without version numbers) should be a temporary file that should disappear after the installation in order to let yaourt download it again from the AUR (as I told before, the problem is that that file corresponds to an old version; indeed yaourt doesn't download anything when you try to update, it thinks it's already downloaded and checks the md5sum, which is wrong, obviously). Removing the file /var/cache/pacman/pkg-local/telegram-desktop.tar.xz lets yaourt update.

What should I do to solve this? Is it a matter of yaourt or of telegram-desktop?

Last edited by josealberto4444 (2014-11-26 22:54:09)

Offline

#2 2014-11-24 13:02:08

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,375

Re: [SOLVED] yaourt seems not to manage cache correctly

What are the permissions on pkg-local?


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2014-11-24 13:19:41

josealberto4444
Member
Registered: 2014-06-17
Posts: 14

Re: [SOLVED] yaourt seems not to manage cache correctly

I did

# mkdir -p /var/cache/pacman/pkg-local
# chmod 777 /var/cache/pacman/pkg-local

(I forgot to say), as doing it with 766 (as wiki says) didn't allow me to run yaourt as a normal user.

Offline

#4 2014-11-24 15:15:28

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,375

Re: [SOLVED] yaourt seems not to manage cache correctly

josealberto4444 wrote:

I did

# mkdir -p /var/cache/pacman/pkg-local
# chmod 777 /var/cache/pacman/pkg-local

(I forgot to say), as doing it with 766 (as wiki says) didn't allow me to run yaourt as a normal user.

The owner is probably root, and when yaourt is making packages it is assigned to the user who's making the package when in /tmp.  Yaourt -G <package> and makepkg is the preferred way to do what you're trying to do.  Then if you have user or group permissions (not recommended you have a leak in security), you can copy the produced packages back into the normal package cache.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#5 2014-11-24 16:01:32

josealberto4444
Member
Registered: 2014-06-17
Posts: 14

Re: [SOLVED] yaourt seems not to manage cache correctly

But I want to simply type yaourt -S <pachage> and install it and save a copy there. If I do it as a normal user, it doesn't save a copy in that folder without putting wrong permissions, and if I do it as root, I get a warning  from yaourt telling me that building a package as root is dangerous. Why does the wiki offer a solution that doesn't work without a warning? There is no other way to do it?

Offline

#6 2014-11-24 16:40:05

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [SOLVED] yaourt seems not to manage cache correctly

see man page
For more details visit yaourt website
I doubt there're problems with permissions. Yaourt is run by sudo, therefore you have admin permissions.


do it good first, it will be faster than do it twice the saint wink

Offline

#7 2014-11-24 17:49:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,788
Website

Re: [SOLVED] yaourt seems not to manage cache correctly

josealberto4444 wrote:

Why does the wiki offer a solution that doesn't work without a warning? There is no other way to do it?

Yaourt is not offically supported.  Some of the advice on installing and using yaourt can even be harmful - such issues should be reported to archlinux.fr for consideration.

There are *many* other ways to install AUR packages.  Makepkg is officially supported and works perfectly.  There are even many AUR helpers that do help streamline without encouraging silly and often dangerous practices.  (I personally user cower, but there are many other good ones).

In contrast to the previous post  - if you do opt to stay with yaourt, do not run it with sudo.  That will make it even easier to break things.

Last edited by Trilby (2014-11-24 18:43:59)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#8 2014-11-24 17:56:06

czubek
Banned
Registered: 2012-03-08
Posts: 141

Re: [SOLVED] yaourt seems not to manage cache correctly

I use and like packer very much. I use the following update command:

sudo packer -Syu

It checks the usual repositories and then checks AUR. It has done several updates to the AUR packages I have installed.

Offline

#9 2014-11-24 17:56:53

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,737

Re: [SOLVED] yaourt seems not to manage cache correctly

Trilby wrote:
josealberto4444 wrote:

Why does the wiki offer a solution that doesn't work without a warning? There is no other way to do it?

Yaourt is not offically supported.  (and frankly it is utter crap that is more likely to completely break your system than help you install anything).

I'm tired of seeing this. If you're going to make a statement, back it up with facts, not FUD. Yaourt had problems in the past, but it's been very stable for a few years now.

@josealberto4444, did you set SRCDEST in makepkg.conf?

Last edited by Scimmia (2014-11-24 18:08:08)

Online

#10 2014-11-24 18:04:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,788
Website

Re: [SOLVED] yaourt seems not to manage cache correctly

I run into evidence every day around here.  One peice that's been criticized over and over and they have never changed is that they recommend running pacman -Sy <packages> here.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#11 2014-11-24 18:09:21

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,737

Re: [SOLVED] yaourt seems not to manage cache correctly

Oh, I agree the repo is crap. That doesn't mean that yaourt is.

Online

#12 2014-11-24 18:45:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,788
Website

Re: [SOLVED] yaourt seems not to manage cache correctly

My appologies.  I have a strong distaste for how yaourt is marketted to new users.  Scimmia is correct that this should not be conveyed as a criticism of the software as a whole and so I've removed much of that from my previous post.  But if the OP of this thread is new to using the AUR, which seems to be the case, I would still suggest not using yaourt (yet).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#13 2014-11-25 12:54:45

josealberto4444
Member
Registered: 2014-06-17
Posts: 14

Re: [SOLVED] yaourt seems not to manage cache correctly

Trilby wrote:

But if the OP of this thread is new to using the AUR, which seems to be the case, I would still suggest not using yaourt (yet).

Hmm... I've been using yaourt to install things from the AUR since the first day in Arch, more or less, one year ago, and I had no problems until I change that to have a copy of the installers. I thank you very much for your suggestions, I'll take a look at those packages (the one you said and the others) and I'll look for their advantages and disadvantages, but when I have time (wich seems to be in some months).

Scimmia wrote:

@josealberto4444, did you set SRCDEST in makepkg.conf?

As an answer of this and the final solution (I hope), I put EXPORT=1 and removed $EXPORTDIR in /etc/yaourtrc, created ~/.packages and ~/.makepkg.conf with PKGDEST=~/.packages, moved all the files in /var/cache/pacman/pkg-local to ~/.packages, changed the ownership to me and removed /var/cache/pacman/pkg-local with its changed permissions and problems. Let's see how it works in the next update. I think it should work and fixes the problem with the security due to the changed permissions. I'll post here when I update any package using yaourt with new problems or the solved tag, haha.

Thanks to all wink

Edit: It worked perfectly, I put the tag [SOLVED].

Last edited by josealberto4444 (2014-11-26 22:54:27)

Offline

Board footer

Powered by FluxBB