Old moblin_yum.py has a bug that failed to clean up the RPM db before
rebuilding it, thus the project setup failed on platforms that use a
different db with that of moblin2 (such as IA64/Intel 64 and
cutting-edge version of Debian/Ubuntu).  This is due to wrong use of
bash pathname expansion, which must be quoted and sent to "bash -c" in
order to be expanded inside the chroot.
---
 libs/moblin_yum.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/libs/moblin_yum.py b/libs/moblin_yum.py
index 6827938..4e32e35 100644
--- a/libs/moblin_yum.py
+++ b/libs/moblin_yum.py
@@ -143,11 +143,10 @@ class YumPackageManager(moblin_pkgbase.PackageManager):
         return result
 
     def resetPackageDB(self, chroot_dir, callback):
-        """reset rpm database to deal with case of running in IA64"""
-
-        """ due to unknown reason execChrootCommand doesn't work on wide-match 
symbol"""
-        #FIXME
-        command = "/usr/sbin/chroot %s rm -fr /var/lib/rpm/*db*" % (chroot_dir)
+        """reset rpm database to deal with case of different db
+           versions of rpm inside/outside chroot, such as building on
+           IA64/Intel 64"""
+        command = "/usr/sbin/chroot %s bash -c \"rm -fr /var/lib/rpm/*db*\"" % 
(chroot_dir)
         print _("Running command: %s") % (command)
         os.system(command)
         command = "rpm --rebuilddb"
-- 
1.5.6.5


-- 
Best regards,
Li, Yan

Intel Opensource Technology Center
Tel: +86-10-82171695

_______________________________________________
Moblin dev Mailing List
[email protected]

To manage or unsubscribe from this mailing list visit:
https://lists.moblin.org/mailman/listinfo/dev or your user account on 
http://moblin.org once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to