public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: misc/
Date: Sat, 18 Aug 2012 20:32:16 +0000 (UTC)	[thread overview]
Message-ID: <1345321920.a695533917d969d66210ce8e2fe8aa88bee42dc7.zmedico@gentoo> (raw)

commit:     a695533917d969d66210ce8e2fe8aa88bee42dc7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 18 20:32:00 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Aug 18 20:32:00 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a6955339

emerge-delta-webrsync: rm -f for non-interactive

This prevents interactive mode as reported in bug #176008.

---
 misc/emerge-delta-webrsync |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index fffa815..f6748cb 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -149,7 +149,7 @@ fi
 #---------------
 
 cleanse_state_dir() {
-	[[ ${STATE_DIR:-/} != '/' ]] && rm ${STATE_DIR}/* &> /dev/null;
+	[[ ${STATE_DIR:-/} != '/' ]] && rm -f "${STATE_DIR}"/* &> /dev/null
 }
 
 full_version_attempt() {
@@ -205,14 +205,14 @@ full_version_attempt() {
 				exit 0
 			else
 				echo "md5 on ${FILE} failed, removing it and starting anew"
-				rm "$FILE" &> /dev/null
+				rm -f "${FILE}" &> /dev/null
 			fi
 		fi
 	
 		if fetch_from_mirrors "/snapshots/${FILE}" "${FILE}"; then
 			if ! verify_md5_file "$FILE"; then
 				echo "md5 failed on $FILE"
-				rm ${FILE} &> /dev/null
+				rm -f "${FILE}" &> /dev/null
 				continue
 			else
 				sync_local "${FILE}"
@@ -300,7 +300,7 @@ fetch_from_mirrors() {
 		if (eval "$FETCHCOMMAND $wgetops") && [ -s "${FILE}" ]; then
 			return 0
 		else
-			rm "${FILE}" &> /dev/null
+			rm -f "${FILE}" &> /dev/null
 		fi
 	done
 	return 1
@@ -394,8 +394,8 @@ for basef in ${potentials}; do
 	fi
 	if ! verify_md5_file "${dfile}" "${chksum}"; then
 		echo "found a stale snapshot.  cleansing"
-		rm "${dfile}" &> /dev/null
-		rm "${chksum}.md5sum" &> /dev/null
+		rm -f "${dfile}" &> /dev/null
+		rm -f "${chksum}.md5sum" &> /dev/null
 		dar=""
 	else
 		base_version="${basef}"
@@ -455,7 +455,7 @@ while [[ -n ${fetched} ]]; do
 	fetch="yes"
 	if [[ -e ${p} ]]; then
 		if ! verify_md5_file "${p}"; then
-			rm ${p} &> /dev/null
+			rm -f "${p}" &> /dev/null
 		else
 			fetch=""
 		fi
@@ -521,7 +521,7 @@ TEMPDIR=$(mktemp -d /tmp/delta-webrsync-XXXXXX)
 # got our patches.
 if ! patcher -v "${dfile}" ${patches} "${TEMPDIR}/portage-${final_date}.tar"; then
 	echo "reconstruction failed (contact the author with the error from the reconstructor please)"
-	rm "${TEMPDIR}/portage-${final_date}.tar"
+	rm -f "${TEMPDIR}/portage-${final_date}.tar"
 	rmdir ${TEMPDIR}
 	full_version_attempt
 fi
@@ -556,7 +556,7 @@ if [ "$verified" == "1" ]; then
 	echo "doing final md5 stuff"
 	wait
 	# bzip2 is finished now.
-	rm "${TEMPDIR}/portage-${final_date}.tar"
+	rm -f "${TEMPDIR}/portage-${final_date}.tar"
 else
 	echo "recompressing."
 	bzip2 -v9 "${TEMPDIR}/portage-${final_date}.tar.bz2"
@@ -603,7 +603,7 @@ if [[ -z $KEEP_OLDIES ]]; then
 	for x in $potentials; do
 		echo "removing ${x}"
 		rm -f "${DISTDIR}/${x}"{,.md5sum,.umd5sum,.gpgsig} &> /dev/null
-		rm "${STATE_DIR}/${x}" "${STATE_DIR}/${x}.md5sum" "${STATE_DIR}/${x}.umd5sum" &> /dev/null
+		rm -f "${STATE_DIR}/${x}"{,.md5sum,.umd5sum} &> /dev/null
 	done
 fi
 echo "done."


             reply	other threads:[~2012-08-18 20:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-18 20:32 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-29  1:22 [gentoo-commits] proj/portage:master commit in: misc/ Zac Medico
2023-11-11  7:24 Sam James
2023-08-19 15:42 Sam James
2023-08-19 15:03 Sam James
2023-08-19 15:03 Sam James
2023-08-19 13:35 Sam James
2019-12-30 21:36 Zac Medico
2019-12-09  9:30 Zac Medico
2018-07-28  6:20 Zac Medico
2018-07-28  6:12 Zac Medico
2018-02-01  6:18 Zac Medico
2015-11-06  5:31 Zac Medico
2014-10-19 17:19 Zac Medico
2013-07-10 20:16 Zac Medico
2013-06-22  6:14 Zac Medico
2013-06-22  5:54 Zac Medico
2013-01-28 21:45 Zac Medico
2012-09-14  7:26 Zac Medico
2012-08-19  5:44 Zac Medico
2012-08-19  5:21 Zac Medico
2012-08-18 22:51 Zac Medico
2012-08-18 20:51 Zac Medico
2012-08-18  1:45 Zac Medico
2012-08-18  1:28 Zac Medico
2012-08-18  1:28 Zac Medico
2012-08-18  1:28 Zac Medico
2012-08-18  1:28 Zac Medico
2012-08-18  1:28 Zac Medico
2012-08-18  1:28 Zac Medico
2012-08-18  1:28 Zac Medico
2012-08-18  0:09 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345321920.a695533917d969d66210ce8e2fe8aa88bee42dc7.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox