Skip to content
Snippets Groups Projects

fix(makechrootpkg): pass --noprepare when downloading sources

The first makepkg invocation is broken if $BUILDDIR is set in chroot's makepkg.conf, and especially if that $BUILDDIR happens to point to the same (persistent) directory that is later bind-mounted to /build.

This way, the results of running prepare() with $srcdir=A are reused when running build() with $srcdir=B and if the build system is non-trivial everything breaks.

Try to mitigate this by not running prepare() in the first invocation.

Edited by Ivan Shapovalov

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ivan Shapovalov changed the description

    changed the description

  • I'm not sure I do understand the context of this proposal. Currently the usage of --verifysource sets the makepkg mode to VERIFYSOURCE=1 which means makepkg will exit right after verifying the sources:

    if (( !REPKG )); then
    	if (( NOEXTRACT && ! VERIFYSOURCE )); then
    		warning "$(gettext "Using existing %s tree")" "\$srcdir/"
    	else
    		download_sources
    		check_source_integrity
    		(( VERIFYSOURCE )) && exit $E_OK
    		if (( CLEANBUILD )); then
    			msg "$(gettext "Removing existing %s directory...")" "\$srcdir/"
    			rm -rf "$srcdir"
    			mkdir -p "$srcdir"
    			chmod a-s "$srcdir"
    		fi
    
    		cd_safe "$srcdir"
    		extract_sources
    		if (( PREPAREFUNC )); then
    			run_prepare
    		fi

    Maybe its just me, but currently I fail to understand what effect the proposed change would have as run_prepare will not be executed when running with VERIFYSOURCE=1

  • closing as unresponsive

  • closed

Please register or sign in to reply
Loading