archlinuxfr / yaourt

[unmaintained] A Pacman frontend with more features and AUR support
599 stars 98 forks source link

EXPORT option, bad behaviours #260

Open mattia-b89 opened 8 years ago

mattia-b89 commented 8 years ago

if I set EXPORT=1 and EXPORTDIR="/some-dir/" yaourt saves also some source file other than final package & needs write permission otherwise fails e.g. for yaourt installation is saved yaourt-1.8.1.tar.xz & yaourt-1.8.1-1-any.pkg.tar.xz

if I set EXPORT=2 yaourt saves only the final package & doesn't need write permission since it is asked with a sudo prompt e.g. for yaourt installation is saved yaourt-1.8.1-1-any.pkg.tar.xz

f2404 commented 8 years ago

@mattia-b89 For the first part of the issue - do you also have EXPORTSRC set?

mattia-b89 commented 8 years ago

@f2404 no. Because I don't want source files exported, so EXPORTSRC would be =0, that is the default options; am I wrong?

mschaefers commented 7 years ago

Same issue for me (Ver.1.8.1):

I want all aur packages built by yaourt to be placed into directory /foo while pacman will still cache its official packages into /var/cache/pacman. So setting PKGDEST for pacman is not an option.

Thus I set EXPORT=1 and EXPORTDIR=/foo and EXPORTSRC=0 (no source pacakges needed).

Problem: Source files downloaded during pkgbuild.sh are stored in /foo

I think this is because pkgbuild.sh defines variable SRCDEST=/foo, as can be seen here:

$ bash -x yaourt -Sy soapui
[...]
++ . /usr/lib/yaourt/pkgbuild.sh
+++ load_lib alpm_query
+++ [[ -n alpm_query ]]
+++ (( LOADEDLIBS[alpm_query] ))
+++ return 0
+++ Y_MAKEPKG_CHECKDEP=0
+++ PKGBUILD_ARCH_ATTRS=(source provides conflicts depends replaces optdepends makedepends checkdepends {md5,sha{1,224,256,384,512}}sums)
+++ source_makepkg_conf
+++ MAKEPKG_CONF=/etc/makepkg.conf
+++ local _BUILDDIR=
+++ local _PKGEXT=
+++ local _PKGDEST=
+++ local _SRCDEST=
+++ local _SRCPKGDEST=
+++ [[ -r /etc/makepkg.conf ]]
+++ source /etc/makepkg.conf
++++ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' 'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' 'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' 'rsync::/usr/bin/rsync --no-motd -z %u %o' 'scp::/usr/bin/scp -C %u %o')
++++ VCSCLIENTS=('bzr::bzr' 'git::git' 'hg::mercurial' 'svn::subversion')
++++ CARCH=x86_64
++++ CHOST=x86_64-pc-linux-gnu
++++ CPPFLAGS=-D_FORTIFY_SOURCE=2
++++ CFLAGS='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong'
++++ CXXFLAGS='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong'
++++ LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro
++++ DEBUG_CFLAGS='-g -fvar-tracking-assignments'
++++ DEBUG_CXXFLAGS='-g -fvar-tracking-assignments'
++++ BUILDENV=(!distcc color !ccache check !sign)
++++ OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)
++++ INTEGRITY_CHECK=(md5)
++++ STRIP_BINARIES=--strip-all
++++ STRIP_SHARED=--strip-unneeded
++++ STRIP_STATIC=--strip-debug
++++ MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
++++ DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
++++ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
++++ COMPRESSGZ=(gzip -c -f -n)
++++ COMPRESSBZ2=(bzip2 -c -f)
++++ COMPRESSXZ=(xz -c -z - --threads=0)
++++ COMPRESSLRZ=(lrzip -q)
++++ COMPRESSLZO=(lzop -q)
++++ COMPRESSZ=(compress -c -f)
++++ PKGEXT=.pkg.tar.xz
++++ SRCEXT=.src.tar.gz
+++ XDG_PACMAN_DIR=/home/mschaefers/.config/pacman
+++ [[ -r /home/mschaefers/.config/pacman/makepkg.conf ]]
+++ [[ -r /home/mschaefers/.makepkg.conf ]]
+++ [[  !distcc color !ccache check !sign  =~  check  ]]
+++ Y_MAKEPKG_CHECKDEP=1
+++ export BUILDDIR=
+++ BUILDDIR=
+++ PKGDEST=
+++ SRCDEST=
+++ export PKGDEST=/foo
+++ PKGDEST=/foo
+++ export SRCDEST=/foo
+++ SRCDEST=/foo
+++ SRCPKGDEST=
+++ SRCPKGDEST=/foo
+++ export SRCPKGDEST=/foo
+++ SRCPKGDEST=/foo
+++ export PKGEXT=.pkg.tar.xz
+++ PKGEXT=.pkg.tar.xz
[...]
$ ls -1 /foo
soapui-5.2.1-2-x86_64.pkg.tar.xz
SoapUI-5.2.1-linux-bin.tar.gz
soapui.png

Any idea on how to achieve what I want?

basinilya commented 5 years ago

In #4 they suggest to override PKGDEST in yaourtrc instead of enabling EXPORTDIR. I think this issue duplicates #4