--- makepkg 2007-06-20 23:38:43.000000000 +0200 +++ /usr/bin/makepkg 2007-06-21 11:18:42.000000000 +0200 @@ -801,7 +801,6 @@ else msg "Extracting Sources..." for netfile in "${source[@]}"; do - unziphack=0 file=$(strip_url "$netfile") if in_array "$file" ${noextract[@]}; then #skip source files in the noextract=() array @@ -813,14 +812,9 @@ unset cmd case "$file_type" in *application/x-tar*application/x-compress*) - cmd="tar -xzf $file" ;; - *application/x-tar*) - cmd="tar -xf $file" ;; - *application/x-zip*) - unziphack=1 - cmd="unzip -qqo $file" ;; - *application/x-cpio*) - cmd="bsdtar -x -f $file" ;; + cmd="bsdtar -xzf $file" ;; + *application/x-tar*|*application/x-zip*|*application/x-cpio*) + cmd="bsdtar -xf $file" ;; *application/x-gzip*) cmd="gunzip -d -f $file" ;; *application/x-bzip*) @@ -830,12 +824,9 @@ msg2 "$cmd" $cmd if [ $? -ne 0 ]; then - # unzip will return a 1 as a warning, it is not an error - if [ "$unziphack" != "1" -o $? -ne 1 ]; then - error "Failed to extract $file" - msg "Aborting..." - exit 1 - fi + error "Failed to extract $file" + msg "Aborting..." + exit 1 fi fi done @@ -995,7 +986,7 @@ # build a filelist - do this first to keep meta files out of the list msg "Generating .FILELIST file..." cd "$startdir/pkg" -tar cvf /dev/null * | sort >.FILELIST +bsdtar cf /dev/null * | sort >.FILELIST # write the .PKGINFO file msg "Generating .PKGINFO file..." @@ -1065,7 +1056,7 @@ comp_files=".PKGINFO .FILELIST ${install:+.INSTALL}" [ $have_changelog -eq 1 ] && comp_files=".CHANGELOG $comp_files" -if ! tar czf $pkg_file $comp_files *; then +if ! bsdtar czf $pkg_file $comp_files *; then error "Failed to create package file." exit 1 fi