[pacman-dev] [PATCH] Fix creation of source packages
Source packages were getting created with only links to local source files. Caused by commit 5cddcc90. Also, fix error when install and changelog files are in the source array. Caused by commit fe1e3471. Thanks to Christopher Rogers <slaxemulator@gmail.com> for pointing out areas that were failing. Signed-off-by: Allan McRae <allan@archlinux.org> --- scripts/makepkg.sh.in | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 8d6d1f6..86984db 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1096,7 +1096,7 @@ create_srcpackage() { for file in "${source[@]}"; do if [[ -f $file ]]; then msg2 "$(gettext "Adding %s...")" "$file" - ln -s "$file" "$srclinks/$pkgbase" + ln -s "${startdir}/$file" "$srclinks/$pkgbase" elif (( SOURCEONLY == 2 )); then local absfile=$(get_filepath "$file") || missing_source_file "$file" msg2 "$(gettext "Adding %s...")" "${absfile##*/}" @@ -1110,9 +1110,9 @@ create_srcpackage() { local file for file in ${!i}; do # evaluate any bash variables used - eval file='${srclinks}/${pkgbase}/'${file} - if [[ ! -f $file ]]; then - msg2 "$(gettext "Adding %s file (%s)...")" "$i" "${file##*/}" + eval file=${file} + if [[ ! -f "${srclinks}/${pkgbase}/$file" ]]; then + msg2 "$(gettext "Adding %s file (%s)...")" "$i" "${file}" ln -s "${startdir}/$file" "${srclinks}/${pkgbase}/" fi done -- 1.7.1
On Tue, Jun 8, 2010 at 11:23 PM, Allan McRae <allan@archlinux.org> wrote:
Also, fix error when install and changelog files are in the source array. Caused by commit fe1e3471.
Just to make sure... are .install files even supposed to be in the source array? If so, what's the point? If it's for sum checks then they should be added automatically by makepkg. Not to imply that I did this willingly ;) Andres P
On 09/06/10 13:53, Allan McRae wrote:
Source packages were getting created with only links to local source files. Caused by commit 5cddcc90.
Also, fix error when install and changelog files are in the source array. Caused by commit fe1e3471.
That description is not quite right. The install and changelog files were symlinks in the source package too, but the suggested fix caused a regression when install and changelog files were in source array. I fixed the description on my working branch. Funny thing is, almost the exactly same error was present in the 3.2 release... Allan
On 09.06.2010 05:53, Allan McRae wrote:
Source packages were getting created with only links to local source files. Caused by commit 5cddcc90.
Wow, I managed to sneak in a bug in the last iteration and instead of fixing --allsource it broke source package creation completely. :D Thanks for finding and fixing this before the release. I think I've only checked if the file existed (bsdtar tf) in the last iteration. However, I've also expected bsdtar to warn of dangling symlinks when using the -L option. Maybe it is supposed to do so, but if not, we may want to add --check-links (-l) when that option is fixed[1]. [1] http://code.google.com/p/libarchive/issues/detail?id=82
participants (3)
-
Allan McRae
-
Andres P
-
Cedric Staniewski