From e867f3cf2e6859fc822b89f0304e59c87af7c053 Mon Sep 17 00:00:00 2001 From: Albert Hopkins Date: Thu, 17 Dec 2015 21:25:59 +0000 Subject: [PATCH] Makefile: use the git repo for the PORTAGE_DIR Now more rsync'ing snapshots. We can just clone/pull the repo on github. --- Makefile | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 2498452..cbf16e9 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,6 @@ M4_DEFS = -D HOSTNAME=$(HOSTNAME) M4C = $(M4) $(M4_DEFS) USEPKG = --usepkg --binpkg-respect-use=y RSYNC_MIRROR = rsync://rsync.gtlib.gatech.edu/gentoo/ -EMERGE_RSYNC = NO KERNEL_PKG = gentoo-sources PACKAGE_FILES = $(wildcard appliances/$(APPLIANCE)/package.*) WORLD = appliances/$(APPLIANCE)/world @@ -65,7 +64,7 @@ endif inroot := systemd-nspawn --quiet \ --directory=$(CHROOT) \ --machine=$(container) \ - --bind=$(PORTAGE_DIR)/portage:/usr/portage \ + --bind=$(PORTAGE_DIR):/usr/portage \ --bind=$(PKGDIR):/usr/portage/packages \ --bind=$(DISTDIR):/usr/portage/distfiles @@ -97,26 +96,14 @@ all: stage4 image: $(RAW_IMAGE) -portage-snapshot.tar.bz2: - @scripts/echo You do not have a portage snapshot. Consider \"make sync_portage\" - @exit 1 +sync_portage: $(PORTAGE_DIR) + @scripts/echo Grabbing latest portage + git -C $(PORTAGE_DIR) pull + touch $(PORTAGE_DIR) - -sync_portage: - @scripts/echo Grabbing latest portage snapshot - rsync --no-motd -L $(RSYNC_MIRROR)/snapshots/portage-latest.tar.bz2 portage-snapshot.tar.bz2 - touch portage-snapshot.tar.bz2 - - -$(PORTAGE_DIR): portage-snapshot.tar.bz2 - @scripts/echo Unpacking portage snapshot - rm -rf $(PORTAGE_DIR) - mkdir $(PORTAGE_DIR) - tar xf portage-snapshot.tar.bz2 -C $(PORTAGE_DIR) -ifeq ($(EMERGE_RSYNC),YES) - @scripts/echo Syncing portage tree - $(inroot) emerge --sync --quiet -endif +$(PORTAGE_DIR): + @scripts/echo Grabbing the portage tree + git clone --depth=1 git://github.com/gentoo/gentoo.git $(PORTAGE_DIR) $(PREPROOT): $(STAGE3) $(PORTAGE_DIR) configs/fstab mkdir -p $(PKGDIR) $(DISTDIR)