build: don't copy packages to output directory for targets without opkg

Fixes #1126
This commit is contained in:
Matthias Schiffer 2017-05-15 23:23:02 +02:00
parent a7ea424214
commit ad91ab1be7
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
6 changed files with 34 additions and 26 deletions

View File

@ -30,6 +30,10 @@ sysupgrade() {
: :
} }
no_opkg() {
:
}
unknown_devices="$DEVICES" unknown_devices="$DEVICES"

View File

@ -19,6 +19,8 @@ factory_suffix=
sysupgrade_ext= sysupgrade_ext=
sysupgrade_suffix= sysupgrade_suffix=
no_opkg=
mkdir -p "${GLUON_IMAGEDIR}/factory" "${GLUON_IMAGEDIR}/sysupgrade" mkdir -p "${GLUON_IMAGEDIR}/factory" "${GLUON_IMAGEDIR}/sysupgrade"
@ -146,10 +148,15 @@ sysupgrade() {
fi fi
} }
no_opkg() {
no_opkg=1
}
. targets/"$1"; copy . targets/"$1"; copy
# Copy opkg repo # Copy opkg repo
if [ -z "$DEVICES" ]; then if [ -z "$no_opkg" -a -z "$DEVICES" ]; then
rm -f "$GLUON_PACKAGEDIR"/*/"$LEDE_BINDIR"/* rm -f "$GLUON_PACKAGEDIR"/*/"$LEDE_BINDIR"/*
rmdir -p "$GLUON_PACKAGEDIR"/*/"$LEDE_BINDIR" 2>/dev/null || true rmdir -p "$GLUON_PACKAGEDIR"/*/"$LEDE_BINDIR" 2>/dev/null || true
mkdir -p "${GLUON_PACKAGEDIR}/${PACKAGE_PREFIX}/${LEDE_BINDIR}" mkdir -p "${GLUON_PACKAGEDIR}/${PACKAGE_PREFIX}/${LEDE_BINDIR}"

View File

@ -0,0 +1,18 @@
site_packages() {
MAKEFLAGS= make print PROFILE="$1" --no-print-directory -s -f - <<'END_MAKE'
include $(GLUON_SITEDIR)/site.mk
print:
echo '$(GLUON_$(PROFILE)_SITE_PACKAGES)'
END_MAKE
}
. scripts/common.inc.sh
no_opkg() {
config '# CONFIG_SIGNED_PACKAGES is not set'
config 'CONFIG_CLEAN_IPKG=y'
packages '-opkg'
}

View File

@ -14,16 +14,6 @@ profile_packages=
LEDE_CONFIG_TARGET="${LEDE_TARGET//-/_}" LEDE_CONFIG_TARGET="${LEDE_TARGET//-/_}"
site_packages() {
MAKEFLAGS= make PROFILE="$1" --no-print-directory -s -f - <<'END_MAKE'
include $(GLUON_SITEDIR)/site.mk
all:
echo '$(GLUON_$(PROFILE)_SITE_PACKAGES)'
END_MAKE
}
emit() { emit() {
[ "${output}" ] || return 0 [ "${output}" ] || return 0
want_device "${output}" || return 0 want_device "${output}" || return 0
@ -39,7 +29,7 @@ emit() {
} }
. scripts/common.inc.sh . scripts/target_config.inc.sh
config() { config() {
echo "$1" echo "$1"

View File

@ -14,16 +14,6 @@ ret=0
LEDE_CONFIG_TARGET="${LEDE_TARGET//-/_}" LEDE_CONFIG_TARGET="${LEDE_TARGET//-/_}"
site_packages() {
MAKEFLAGS= make PROFILE="$1" --no-print-directory -s -f - <<'END_MAKE'
include $(GLUON_SITEDIR)/site.mk
all:
echo '$(GLUON_$(PROFILE)_SITE_PACKAGES)'
END_MAKE
}
fail() { fail() {
local message="$1" local message="$1"
@ -49,7 +39,7 @@ check_package() {
} }
. scripts/common.inc.sh . scripts/target_config.inc.sh
config() { config() {
local config="$1" local config="$1"

View File

@ -1,6 +1,5 @@
config '# CONFIG_SIGNED_PACKAGES is not set' no_opkg
config 'CONFIG_CLEAN_IPKG=y' packages '-uboot-envtools' '-kmod-usb-core' '-kmod-usb-ohci' '-kmod-usb2' '-kmod-usb-ledtrig-usbport'
packages '-opkg' '-uboot-envtools' '-kmod-usb-core' '-kmod-usb-ohci' '-kmod-usb2' '-kmod-usb-ledtrig-usbport'
# D-Link # D-Link