diff options
author | Richard Jones <rjones@redhat.com> | 2010-01-26 10:45:14 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-01-27 16:22:19 +0000 |
commit | 214babb060d9e85e72bad4633310a9b4a5fcb9dd (patch) | |
tree | 40a0f470ea9708aaa2cb8386c15221aeda2b01bf /src/guestfs.c | |
parent | 7de6391695120cb1cfc3b77a497d6cf235a453a7 (diff) | |
download | libguestfs-214babb060d9e85e72bad4633310a9b4a5fcb9dd.tar.gz libguestfs-214babb060d9e85e72bad4633310a9b4a5fcb9dd.tar.xz libguestfs-214babb060d9e85e72bad4633310a9b4a5fcb9dd.zip |
supermin: Prevent multilib corruption (RHBZ#558593).
On some combination of installing, upgrading and removing the base
libguestfs package on x86_64, multilib can corrupt libguestfs by
leaving a copy of /usr/bin/libguestfs-supermin-helper around which
references the wrong architecture (usually, contains links to the
i386-based appliance, when the x86_64 appliance should be constructed).
This commit changes libguestfs-supermin-helper so that the script is
the same on all architectures. Instead, the library passes the
differences to the script (eg. $host_cpu). Because the i386 and
x86_64 libraries should be at different locations (/usr/lib vs
/usr/lib64) this should prevent multilib from screwing things up.
Related links:
https://bugzilla.redhat.com/show_bug.cgi?id=558593
http://rwmj.wordpress.com/2009/11/16/please-someone-shoot-multilib/#content
https://bugzilla.redhat.com/show_bug.cgi?id=235752
Diffstat (limited to 'src/guestfs.c')
-rw-r--r-- | src/guestfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/guestfs.c b/src/guestfs.c index a3d27620..1d6d40bf 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -1,5 +1,5 @@ /* libguestfs - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009-2010 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1506,9 +1506,11 @@ build_supermin_appliance (guestfs_h *g, const char *path, snprintf (cmd, sizeof cmd, "PATH='%s':$PATH " - "libguestfs-supermin-helper '%s' %s %s", + "libguestfs-supermin-helper '%s' " host_cpu " " REPO " %s %s", path, path, *kernel, *initrd); + if (g->verbose) + print_timestamped_message (g, "%s", cmd); r = system (cmd); if (r == -1 || WEXITSTATUS(r) != 0) { |