aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2018-09-06 08:00:24 +0000
committerJo-Philipp Wich <jo@mein.io>2018-12-18 11:28:12 +0100
commitfa3805f2b6d3c03eee94579d29cf2f0bca07ce04 (patch)
treef4cb94c34849492e0c3213e3634dc929efa93e69 /scripts
parentf5cf9b265f7825e54286d4dfc994e56ec722c0c5 (diff)
downloadupstream-fa3805f2b6d3c03eee94579d29cf2f0bca07ce04.tar.gz
upstream-fa3805f2b6d3c03eee94579d29cf2f0bca07ce04.tar.bz2
upstream-fa3805f2b6d3c03eee94579d29cf2f0bca07ce04.zip
scripts/ipkg-build: quash error messages when conffiles.resolved is empty
When Package/xx/conffiles only contains directories that are empty at package time, conffiles.resolved will be missing and the following error messages will appear in the build log. /home/yousong/git-repo/openwrt/openwrt/scripts/ipkg-build -c -o 0 -g 0 /home/yousong/git-repo/openwrt/openwrt/build_dir/target-mips_24kc_musl/linux-malta_be/openvswitch-2.10.0/ipkg-mips_24kc/openvswitch-common /home/yousong/git-repo/openwrt/openwrt/bin/packages/mips_24kc/packages mv: cannot stat 'CONTROL/conffiles.resolved': No such file or directory chmod: cannot access 'CONTROL/conffiles': No such file or directory It will not break the ipkg-build process. The change is merely cosmetic to not cause confusion when reading logs Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> (backported from 9e58c20ec9d48ee41a4a306b0cd6d3aece285efd)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ipkg-build6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/ipkg-build b/scripts/ipkg-build
index d38ba20af3..21127f3391 100755
--- a/scripts/ipkg-build
+++ b/scripts/ipkg-build
@@ -64,8 +64,10 @@ pkg_appears_sane() {
done
rm $CONTROL/conffiles
- mv $CONTROL/conffiles.resolved $CONTROL/conffiles
- chmod 0644 $CONTROL/conffiles
+ if [ -f $CONTROL/conffiles.resolved ]; then
+ mv $CONTROL/conffiles.resolved $CONTROL/conffiles
+ chmod 0644 $CONTROL/conffiles
+ fi
fi
cd $owd