Description of problem: if we aug-defvar a variable and use it with aug-ls, the aug-ls returns with an error saying that it does not recognize the argument. Version-Release number of selected component (if applicable): 1.0.89, on a Fedora 12 x86_64 box. How reproducible: Always Steps to Reproduce: 1. prepare a linux guest image (which has a /etc/passwd file in it), say test.img 2. run the following guestfish commands in sequence: $ guestfish -a test.img <<EOF run mount /dev/vda1 / aug-init / 0 aug-defvar var /files/etc/passwd/root aug-ls $var EOF Actual results: libguestfs: error: aug_ls: do_aug_ls: path must start with a / character Expected results: we are supposed to get same output as aug-ls /files/etc/passwd/root Additional info: It seems that same problem does not apply to aug-get and aug-match. I tried augtool from my host, the ls command recognizes variables perfectly.
Sorry, I forgot about the shell expansion, the reproducing step 2 should be $ guestfish -a test.img <<\EOF run mount /dev/vda1 / aug-init / 0 aug-defvar var /files/etc/passwd/root aug-ls $var EOF (adding backslash before EOF prevents the $var from being expanded by the shell). and here's comparison among output of aug-get, aug-match and aug-ls, ... ><fs> aug-defvar var /files/etc/passwd/root ><fs> aug-get $var/home /root ><fs> aug-match $var/* /files/etc/passwd/root/password /files/etc/passwd/root/uid /files/etc/passwd/root/gid /files/etc/passwd/root/name /files/etc/passwd/root/home /files/etc/passwd/root/shell ><fs> aug-ls $var libguestfs: error: aug_ls: do_aug_ls: path must start with a / character
Upstream: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=d1dd00606d0b5b1430598e5092b017aa15d9ee11 ><fs> aug-defvar var /files/etc/passwd 1 ><fs> aug-ls $var /files/etc/passwd/adm /files/etc/passwd/apache /files/etc/passwd/avahi /files/etc/passwd/avahi-autoipd The downside to this change is that aug-ls has no way to tell if the path is not correct, eg: ><fs> aug-ls foobar ><fs>
libguestfs-1.2.2-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/libguestfs-1.2.2-1.fc13
libguestfs-1.2.2-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.