FS#18831 - "makepkg --source" does not add .install files from package_...() function
Attached to Project:
Pacman
Opened by Vlad George (DonVla) - Thursday, 25 March 2010, 16:14 GMT
Last edited by Allan McRae (Allan) - Tuesday, 11 May 2010, 22:58 GMT
Opened by Vlad George (DonVla) - Thursday, 25 March 2010, 16:14 GMT
Last edited by Allan McRae (Allan) - Tuesday, 11 May 2010, 22:58 GMT
|
Details
Summary and Info:
"makepkg --source" does not add .install files from package_...() functions Steps to Reproduce: run for example "makepkg --source" on the gcc PKGBUILD: " $ makepkg --source ==> Making package: gcc 4.4.3-1 x86_64 (Do 25. Mär 17:08:55 CET 2010) ==> Retrieving Sources... -> Found gcc-core-4.4.3.tar.bz2 in build dir -> Found gcc-g++-4.4.3.tar.bz2 in build dir -> Found gcc-fortran-4.4.3.tar.bz2 in build dir -> Found gcc-objc-4.4.3.tar.bz2 in build dir -> Found gcc-ada-4.4.3.tar.bz2 in build dir -> Found libstdc++-man.4.4.0.tar.bz2 in build dir -> Found gcc_pure64.patch in build dir -> Found gcc-hash-style-both.patch in build dir ==> Validating source files with md5sums... gcc-core-4.4.3.tar.bz2 ... Passed gcc-g++-4.4.3.tar.bz2 ... Passed gcc-fortran-4.4.3.tar.bz2 ... Passed gcc-objc-4.4.3.tar.bz2 ... Passed gcc-ada-4.4.3.tar.bz2 ... Passed libstdc++-man.4.4.0.tar.bz2 ... Passed gcc_pure64.patch ... Passed gcc-hash-style-both.patch ... Passed ==> Creating source package... -> Adding PKGBUILD... -> Adding gcc_pure64.patch... -> Adding gcc-hash-style-both.patch... -> Compressing source package... ==> Source package created: gcc (Do 25. Mär 17:08:57 CET 2010) " Though there are .install files in the directory: "$ ls *install gcc-ada.install gcc-fortran.install gcc.install gcc-libs.install" |
This task depends upon
Closed by Allan McRae (Allan)
Tuesday, 11 May 2010, 22:58 GMT
Reason for closing: Fixed
Additional comments about closing: In git: http://projects.archlinux.org/pacman.git /commit/?id=64c3255b
Tuesday, 11 May 2010, 22:58 GMT
Reason for closing: Fixed
Additional comments about closing: In git: http://projects.archlinux.org/pacman.git /commit/?id=64c3255b
No there are not _all_ install files. As I said, if the install files are defined _inside_ a package function (like "
package_gcc-libs()
{
pkgdesc="Runtime libraries shipped by GCC for C and C++ languages"
groups=('base')
depends=('glibc>=2.10.1-5')
install=gcc-libs.install
...
}
")
the gcc-libs.install file is not inside the src.tar.gz.
Here is the archive output after running "makepkg --source":
"
$ tar -tf gcc-4.4.3-1.src.tar.gz
gcc/
gcc/gcc_pure64.patch
gcc/gcc-hash-style-both.patch
gcc/PKGBUILD
"
I don't think I missed smth.
Vlad
Your patch didn't work. I got this with gcc package:
/usr/bin/makepkg: eval: line 1074: syntax error: unexpected end of file
I hope it helps fix this bug.
"
if [[ -n $installfile ]]; then
installfiles+=("$installfile")
fi
"
The parentheses are missing.
We will actually want something like:
installfiles=$(grep "^[[:space:]]*install=" PKGBUILD | sed "s#install=##")
And we need the same for changelogs. And we need this done early so the PKGBUILD can check for their existence at the start. I have the workings of a complete patch that will appear before 3.4 is release.
#if [[ -n $install ]]; then
msg2 "$(gettext "Adding install script...")"
local installfiles=$(grep "^[[:space:]]*install=" PKGBUILD | sed "s#install=##")
for installfile in ${installfiles}; do
if [[ -f $installfile ]]; then
ln -s "${startdir}/$installfile" "${srclinks}/${pkgbase}/$installfile"
else
error "$(gettext "Install scriptlet (%s) does not exist.")" "$installfile"
fi
done
#fi
I have all .install files for gcc in source package now. I also could "" to ${installfiles} since that would put string into the loop. Not exch file you want ln -s too.
"
local __INSTALLFILES=( $(grep "^[[:space:]]*install=" ${_BuildScript} | sed "s#install=##") )
if [[ -n ${__INSTALLFILES[0]} ]]; then
local __FILE
for __FILE in "${__INSTALLFILES[@]}"; do
eval __FILE=${__FILE}
if [[ -f ${__FILE} ]]; then
msg "Adding install script..."
/bin/ln -s "${__STARTDIR}/${__FILE}" "${__LOCALDIR}/"
else
error "Install script "${__FILE}" not found."
fi
done
fi
"
As I said above "eval __FILE=${__FILE}" is needed for ${pkgname}.install files.