Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

contents: Fix up some UsrMove bugs

We don't want to overwrite binaries with symlinks to the old binary
location.
  • Loading branch information...
commit 2ecded006b59455e3e55bbdd029ea089a1e1eddf 1 parent 9d6abb5
Colin Walters authored July 17, 2013
29  meta-gnomeos/classes/gnomeos-contents.bbclass
@@ -7,8 +7,6 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
7 7
 
8 8
 inherit rootfs_${IMAGE_PKGTYPE}
9 9
 
10  
-OSTREE_ROOTFS_KERNEL_VERSION = "3.6.0-gnome-ostree"
11  
-
12 10
 do_rootfs[depends] += "linux-gnome-ostree:do_deploy"
13 11
 
14 12
 PACKAGE_INSTALL += " \
@@ -100,15 +98,16 @@ EOF
100 98
 	ln -s ../usr/share/zoneinfo/Europe/London ${IMAGE_ROOTFS}/etc/localtime
101 99
 	echo LANG=\"en_US.UTF-8\" > ${IMAGE_ROOTFS}/etc/locale.conf
102 100
 	
103  
-
104  
-	# Do the kernel and modules
105  
-	mkdir -p ${IMAGE_ROOTFS}/boot
106  
-	cp -p ${DEPLOY_DIR_IMAGE}/bzImage-${OSTREE_ROOTFS_KERNEL_VERSION} ${IMAGE_ROOTFS}/boot/vmlinuz-${OSTREE_ROOTFS_KERNEL_VERSION}
107  
-	echo "Extracting modules.tgz"
108  
-	tar -x -C "${IMAGE_ROOTFS}" -z -f ${DEPLOY_DIR_IMAGE}/modules-${OSTREE_ROOTFS_KERNEL_VERSION}.tgz
109  
-
110 101
 	# Do UsrMove for bin and sbin
111  
-	mv ${IMAGE_ROOTFS}/bin/* ${IMAGE_ROOTFS}/usr/bin
  102
+        cd ${IMAGE_ROOTFS}/bin
  103
+        for x in *; do
  104
+          if test -L ${x} && test -x ../usr/bin/${x}; then
  105
+	    rm ${x}
  106
+	  else
  107
+            mv ${x} ../usr/bin/${x}
  108
+          fi
  109
+        done
  110
+        cd -
112 111
 	if test -d ${IMAGE_ROOTFS}/bin/.debug; then
113 112
 	  mkdir -p ${IMAGE_ROOTFS}/usr/bin/.debug
114 113
 	  mv ${IMAGE_ROOTFS}/bin/.debug/* ${IMAGE_ROOTFS}/usr/bin/.debug
@@ -163,9 +162,15 @@ EOF
163 162
 	  mv ${IMAGE_ROOTFS}/usr/sbin/.debug/* ${IMAGE_ROOTFS}/usr/bin/.debug
164 163
 	  rmdir ${IMAGE_ROOTFS}/usr/sbin/.debug
165 164
 	fi
166  
-	for x in ${IMAGE_ROOTFS}/usr/sbin/*; do
167  
-	  mv ${x} ${IMAGE_ROOTFS}/usr/bin
  165
+        cd ${IMAGE_ROOTFS}/usr/sbin
  166
+	for x in *; do
  167
+          if test -L ${x} && test -x ../bin/${x}; then
  168
+	    rm ${x}
  169
+	  else
  170
+	    mv ${x} ../bin
  171
+          fi
168 172
 	done
  173
+        cd -
169 174
 	rmdir ${IMAGE_ROOTFS}/usr/sbin
170 175
 	ln -s bin ${IMAGE_ROOTFS}/usr/sbin
171 176
 
4  meta-gnomeos/recipies-core/tasks/task-gnomeos-contents-devel.bb
@@ -6,11 +6,11 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
6 6
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
7 7
 
8 8
 PACKAGE_ARCH = "${MACHINE_ARCH}"
9  
-ALLOW_EMPTY = "1"
  9
+ALLOW_EMPTY_${PN} = "1"
10 10
 
11 11
 PR = "3"
12 12
 
13  
-RDEPENDS += "     \
  13
+RDEPENDS_${PN} += "     \
14 14
 	 autoconf \
15 15
 	 automake \
16 16
 	 binutils \
5  meta-gnomeos/recipies-core/tasks/task-gnomeos-contents-runtime.bb
@@ -6,13 +6,14 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
6 6
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
7 7
 
8 8
 PACKAGE_ARCH = "${MACHINE_ARCH}"
9  
-ALLOW_EMPTY = "1"
  9
+ALLOW_EMPTY_${PN} = "1"
10 10
 
11 11
 PR = "1"
12 12
 
13 13
 DEPENDS += " linux-gnome-ostree"
14 14
 
15  
-RDEPENDS += "\
  15
+RDEPENDS_${PN} += "\
  16
+	 kernel-image kernel-modules \
16 17
 	 util-linux-libuuid \
17 18
 	 util-linux-blkid \
18 19
 	 e2fsprogs-e2fsck \

0 notes on commit 2ecded0

Please sign in to comment.
Something went wrong with that request. Please try again.