support for diff and -0
[build.git] / build.common
index 9886aa3..477b52f 100644 (file)
@@ -240,12 +240,19 @@ function pl_root_mkfedora () {
     # formerly related to mkfedora -k
     pkgs_kexcludes=$(pl_parsePkgs kexclude $fcdistro $pldistro $pkgsfile)
     # get mirrors if not specified with -l
-    if [ -n "$mirrors" ] ; then
-       mirrors=$(pl_parsePkgs mirror $fcdistro $pldistro "$pldistro.mirrors")
+    if [ -z "$mirrors" ] ; then
+       mirrorsfile=$(pl_locateDistroFile ../build/ $pldistro "$pldistro.mirrors")
+       mirrors=$(pl_parsePkgs mirror $fcdistro $pldistro $mirrorsfile)
     fi
 
     exclude_kernel=""
-    [ -n "$pkgs_kexcludes" ] && exclude_kernel="exclude=$pkgs_excludes"
+    # add them manually as the output of pl_parsePkgs is line-separated
+    if [ -n "$pkgs_kexcludes" ] ; then
+       exclude_kernel="exclude="
+       for kexclude in $pkgs_kexcludes ; do
+           exclude_kernel="$exclude_kernel $kexclude"
+       done
+    fi
 
     function mkfedora_fetch ()
     {