On 09/03/13 04:25, William Giokas wrote:
> Previously makepkg would clone vcs sources in the download function,
> regardless of the noextract settings. Now the download_* functions only
> download or update the vcs sources, and the new extract_* functions just
> create working copies using the specified protocols. The extract_sources
> function will call the needed extract function for the protocol
> specified. The tarball extraction has also been moved into its own
> extract_file function to keep things consistent.
> 
> Signed-off-by: William Giokas <[email protected]>
> ---
> 
> Instead of separating out the extract functions into a separate part of
> makepkg, I just grouped them with the download_* functions. Saved quite a
> few deletions.
> 

Great - also makes it much easier to review...

>  scripts/makepkg.sh.in | 253 
> +++++++++++++++++++++++++++++++++++++-------------
>  1 file changed, 188 insertions(+), 65 deletions(-)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index c9661e9..58c403e 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -379,6 +379,59 @@ download_file() {
>       ln -s "$SRCDEST/$filename" "$srcdir/"
>  }
>  
> +extract_file() {
> +     local file=$1
> +     # fix flyspray #6246
> +     local file_type=$(file -bizL "$file")
> +     local ext=${file##*.}

<snip>

> +extract_file() {
> +     local file=$1
> +     # fix flyspray #6246
> +     local file_type=$(file -bizL "$file")
> +     local ext=${file##*.}

There is a nice duplication there...

Allan



Reply via email to