#19381: r45187 is probably missing a ";" causing trouble with postinst/prerm
commands
-------------------------+----------------------------------
Reporter: hnyman | Owner: developers
Type: defect | Status: new
Priority: highest | Milestone: Chaos Calmer (trunk)
Component: base system | Version: Trunk
Keywords: |
-------------------------+----------------------------------
r45187 is probably missing a ";" causing trouble with postinst/prerm
commands.
I see this when compiling a new trunk version:
{{{
(cd /Openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/bcp38-4
/ipkg-ar71xx/bcp38/CONTROL; ( echo "$CONTROL"; printf "Description: ";
echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644
control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] &&
exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo
"default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo ".
\${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) >
prerm; chmod 0755 postinst prerm; echo "$V_Package_bcp38_conffiles" >
conffiles; echo "$V_Package_bcp38_postinst" > postinst-pkg; chmod 0755
postinst-pkg echo "$V_Package_bcp38_postrm" > postrm1; )
chmod: cannot access 'echo': No such file or directory
chmod: cannot access '#!/bin/sh\nuci delete firewall.bcp38\nuci commit':
No such file or directory
Makefile:62: recipe for target
'/Openwrt/trunk/bin/ar71xx/packages/packages/bcp38_4-1_ar71xx.ipk' failed
}}}
Key part:
{{{
; chmod 0755 postinst-pkg echo "$V_Package_bcp38_postrm" > postrm1;
}}}
It seems to me that the commands are missing a ";" after the newly added
chmod command.
r45187 modified the handling of postinst/preinst/prerm/postrm commands.
Most likely there should be an additional ";" after the newly added chmod
command on line 24 (at the end of the line), so that the possible
following commands are separated clearly.
https://dev.openwrt.org/browser/trunk/include/package-
ipkg.mk?rev=45187#L24
{{{
$(1)_COMMANDS += echo "$$$$$$$$$(call shvar,Package/$(1)/$(2))" >
$(2)$(3); $(if $(4),chmod 0755 $(2)$(3))
}}}
--
Ticket URL: <https://dev.openwrt.org/ticket/19381>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets