Date: Sun, 11 Aug 2019 04:20:33 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 239761] Mk/Scripts/do-fetch.sh: `echo` in r507705 misses -n Message-ID: <bug-239761-7788-ZQ9Qb74Sfx@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-239761-7788@https.bugs.freebsd.org/bugzilla/> References: <bug-239761-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239761 --- Comment #2 from Ruslan Garipov <brigadir15@gmail.com> --- (In reply to Mathieu Arnold from comment #1) > what shell are you using /bin/sh > problems with the output I hadn't described my issue good enough, sorry, therefore you didn't understand me. There is no problem with the output itself. A shell script produced by fetch-list is correct. The problem is that in a case described in PR 239293, a line in the script, which download a file and which is usually "a text line" (there are no newline characters within), becomes multiline "object". For example: $ cd /usr/ports/lang/rust $ make fetch-list | cat -n 1 mkdir -p /usr/ports/distfiles/rust && cd /usr/ports/distfiles/rust = && { env /usr/bin/fetch -Fpr -S 98707920 https://static.rust-lang.org/dist/rustc-1.36.0-src.tar.xz || env /usr/bin/fetch -Fpr -S 98707920 http://distcache.FreeBSD.org/ports-distfiles/rust/rustc-1.36.0-src.tar.xz = || echo "rustc-1.36.0-src.tar.xz" not fetched; } There is no problem here: a fetching line is actually a "line". But here are the next lines: 2 mkdir -p /usr/ports/distfiles/rust && cd /usr/ports/distfiles/rust = && { mkdir -p "2019-05-23" && 3 env /usr/bin/fetch -Fpr -S 73812596 -o 2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz https://static.rust-lang.org/dist/2019-05-23/rustc-1.35.0-x86_64-unknown-fr= eebsd.tar.gz || mkdir -p "2019-05-23" && 4 env /usr/bin/fetch -Fpr -S 73812596 -o 2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz http://distcache.FreeBSD.org/local-distfiles/tobik/rust/2019-05-23/rustc-1.= 35.0-x86_64-unknown-freebsd.tar.gz || mkdir -p "2019-05-23" && 5 env /usr/bin/fetch -Fpr -S 73812596 -o 2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz http://distcache.us-east.FreeBSD.org/local-distfiles/tobik/rust/2019-05-23/= rustc-1.35.0-x86_64-unknown-freebsd.tar.gz || mkdir -p "2019-05-23" && 6 env /usr/bin/fetch -Fpr -S 73812596 -o 2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz http://distcache.eu.FreeBSD.org/local-distfiles/tobik/rust/2019-05-23/rustc= -1.35.0-x86_64-unknown-freebsd.tar.gz || mkdir -p "2019-05-23" && 7 env /usr/bin/fetch -Fpr -S 73812596 -o 2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz http://distcache.us-west.FreeBSD.org/local-distfiles/tobik/rust/2019-05-23/= rustc-1.35.0-x86_64-unknown-freebsd.tar.gz || mkdir -p "2019-05-23" && 8 env /usr/bin/fetch -Fpr -S 73812596 -o 2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz http://distcache.FreeBSD.org/ports-distfiles/rust/2019-05-23/rustc-1.35.0-x= 86_64-unknown-freebsd.tar.gz || echo "2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz" not fetche= d; } {lines 9..22 are elided because they are similar to lines 2..8} Because r507705 doesn't use `echo -n`, lines 2..7 end with `mkdir -p "2019-05-23" &&`. This is not an error, I just want to collapse lines 2..8 into a single line. Having oneline script for fetching ``rustc-1.35.0-x86_64-unknown-freebsd.tar.gz'' (and all other file) makes processing of the result much easy. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-239761-7788-ZQ9Qb74Sfx>