[pacman-dev] [PATCH] makepkg: Add --noextractonly (-E) to also download/verify source files

Allan McRae allan at archlinux.org
Fri Feb 22 19:31:30 EST 2013


On 23/02/13 00:03, Olivier Brunel wrote:
> Because --noextract also implies to not download/verify source files, it wasn't
> possible to simply do just that, without either extracting and/or building. This
> option allows just that (and is therefore mostly useful with --nobuild).
> 

I really do not like the option name.  Does --noextractonly mean it
still builds?  etc...

How about naming what you are trying to do - i.e. "--verify".

<snip>

> @@ -2885,9 +2888,7 @@ mkdir -p "$srcdir"
>  chmod a-s "$srcdir"
>  cd_safe "$srcdir"
>  
> -if (( NOEXTRACT )); then
> -	warning "$(gettext "Using existing %s tree")" "src/"
> -elif (( REPKG )); then
> +if (( REPKG )); then
>  	if (( ! PKGFUNC && ! SPLITPKG )) \
>  	     && { [[ ! -d $pkgdirbase ]] || dir_is_empty "$pkgdirbase"; }; then
>  		error "$(gettext "The package directory is empty, there is nothing to repackage!")"
> @@ -2895,11 +2896,17 @@ elif (( REPKG )); then
>  		exit 1
>  	fi
>  else
> -	download_sources
> -	check_source_integrity
> -	extract_sources
> -	if (( PREPAREFUNC )); then
> -		run_prepare
> +	if (( ! NOEXTRACT )); then
> +		download_sources
> +		check_source_integrity
> +	fi
> +	if (( NOEXTRACT || NOEXTRACTONLY )); then
> +		warning "$(gettext "Using existing %s tree")" "src/"
> +	else
> +		extract_sources
> +		if (( PREPAREFUNC )); then
> +			run_prepare
> +		fi
>  	fi
>  fi
>  

This bit would just be:

else
	download_sources
	check_source_integrity
+	(( VERIFY )) && return 0
	extract sources

Allan




More information about the pacman-dev mailing list