On Fri, Dec 21, 2012 at 09:16:41PM +0200, Evaggelos Balaskas wrote: > Thats fine - that was the approach i was going too but i couldnt think > how to implement this. > Thanks for the acknowledge on github. > > I would like to discuss one more thing: > > If pacman_config file doesnt exist then exit status of Sys.command cmd is 1 > and febootstrap is trying to find this package from aur. > > eg. > $ sudo pacman --config /etc/pacman.conf2 -Sw rsync ; echo $? > error: config file /etc/pacman.conf2 could not be read. > 1 > > a fallback mechanism could be this: > > (match pacman_config with > | None -> "" > | Some filename when Sys.file_exists filename -> " --config " ^ filename > | _ -> "" > ) > > (learning ocaml through febootstrap !) > > I am not sure what the user experience should be on that. > Whats the approach on yum plugin, if the yum config doesnt exist ?
OK, I get it, you mean that the later code falls back to AUR. That could happen. I think what is needed is an explicit check earlier on, ie: fun pkg -> if not (Sys.file_exists filename) then failwith (sprintf "%s: pacman-config file does not exist" filename) else ( ... all the rest of the code ... ) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs