mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
include/package-pack: escape package description for APK mkpkg
Escape special char for package description for APK mkpkg as the description is passed as an args to mkpkg with --info option and can easily escape from the "". Currently escaped char `, $, ", \. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
4511fa4b30
commit
43455f1075
@ -8,6 +8,10 @@ endif
|
|||||||
|
|
||||||
IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg
|
IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg
|
||||||
|
|
||||||
|
define description_escape
|
||||||
|
$(subst `,\`,$(subst $$,\$$,$(subst ",\",$(subst \,\\,$(1)))))
|
||||||
|
endef
|
||||||
|
|
||||||
# Generates a make statement to return a wildcard for candidate ipkg files
|
# Generates a make statement to return a wildcard for candidate ipkg files
|
||||||
# 1: package name
|
# 1: package name
|
||||||
define gen_package_wildcard
|
define gen_package_wildcard
|
||||||
@ -339,7 +343,7 @@ else
|
|||||||
$(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk mkpkg \
|
$(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk mkpkg \
|
||||||
--info "name:$(1)$$(ABIV_$(1))" \
|
--info "name:$(1)$$(ABIV_$(1))" \
|
||||||
--info "version:$(VERSION)" \
|
--info "version:$(VERSION)" \
|
||||||
--info "description:$$(strip $$(Package/$(1)/description))" \
|
--info "description:$$(call description_escape,$$(strip $$(Package/$(1)/description)))" \
|
||||||
--info "arch:$(PKGARCH)" \
|
--info "arch:$(PKGARCH)" \
|
||||||
--info "license:$(LICENSE)" \
|
--info "license:$(LICENSE)" \
|
||||||
--info "origin:$(SOURCE)" \
|
--info "origin:$(SOURCE)" \
|
||||||
|
Loading…
Reference in New Issue
Block a user