image: don't override opkg list directory in per-device rootfs mode

opkg's -l option is always interpreted relative to the installation root.
This leads to very weird paths inside the rootfs (containing the whole path
to the LEDE tree on the build machine) and causes the subsequent deletion
of the list directory to fail (cluttering the resulting images).

Instead, use the default list directory and remove its contents in
prepare_rootfs.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
v19.07.3_mercusys_ac12_duma
Matthias Schiffer 8 years ago
parent d72e838429
commit c15d70c6d6
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

@ -293,8 +293,7 @@ mkfs_cur_target_dir = $(call mkfs_target_dir,pkg=$(target_params))
opkg_target = \ opkg_target = \
$(call opkg,$(mkfs_cur_target_dir)) \ $(call opkg,$(mkfs_cur_target_dir)) \
-f $(mkfs_cur_target_dir).conf \ -f $(mkfs_cur_target_dir).conf
-l $(mkfs_cur_target_dir).tmp
target-dir-%: FORCE target-dir-%: FORCE
rm -rf $(mkfs_cur_target_dir) $(mkfs_cur_target_dir).opkg rm -rf $(mkfs_cur_target_dir) $(mkfs_cur_target_dir).opkg
@ -311,9 +310,7 @@ target-dir-%: FORCE
$(call Image/mkfs/prepare,$(mkfs_cur_target_dir)) $(call Image/mkfs/prepare,$(mkfs_cur_target_dir))
$(call prepare_rootfs,$(mkfs_cur_target_dir)) $(call prepare_rootfs,$(mkfs_cur_target_dir))
mv $(mkfs_cur_target_dir).opkg $(mkfs_cur_target_dir)/etc/opkg mv $(mkfs_cur_target_dir).opkg $(mkfs_cur_target_dir)/etc/opkg
rm -rf \ rm -f $(mkfs_cur_target_dir).conf
$(mkfs_cur_target_dir).conf \
$(mkfs_cur_target_dir).tmp
$(KDIR)/root.%: kernel_prepare $(KDIR)/root.%: kernel_prepare
$(call Image/mkfs/$(word 1,$(target_params)),$(target_params)) $(call Image/mkfs/$(word 1,$(target_params)),$(target_params))

@ -72,6 +72,7 @@ define prepare_rootfs
@-find $(1) -name .svn | $(XARGS) rm -rf @-find $(1) -name .svn | $(XARGS) rm -rf
@-find $(1) -name .git | $(XARGS) rm -rf @-find $(1) -name .git | $(XARGS) rm -rf
@-find $(1) -name '.#*' | $(XARGS) rm -f @-find $(1) -name '.#*' | $(XARGS) rm -f
rm -f $(1)/usr/lib/opkg/lists/*
rm -f $(1)/usr/lib/opkg/info/*.postinst* rm -f $(1)/usr/lib/opkg/info/*.postinst*
rm -f $(1)/usr/lib/opkg/info/*.prerm* rm -f $(1)/usr/lib/opkg/info/*.prerm*
$(if $(CONFIG_CLEAN_IPKG),rm -rf $(1)/usr/lib/opkg) $(if $(CONFIG_CLEAN_IPKG),rm -rf $(1)/usr/lib/opkg)

Loading…
Cancel
Save