Browse code

Specify dbpath (needed for ova rpm installs)

Vinay Kulkarni authored on 2015/06/30 11:11:13
Showing 3 changed files
... ...
@@ -210,6 +210,7 @@ class Installer(object):
210 210
         os.environ["RPMROOT"] = self.rpm_path
211 211
         rpm_params = rpm_params + ' --force '
212 212
         rpm_params = rpm_params + ' --root ' + self.photon_root
213
+        rpm_params = rpm_params + ' --dbpath /var/lib/rpm '
213 214
 
214 215
         if ('type' in self.install_config and (self.install_config['type'] in ['micro', 'minimal'])) or self.install_config['iso_system']:
215 216
             rpm_params = rpm_params + ' --excludedocs '
... ...
@@ -108,6 +108,7 @@ rm -rf ${BUILDROOT}/LOGS
108 108
 
109 109
 #Remove our rpm database as it fills up the ramdisk
110 110
 rm -rf ${BUILDROOT}/home/*
111
+rm -rf ${BUILDROOT}/var/lib/rpm
111 112
 # TODO: mbassiouny, Find a clean way to do that
112 113
 for i in `ls ${BUILDROOT}/usr/share/`; do
113 114
 	if [ $i != 'terminfo' -a $i != 'cracklib' -a $i != 'grub' ]; then
... ...
@@ -38,7 +38,7 @@ cd ${BUILDROOT} || fail "${PRGNAME}: Change directory: ${BUILDROOT}: FAILURE"
38 38
 mkdir -p LOGS
39 39
 RPMPKG="$(find RPMS -name 'filesystem-[0-9]*.rpm' -print)"
40 40
 [ -z ${RPMPKG} ] && fail "	Filesystem rpm package missing: Can not continue"
41
-run_command "	Installing filesystem" "rpm -Uvh --nodeps --root ${BUILDROOT} ${RPMPKG}" "LOGS/filesystem.completed"
41
+run_command "	Installing filesystem" "rpm -Uvh --nodeps --root ${BUILDROOT} --dbpath /var/lib/rpm ${RPMPKG}" "LOGS/filesystem.completed"
42 42
 
43 43
 # 	Ommited in the filesystem.spec file - not needed for booting
44 44
 [ -e ${BUILDROOT}/dev/console ]	|| mknod -m 600 ${BUILDROOT}/dev/console c 5 1