I forgot to include the patch, oops.

On Fri, Aug 28, 2009 at 4:41 AM, Cody A.W. Somerville <
cody.somervi...@canonical.com> wrote:

> Hello,
>
>  If you attempt a build and it fails for whatever reasons (say, a
> configuration issue) and then you retry your build without calling lh_clean,
> you can sometimes run into an issue with the 'deconfiguring file
> /bin/hostname' step. It'll try to move chroot/bin/hostname.orig to
> chroot/bin/hostname but chroot/bin/hostname.orig won't exist as
> chroot/bin/hostname hasn't been moved aside like it expects (ie. the
> original file is still chroot/bin/hostname). This is frustrating since if
> the error was ignored, the build would be able to complete successfully and
> as expected. So, I've created a patch to have lh_chroot_hostname look to see
> if 'chroot/bin/hostname.orig' exists before attempting to move it to
> 'chroot/bin/hostname'.
>

Cheers,

-- 
Cody A.W. Somerville
Software Systems Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1-781-850-2087
Cell: +1-506-471-8402
Email: cody.somervi...@canonical.com
=== modified file 'helpers/lh_chroot_hostname'
--- helpers/lh_chroot_hostname	2009-01-26 16:39:27 +0000
+++ helpers/lh_chroot_hostname	2009-08-28 08:01:30 +0000
@@ -73,7 +73,10 @@
 		Echo_message "Deconfiguring file /bin/hostname"
 
 		# Restore hostname file
-		mv chroot/bin/hostname.orig chroot/bin/hostname
+		if [ -s chroot/bin/hostname.orig ]
+		then
+			mv chroot/bin/hostname.orig chroot/bin/hostname
+		fi
 
 		# Removing stage file
 		rm -f .stage/chroot_hostname

Reply via email to