Image builder - make, clean dirclean

I had asked this question but it was lost in a long thread which I cannot find.

Using image builder 18.06.2 in this case (and I think in any case), how do I build again without downloading any packages.

At one point, I was using make clean and make dirclean before running make image and someone said not to use one or both of these if I want to prevent downloading all of the packages.

I think I am missing something because no matter how I run make image, it downloads the packages.

To be clear, I do not want to download anything, I just want to rebuild exactly the same way that the last version was built, keeping the exact same packages etc.

I know I can simply keep the image but I'm just wanting to understand how this works :).

I don't know if there is a "proper" way, but if you comment out the opkg update (line 145) in Makefile, it stops the downloading (as long as you do not do clean first). I still says it is downloading, but is not (works without an Internet connection)

package_reload:
	if [ ! -f "$(PACKAGE_DIR)/Packages" ] || [ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz`" ]; then \
		echo "Package list missing or not up-to-date, generating it." >&2 ;\
		$(MAKE) package_index; \
	else \
		mkdir -p $(TARGET_DIR)/tmp; \
		#$(OPKG) update >&2 || true; \
	fi
1 Like

The reply to my original was simply don't run make clean or make dirclean before building and that would leave everything the way it is. I still see 'downloading' however.

I'll try your suggestion.