summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_install.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-09-03 19:14:40 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-09-03 19:14:40 (GMT)
commit7b6653a5a0c1b09fa40b365237afe9ad39af7aac (patch)
tree7854ca1ca0fe1f627ab0d324bcf1545c0d778e28 /abs/core/LinHES-config/mv_install.py
parent792fe4f02805a49f664044624762c3b415671d54 (diff)
downloadlinhes_pkgbuild-7b6653a5a0c1b09fa40b365237afe9ad39af7aac.zip
linhes_pkgbuild-7b6653a5a0c1b09fa40b365237afe9ad39af7aac.tar.gz
linhes_pkgbuild-7b6653a5a0c1b09fa40b365237afe9ad39af7aac.tar.bz2
LinHES-config: mv_install move pacman cache to /data/storage/disk0/pacman/pkg
Diffstat (limited to 'abs/core/LinHES-config/mv_install.py')
-rwxr-xr-xabs/core/LinHES-config/mv_install.py118
1 files changed, 35 insertions, 83 deletions
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py
index dab576d..70f6604 100755
--- a/abs/core/LinHES-config/mv_install.py
+++ b/abs/core/LinHES-config/mv_install.py
@@ -523,94 +523,43 @@ def create_squashlist():
f.close()
def mount_for_copy_it():
+ mounts = {}
+
+ mounts['/image_mount/root'] = 'root-image'
+ mounts['/image_mount/usr/share'] = 'usr-share'
+ mounts['/image_mount/lib/modules'] = 'lib-modules'
+ mounts['/image_mount/var/lib/pacman'] = 'var-lib-pacman'
+ mounts['/image_mount/data/storage/disk0/pacman/pkg'] = 'data-storage-disk0-pacman-pkg'
+ #mounts['/image_mount/var/cache/pacman'] = 'var-cache-pacman'
+ for image_mount, fsimage in mounts.iteritems():
+ try:
+ os.makedirs(image_mount)
+ except:
+ pass
+ cmd = 'mount /run/archiso/sfs/%s/%s.fs %s' %(fsimage,fsimage,image_mount)
+ rc = runcmd(cmd)[0]
+ if rc != 0 :
+ error_out("Mount image %s" %fsimage)
- image_mount='/image_mount/root'
- try:
- os.makedirs(image_mount)
- except:
- pass
- image_mount='/image_mount/root'
-
- image_mount='/image_mount/usr/share'
- try:
- os.makedirs(image_mount)
- except:
- pass
-
- image_mount='/image_mount/lib/modules'
- try:
- os.makedirs(image_mount)
- except:
- pass
-
- image_mount='/image_mount/var/cache/pacman'
- try:
- os.makedirs(image_mount)
- except:
- pass
-
- image_mount='/image_mount/var/lib/pacman'
- try:
- os.makedirs(image_mount)
- except:
- pass
-
- fsimage='root-image'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/root' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image root")
-
- fsimage='lib-modules'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/lib/modules' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image lib-modules")
-
- fsimage='usr-share'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/usr/share' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image usr share")
-
- fsimage='var-lib-pacman'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/var/lib/pacman' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image var-lib-pacman")
- fsimage='var-cache-pacman'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/var/cache/pacman' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image var-cahce-pacman")
def umount_for_copy_it():
- cmd='umount %s' %('/image_mount/lib/modules')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image lib_modules")
-
- cmd='umount %s' %('/image_mount/usr/share')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image usr_share")
-
- cmd='umount %s' %('/image_mount/root')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image /")
-
- cmd='umount %s' %('/image_mount/var/cache/pacman')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image var-cache-pacman")
+ mounts = {}
+
+ mounts['/image_mount/root'] = 'root-image'
+ mounts['/image_mount/usr/share'] = 'usr-share'
+ mounts['/image_mount/lib/modules'] = 'lib-modules'
+ mounts['/image_mount/var/lib/pacman'] = 'var-lib-pacman'
+ mounts['/image_mount/data/storage/disk0/pacman/pkg'] = 'data-storage-disk0-pacman-pkg'
+ #mounts['/image_mount/var/cache/pacman'] = 'var-cache-pacman'
+ for image_mount, fsimage in mounts.iteritems():
+ cmd = 'mount /run/archiso/sfs/%s/%s.fs %s' %(fsimage,fsimage,image_mount)
+ cmd='umount %s' %(image_mount)
+ rc = runcmd(cmd)[0]
+ if rc != 0 :
+ error_out("unMount image %s" %image_mount)
- cmd='umount %s' %('/image_mount/var/lib/pacman')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image var-lib-pacman")
@@ -623,7 +572,9 @@ def copy_it(install_type):
cmdlist = ['rsync -arp /image_mount/root/* /new_boot',
'rsync -arp /image_mount/lib/* /new_boot/lib/',
'rsync -arp /image_mount/usr /new_boot',
- 'rsync -arp /image_mount/var /new_boot']
+ 'rsync -arp /image_mount/var /new_boot',
+ 'rsync -arp /image_mount/data/storage/disk0/* /new_boot/data/storage/disk0/'
+ ]
for cmd in cmdlist:
rc = runcmd(cmd)[0]
@@ -678,6 +629,7 @@ def copy_it(install_type):
runcmd(cmd)
cmd = "chmod +s %s/bin/mount" %(data_config.MOUNTPOINT)
runcmd(cmd)
+ #sys.exit(3)
apply_pristine()
post_process()