Ensure locally built packages are picked up.

During the bootstrap rapture versions are installed, and locally built
ones aren't upgraded to later.

Also temporarily keep the local repository to allow installation of
locally built packages on the target until rapture has our forked
versions. Otherwise apt-get install of e.g. gstreamer1.0-tools will
install the upstreamer version, not the +imx one.

Change-Id: Iec6cb09220d4e396dd4b2de89e42d27c2f3ba0a4
diff --git a/rootfs.mk b/rootfs.mk
index 0f3eb10..d3937d6 100644
--- a/rootfs.mk
+++ b/rootfs.mk
@@ -157,12 +157,15 @@
 
 	$(LOG) rootfs patch bsp
 	sudo chroot $(ROOTFS_DIR) bash -c 'apt-get install --allow-downgrades --no-install-recommends -y $(PRE_INSTALL_PACKAGES)'
+	sudo chroot $(ROOTFS_DIR) bash -c 'apt-get upgrade -y'
 	$(LOG) rootfs patch bsp finished
 
-ifeq ($(FETCH_PACKAGES),false)
-	sudo rm -f $(ROOTFS_DIR)/etc/apt/sources.list.d/local.list
-	sudo rm -rf $(ROOTFS_DIR)/opt/aiy
-endif
+# TODO(jtgans): Remove these when rapture is updated. Until then keeping the local repo
+# is the only way of installing locally built packages on device.
+# ifeq ($(FETCH_PACKAGES),false)
+# 	sudo rm -f $(ROOTFS_DIR)/etc/apt/sources.list.d/local.list
+# 	sudo rm -rf $(ROOTFS_DIR)/opt/aiy
+# endif
 
 	+make -f $(ROOTDIR)/build/rootfs.mk adjustments