Bug 579608
Summary: | multiple commands in guestfish can not work for symbol links | |||
---|---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Pengzhen Cao <pcao> | |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | |
Status: | CLOSED UPSTREAM | QA Contact: | ||
Severity: | medium | Docs Contact: | ||
Priority: | low | |||
Version: | unspecified | CC: | mbooth, meyering, pcao, qwan, virt-maint | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 579677 (view as bug list) | Environment: | ||
Last Closed: | 2010-05-12 12:24:34 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 579677 |
Description
Pengzhen Cao
2010-04-06 03:25:10 UTC
Agreed, we should make this work. In fact the problem is a simple test in the generated code, so it should be equally simple to fix, but I'll also add a regression test so it doesn't get broken in future. Actually, not so simple. Because we mount the filesystem under /sysroot in the appliance, absolute symbolic links get broken for any non-chrooted commands. Jim, any ideas on this one? Richard, I think some commands should operate on the link itself. Such as "file link1" should report link1 as a symbol link, rather than the destination it points to. And the same as ”cp“.While some commands like "equal, wc" should operate on the destination file it points to. I have tested almost 70 commands related to file and dir operations, most could work, only these reported can not work. You can make a sanity check later. And there is one thing I do not understand, "cp_a" can work on symbol links, but "cp" can not. Rich, Using sysroot_path (that you mentioned on IRC) sounds like it might work. How? (thinking out loud)... One caveat: it would have to know when to apply the transformation. Some commands require it, while others require no transformation. And what if /symlink -> /a -> /b -> /c ? Will sysroot_patch transform all of them? Patch posted upstream: https://www.redhat.com/archives/libguestfs/2010-May/msg00017.html Fixed upstream: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=07369cb77a07f965cbf8e02f485c78a22c091f85 and subsequent commits. |