public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: misc/, bin/
@ 2012-08-18 23:12 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2012-08-18 23:12 UTC (permalink / raw
  To: gentoo-commits

commit:     47bd1328435d18f5bb7e62a365a420f516816a36
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 18 23:12:33 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Aug 18 23:12:33 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=47bd1328

emerge-*webrsync: fix post_sync for prefix

---
 bin/emerge-webrsync        |    8 +++++---
 misc/emerge-delta-webrsync |    6 +++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 5644abf..fd71a1d 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -39,8 +39,9 @@ else
 	eecho "could not find 'portageq'; aborting"
 	exit 1
 fi
-eval $("${portageq}" envvar -v DISTDIR FEATURES FETCHCOMMAND GENTOO_MIRRORS \
-	PORTAGE_BIN_PATH PORTAGE_GPG_DIR \
+eval $("${portageq}" envvar -v DISTDIR EPREFIX FEATURES \
+	FETCHCOMMAND GENTOO_MIRRORS \
+	PORTAGE_BIN_PATH PORTAGE_CONFIGROOT PORTAGE_GPG_DIR \
 	PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS \
 	PORTAGE_RSYNC_OPTS PORTAGE_TMPDIR PORTDIR \
 	SYNC USERLAND http_proxy ftp_proxy)
@@ -232,7 +233,8 @@ sync_local() {
 		vecho "Updating cache ..."
 		emerge --metadata
 	fi
-	[ -x /etc/portage/bin/post_sync ] && /etc/portage/bin/post_sync
+	local post_sync=${PORTAGE_CONFIGROOT}etc/portage/bin/post_sync
+	[ -x "${post_sync}" ] && "${post_sync}"
 	# --quiet suppresses output if there are no relevant news items
 	has news ${FEATURES} && emerge --check-news --quiet
 	return 0

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 0b282d9..4eb17b7 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -33,7 +33,7 @@ else
 fi
 eval $("${portageq}" envvar -v DISTDIR EPREFIX FEATURES \
 	FETCHCOMMAND GENTOO_MIRRORS \
-	PORTAGE_BIN_PATH PORTAGE_GPG_DIR \
+	PORTAGE_BIN_PATH PORTAGE_CONFIGROOT PORTAGE_GPG_DIR \
 	PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS \
 	PORTAGE_RSYNC_OPTS PORTAGE_TMPDIR PORTDIR \
 	USERLAND http_proxy ftp_proxy)
@@ -284,8 +284,8 @@ sync_local() {
 		echo "transferring metadata/cache"
 		emerge --metadata
 	fi
-	local post_sync=/etc/portage/bin/post_sync
-	[[ -x "${post_sync}" ]] && ${post_sync}
+	local post_sync=${PORTAGE_CONFIGROOT}etc/portage/bin/post_sync
+	[ -x "${post_sync}" ] && "${post_sync}"
 }
 
 fetch_from_mirrors() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:master commit in: misc/, bin/
@ 2012-08-18 23:20 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2012-08-18 23:20 UTC (permalink / raw
  To: gentoo-commits

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

emerge-*webrsync: use ${PORTAGE_BIN_PATH}/emerge

---
 bin/emerge-webrsync        |    4 ++--
 misc/emerge-delta-webrsync |    6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index fd71a1d..11d608f 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -231,12 +231,12 @@ sync_local() {
 
 	if has metadata-transfer ${FEATURES} ; then
 		vecho "Updating cache ..."
-		emerge --metadata
+		"${PORTAGE_BIN_PATH}/emerge" --metadata
 	fi
 	local post_sync=${PORTAGE_CONFIGROOT}etc/portage/bin/post_sync
 	[ -x "${post_sync}" ] && "${post_sync}"
 	# --quiet suppresses output if there are no relevant news items
-	has news ${FEATURES} && emerge --check-news --quiet
+	has news ${FEATURES} && "${PORTAGE_BIN_PATH}/emerge" --check-news --quiet
 	return 0
 }
 

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 4eb17b7..874c527 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -281,11 +281,13 @@ sync_local() {
 		rm -rf portage
 	fi
 	if has metadata-transfer ${FEATURES} ; then
-		echo "transferring metadata/cache"
-		emerge --metadata
+		echo "Updating cache ..."
+		"${PORTAGE_BIN_PATH}/emerge" --metadata
 	fi
 	local post_sync=${PORTAGE_CONFIGROOT}etc/portage/bin/post_sync
 	[ -x "${post_sync}" ] && "${post_sync}"
+	# --quiet suppresses output if there are no relevant news items
+	has news ${FEATURES} && "${PORTAGE_BIN_PATH}/emerge" --check-news --quiet
 }
 
 fetch_from_mirrors() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:master commit in: misc/, bin/
@ 2012-11-07 16:48 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2012-11-07 16:48 UTC (permalink / raw
  To: gentoo-commits

commit:     228a860476d7543608b469c569ec1d4e70aa7f59
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  7 16:48:40 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Nov  7 16:48:40 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=228a8604

emerge-webrsync: rsync -o -g, bug #442190

This fixes a regression since the -a option was removed in
commit e672b5ccbbbe38eda5c733fc799a20d92a8bdf75.

---
 bin/emerge-webrsync        |    7 +++++--
 misc/emerge-delta-webrsync |    9 ++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 09b7574..e826ec4 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -221,10 +221,13 @@ sync_local() {
 		# Free disk space
 		${keep} || rm -f "${file}"
 
-		chown ${ownership} portage > /dev/null 2>&1 && \
+		local rsync_opts="${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS}"
+		if chown ${ownership} portage > /dev/null 2>&1; then
 			chown -R ${ownership} portage
+			rsync_opts+=" --owner --group"
+		fi
 		cd portage
-		rsync ${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS} . "${PORTDIR%%/}"
+		rsync ${rsync_opts} . "${PORTDIR%%/}"
 		cd ..
 
 		__vecho "Cleaning up ..."

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 9dd2a62..a782be7 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -302,11 +302,14 @@ sync_local() {
 			echo "Executed command: tar jxf $FILE"
 			exit 1
 		fi
-		# Make sure user and group file ownership is appropriate
-		chown ${ownership} portage > /dev/null 2>&1 && \
+
+		local rsync_opts="${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS}"
+		if chown ${ownership} portage > /dev/null 2>&1; then
 			chown -R ${ownership} portage
+			rsync_opts+=" --owner --group"
+		fi
 		cd portage
-		rsync ${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS} . "${PORTDIR%%/}"
+		rsync ${rsync_opts} . "${PORTDIR%%/}"
 		cd ..
 		echo "cleaning up"
 		rm -rf portage


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:master commit in: misc/, bin/
@ 2013-06-22  6:37 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2013-06-22  6:37 UTC (permalink / raw
  To: gentoo-commits

commit:     5bc007673b3861af2f95517e163fa13660621514
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 22 06:37:12 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun 22 06:37:12 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5bc00767

emerge-webrsync: fetch_file rm absolute path

---
 bin/emerge-webrsync        | 2 +-
 misc/emerge-delta-webrsync | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 76d31f5..0a94303 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -129,7 +129,7 @@ fetch_file() {
 	elif [ "${FETCHCOMMAND/curl/}" != "${FETCHCOMMAND}" ]; then
 		opts="--continue-at - $(nvecho -s -f)"
 	else
-		rm -f "${FILE}"
+		rm -f "${DISTDIR}/${FILE}"
 	fi
 
 	__vecho "Fetching file ${FILE} ..."

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index a80c976..01d7f4a 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -222,7 +222,7 @@ fetch_file() {
 	elif [ "${FETCHCOMMAND/curl/}" != "${FETCHCOMMAND}" ]; then
 		opts="--continue-at - $(nvecho -s -f)"
 	else
-		rm -f "${FILE}"
+		rm -f "${DISTDIR}/${FILE}"
 	fi
 
 	__vecho "Fetching file ${FILE} ..."


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:master commit in: misc/, bin/
@ 2013-07-10 19:41 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2013-07-10 19:41 UTC (permalink / raw
  To: gentoo-commits

commit:     c238c02efaec0ee632968358711854e9f4d8d282
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 10 19:41:13 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Jul 10 19:41:13 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c238c02e

emerge-delta-webrsync: rm empty file, bug #476416

---
 bin/emerge-webrsync        | 11 ++++++++---
 misc/emerge-delta-webrsync |  7 ++++++-
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 0a94303..cd86537 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # Author: Karl Trygve Kalleberg <karltk@gentoo.org>
 # Rewritten from the old, Perl-based emerge-webrsync script
@@ -134,8 +134,13 @@ fetch_file() {
 
 	__vecho "Fetching file ${FILE} ..."
 	# already set DISTDIR=
-	eval "${FETCHCOMMAND}" ${opts}
-	[ -s "${DISTDIR}/${FILE}" ]
+	eval "${FETCHCOMMAND} ${opts}"
+	if [[ $? -eq 0 && -s ${DISTDIR}/${FILE} ]] ; then
+		return 0
+	else
+		rm -f "${DISTDIR}/${FILE}"
+		return 1
+	fi
 }
 
 check_file_digest() {

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 01d7f4a..f7f82f8 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -228,7 +228,12 @@ fetch_file() {
 	__vecho "Fetching file ${FILE} ..."
 	# already set DISTDIR=
 	eval "${FETCHCOMMAND} ${opts}"
-	[ -s "${DISTDIR}/${FILE}" ]
+	if [[ $? -eq 0 && -s ${DISTDIR}/${FILE} ]] ; then
+		return 0
+	else
+		rm -f "${DISTDIR}/${FILE}"
+		return 1
+	fi
 }
 
 check_file_digest() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:master commit in: misc/, bin/
@ 2013-07-16 22:10 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 9+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2013-07-16 22:10 UTC (permalink / raw
  To: gentoo-commits

commit:     abdf94b605c03e1da6baf2880c24a0b2e4db9bd4
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Jul 16 22:09:37 2013 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> com>
CommitDate: Tue Jul 16 22:09:37 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=abdf94b6

emerge-webrsync and emerge-delta-webrsync: Stop using PORTDIR.

---
 bin/emerge-webrsync        | 30 ++++++++++++++++++------------
 misc/emerge-delta-webrsync | 30 ++++++++++++++++++------------
 2 files changed, 36 insertions(+), 24 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index cd86537..6c8b240 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -43,10 +43,16 @@ eval $("${portageq}" envvar -v DISTDIR EPREFIX FEATURES \
 	FETCHCOMMAND GENTOO_MIRRORS \
 	PORTAGE_BIN_PATH PORTAGE_CONFIGROOT PORTAGE_GPG_DIR \
 	PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS \
-	PORTAGE_RSYNC_OPTS PORTAGE_TMPDIR PORTDIR \
+	PORTAGE_RSYNC_OPTS PORTAGE_TMPDIR \
 	SYNC USERLAND http_proxy ftp_proxy)
 export http_proxy ftp_proxy
 
+gentoo_repo_location=$("${portageq}" get_repo_path "${EPREFIX}/" gentoo)
+if [[ -z ${gentoo_repo_location} ]]; then
+	eecho "Repository 'gentoo' not found"
+	exit 1
+fi
+
 # If PORTAGE_NICENESS is overriden via the env then it will
 # still pass through the portageq call and override properly.
 if [ -n "${PORTAGE_NICENESS}" ]; then
@@ -112,8 +118,8 @@ get_utc_second_from_string() {
 get_portage_timestamp() {
 	local portage_current_timestamp=0
 
-	if [ -f "${PORTDIR}/metadata/timestamp.x" ]; then
-		portage_current_timestamp=$(cut -f 1 -d " " "${PORTDIR}/metadata/timestamp.x" )
+	if [ -f "${gentoo_repo_location}/metadata/timestamp.x" ]; then
+		portage_current_timestamp=$(cut -f 1 -d " " "${gentoo_repo_location}/metadata/timestamp.x" )
 	fi
 
 	echo "${portage_current_timestamp}"
@@ -200,19 +206,19 @@ sync_local() {
 	if has usersync ${FEATURES} ; then
 		case "${USERLAND}" in
 			BSD)
-				ownership=$(stat -f '%Su:%Sg' "${PORTDIR}")
+				ownership=$(stat -f '%Su:%Sg' "${gentoo_repo_location}")
 				;;
 			*)
-				ownership=$(stat -c '%U:%G' "${PORTDIR}")
+				ownership=$(stat -c '%U:%G' "${gentoo_repo_location}")
 				;;
 		esac
 	fi
 
 	if type -P tarsync > /dev/null ; then
 		local chown_opts="-o ${ownership%:*} -g ${ownership#*:}"
-		chown ${ownership} "${PORTDIR}" > /dev/null 2>&1 || chown_opts=""
+		chown ${ownership} "${gentoo_repo_location}" > /dev/null 2>&1 || chown_opts=""
 		if ! tarsync $(vvecho -v) -s 1 ${chown_opts} \
-			-e /distfiles -e /packages -e /local "${file}" "${PORTDIR}"; then
+			-e /distfiles -e /packages -e /local "${file}" "${gentoo_repo_location}"; then
 			eecho "tarsync failed; tarball is corrupt? (${file})"
 			return 1
 		fi
@@ -232,7 +238,7 @@ sync_local() {
 			rsync_opts+=" --owner --group"
 		fi
 		cd portage
-		rsync ${rsync_opts} . "${PORTDIR%%/}"
+		rsync ${rsync_opts} . "${gentoo_repo_location%%/}"
 		cd ..
 
 		__vecho "Cleaning up ..."
@@ -414,7 +420,7 @@ do_latest_snapshot() {
 				"snapshot. In order to force sync," \
 				"use the --revert option or remove" \
 				"the timestamp file located at" \
-				"'${PORTDIR}/metadata/timestamp.x'." | fmt -w 70 | \
+				"'${gentoo_repo_location}/metadata/timestamp.x'." | fmt -w 70 | \
 				while read -r line ; do
 					ewarn "${line}"
 				done
@@ -468,9 +474,9 @@ main() {
 		esac
 	done
 
-	[[ -d ${PORTDIR} ]] || mkdir -p "${PORTDIR}"
-	if [[ ! -w ${PORTDIR} ]] ; then
-		eecho "PORTDIR is not writable: ${PORTDIR}"
+	[[ -d ${gentoo_repo_location} ]] || mkdir -p "${gentoo_repo_location}"
+	if [[ ! -w ${gentoo_repo_location} ]] ; then
+		eecho "Repository 'gentoo' is not writable: ${gentoo_repo_location}"
 		exit 1
 	fi
 

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 9c27702..d4e9b84 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -40,10 +40,16 @@ eval $("${portageq}" envvar -v DISTDIR EPREFIX FEATURES \
 	FETCHCOMMAND GENTOO_MIRRORS \
 	PORTAGE_BIN_PATH PORTAGE_CONFIGROOT PORTAGE_GPG_DIR \
 	PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS \
-	PORTAGE_RSYNC_OPTS PORTAGE_TMPDIR PORTDIR \
+	PORTAGE_RSYNC_OPTS PORTAGE_TMPDIR \
 	USERLAND http_proxy ftp_proxy)
 export http_proxy ftp_proxy
 
+gentoo_repo_location=$("${portageq}" get_repo_path "${EPREFIX}/" gentoo)
+if [[ -z ${gentoo_repo_location} ]]; then
+	eecho "Repository 'gentoo' not found"
+	exit 1
+fi
+
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
 if [ -z "$NICENESS_PULLED" ]; then
@@ -109,9 +115,9 @@ if [ ${WEBSYNC_VERIFY_SIGNATURE} != 0 -a -z "${PORTAGE_GPG_DIR}" ]; then
 	exit 1
 fi
 
-[[ -d ${PORTDIR} ]] || mkdir -p "${PORTDIR}"
-if [[ ! -w ${PORTDIR} ]] ; then
-	eecho "PORTDIR is not writable: ${PORTDIR}"
+[[ -d ${gentoo_repo_location} ]] || mkdir -p "${gentoo_repo_location}"
+if [[ ! -w ${gentoo_repo_location} ]] ; then
+	eecho "Repository 'gentoo' is not writable: ${gentoo_repo_location}"
 	exit 1
 fi
 
@@ -193,8 +199,8 @@ get_utc_second_from_string() {
 get_portage_timestamp() {
 	local portage_current_timestamp=0
 
-	if [ -f "${PORTDIR}/metadata/timestamp.x" ]; then
-		portage_current_timestamp=$(cut -f 1 -d " " "${PORTDIR}/metadata/timestamp.x" )
+	if [ -f "${gentoo_repo_location}/metadata/timestamp.x" ]; then
+		portage_current_timestamp=$(cut -f 1 -d " " "${gentoo_repo_location}/metadata/timestamp.x" )
 	fi
 
 	echo "${portage_current_timestamp}"
@@ -293,19 +299,19 @@ sync_local() {
 	if has usersync ${FEATURES} ; then
 		case "${USERLAND}" in
 			BSD)
-				ownership=$(stat -f '%Su:%Sg' "${PORTDIR}")
+				ownership=$(stat -f '%Su:%Sg' "${gentoo_repo_location}")
 				;;
 			*)
-				ownership=$(stat -c '%U:%G' "${PORTDIR}")
+				ownership=$(stat -c '%U:%G' "${gentoo_repo_location}")
 				;;
 		esac
 	fi
 
 	if type -P tarsync > /dev/null ; then
 		local chown_opts="-o ${ownership%:*} -g ${ownership#*:}"
-		chown ${ownership} "${PORTDIR}" > /dev/null 2>&1 || chown_opts=""
+		chown ${ownership} "${gentoo_repo_location}" > /dev/null 2>&1 || chown_opts=""
 		if ! tarsync $(__vecho -v) -s 1 ${chown_opts} \
-			-e /distfiles -e /packages -e /local "${file}" "${PORTDIR}"; then
+			-e /distfiles -e /packages -e /local "${file}" "${gentoo_repo_location}"; then
 			eecho "tarsync failed; tarball is corrupt? (${file})"
 			return 1
 		fi
@@ -322,7 +328,7 @@ sync_local() {
 			rsync_opts+=" --owner --group"
 		fi
 		cd "${TMPDIR}"/portage
-		rsync ${rsync_opts} . "${PORTDIR%%/}"
+		rsync ${rsync_opts} . "${gentoo_repo_location%%/}"
 		cd "${DISTDIR}"
 
 		__vecho "Cleaning up ..."
@@ -498,7 +504,7 @@ do_latest_snapshot() {
 				"snapshot. In order to force sync," \
 				"use the --revert option or remove" \
 				"the timestamp file located at" \
-				"'${PORTDIR}/metadata/timestamp.x'." | fmt -w 70 | \
+				"'${gentoo_repo_location}/metadata/timestamp.x'." | fmt -w 70 | \
 				while read -r line ; do
 					ewarn "${line}"
 				done


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:master commit in: misc/, bin/
@ 2014-02-05 15:50 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 9+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2014-02-05 15:50 UTC (permalink / raw
  To: gentoo-commits

commit:     bc456db36c8ec44a4802b44d061477efbecd05e1
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Feb  5 15:50:08 2014 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever <AT> apache <DOT> org>
CommitDate: Wed Feb  5 15:50:08 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bc456db3

Rename a private function.

---
 bin/emerge-webrsync        | 6 +++---
 bin/isolated-functions.sh  | 4 ++--
 bin/save-ebuild-env.sh     | 4 ++--
 misc/emerge-delta-webrsync | 4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 85730a2..2f0689c 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # Author: Karl Trygve Kalleberg <karltk@gentoo.org>
 # Rewritten from the old, Perl-based emerge-webrsync script
@@ -50,12 +50,12 @@ export http_proxy ftp_proxy
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
 repo_name=gentoo
-repo_location=$(__repo_key "${repo_name}" location)
+repo_location=$(__repo_attr "${repo_name}" location)
 if [[ -z ${repo_location} ]]; then
 	eecho "Repository '${repo_name}' not found"
 	exit 1
 fi
-repo_sync_type=$(__repo_key "${repo_name}" sync-type)
+repo_sync_type=$(__repo_attr "${repo_name}" sync-type)
 
 # If PORTAGE_NICENESS is overriden via the env then it will
 # still pass through the portageq call and override properly.

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index b99aec7..a22af57 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}/eapi.sh"
@@ -462,7 +462,7 @@ has() {
 	return 1
 }
 
-__repo_key() {
+__repo_attr() {
 	local appropriate_section=0 exit_status=1 line saved_extglob_shopt=$(shopt -p extglob)
 	shopt -s extglob
 	while read line; do

diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index 7a31b89..98cff83 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @FUNCTION: __save_ebuild_env
@@ -71,7 +71,7 @@ __save_ebuild_env() {
 		__hasg __hasgq \
 		__save_ebuild_env __set_colors __filter_readonly_variables \
 		__preprocess_ebuild_env \
-		__repo_key __source_all_bashrcs \
+		__repo_attr __source_all_bashrcs \
 		__ebuild_main __ebuild_phase __ebuild_phase_with_hooks \
 		__ebuild_arg_to_phase __ebuild_phase_funcs default \
 		__unpack_tar __unset_colors \

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index b16982b..96564af 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # Author: Brian Harring <ferringb@gentoo.org>, karltk@gentoo.org originally.
 # Rewritten from the old, Perl-based emerge-webrsync script
@@ -47,7 +47,7 @@ export http_proxy ftp_proxy
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 
 
 repo_name=gentoo
-repo_location=$(__repo_key "${repo_name}" location)
+repo_location=$(__repo_attr "${repo_name}" location)
 if [[ -z ${repo_location} ]]; then
 	eecho "Repository '${repo_name}' not found"
 	exit 1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:master commit in: misc/, bin/
@ 2014-09-24 17:13 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2014-09-24 17:13 UTC (permalink / raw
  To: gentoo-commits

commit:     779a9e686d89e31af43e33b1163b01aeff65d7ea
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 24 16:47:58 2014 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 24 16:47:58 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=779a9e68

emerge-webrsync: fix bug #523494

Use PATH instead of PORTAGE_BIN_PATH to locate emerge.

Fixes: 0cc4c1ac21a2 ("Install Portage using setup.py")
X-Gentoo-Bug: 523494
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523494

---
 bin/emerge-webrsync        | 4 ++--
 misc/emerge-delta-webrsync | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 2f0689c..2443c2d 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -249,12 +249,12 @@ sync_local() {
 
 	if has metadata-transfer ${FEATURES} ; then
 		__vecho "Updating cache ..."
-		"${PORTAGE_BIN_PATH}/emerge" --metadata
+		emerge --metadata
 	fi
 	local post_sync=${PORTAGE_CONFIGROOT}etc/portage/bin/post_sync
 	[ -x "${post_sync}" ] && "${post_sync}"
 	# --quiet suppresses output if there are no relevant news items
-	has news ${FEATURES} && "${PORTAGE_BIN_PATH}/emerge" --check-news --quiet
+	has news ${FEATURES} && emerge --check-news --quiet
 	return 0
 }
 

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 96564af..a412ac8 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -338,12 +338,12 @@ sync_local() {
 
 	if has metadata-transfer ${FEATURES} ; then
 		__vecho "Updating cache ..."
-		"${PORTAGE_BIN_PATH}/emerge" --metadata
+		emerge --metadata
 	fi
 	local post_sync=${PORTAGE_CONFIGROOT}etc/portage/bin/post_sync
 	[ -x "${post_sync}" ] && "${post_sync}"
 	# --quiet suppresses output if there are no relevant news items
-	has news ${FEATURES} && "${PORTAGE_BIN_PATH}/emerge" --check-news --quiet
+	has news ${FEATURES} && emerge --check-news --quiet
 	return 0
 }
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:master commit in: misc/, bin/
@ 2024-07-26 10:22 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2024-07-26 10:22 UTC (permalink / raw
  To: gentoo-commits

commit:     f99eb91227918d5bf0cc531e78bd597c73b7ce1f
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Wed Jul 24 16:09:10 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 26 10:22:41 2024 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f99eb912

emerge-webrsync: actually honour the sync-webrsync-verify-signature attribute

The repo_has_webrsync_verify variable was always being set as the empty
string, despite later being compared to 1 in the arithmetic context.
Have it work in the way that was originally intended. This also
eliminates a superfluous use of the has() function, which was the reason
for my inspecting the code in the first place.

Also, apply the exact same fix to emerge-delta-webrsync.

Fixes: b5cd549e07f3d835cbe04e5b718cdd47d7ee69f5
Fixes: 0347637fe5033d3d8eb4fdafa1e86de171934819
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/emerge-webrsync        | 9 +++++----
 misc/emerge-delta-webrsync | 9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index caa4986da2..124bcaddcf 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -105,16 +105,17 @@ do_debug=0
 keep=false
 
 handle_pgp_setup() {
+	local attr repo_has_webrsync_verify webrsync_gpg
+
 	# WEBRSYNC_VERIFY_SIGNATURE=0: disable PGP verification
 	# WEBRSYNC_VERIFY_SIGNATURE=1: use gemato for verification, fallback to regular gpg
 	# WEBRSYNC_VERIFY_SIGNATURE=2: use legacy FEATURES="webrsync-gpg"
 	WEBRSYNC_VERIFY_SIGNATURE=1
 
-	has webrsync-gpg ${FEATURES} && webrsync_gpg=1 || webrsync_gpg=0
+	has webrsync-gpg ${FEATURES} && webrsync_gpg=1
 
-	repo_has_webrsync_verify=$(
-		has $(__repo_attr "${repo_name}" sync-webrsync-verify-signature	| LC_ALL=C tr '[:upper:]' '[:lower:]') true yes
-	)
+	attr=$(__repo_attr "${repo_name}" sync-webrsync-verify-signature)
+	[[ ${attr,,} == @(true|yes) ]] && repo_has_webrsync_verify=1
 
 	if [[ -n ${PORTAGE_TEMP_GPG_DIR} ]] || [[ ${repo_has_webrsync_verify} -eq 1 ]]; then
 		# If FEATURES=webrsync-gpg is enabled then allow direct emerge-webrsync

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index a788cdb0eb..8550c15fe0 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -165,16 +165,17 @@ if [[ ! -d $STATE_DIR ]]; then
 fi
 
 handle_pgp_setup() {
+	local attr repo_has_webrsync_verify webrsync_gpg
+
 	# WEBRSYNC_VERIFY_SIGNATURE=0: disable PGP verification
 	# WEBRSYNC_VERIFY_SIGNATURE=1: use gemato for verification, fallback to regular gpg
 	# WEBRSYNC_VERIFY_SIGNATURE=2: use legacy FEATURES="webrsync-gpg"
 	WEBRSYNC_VERIFY_SIGNATURE=1
 
-	has webrsync-gpg ${FEATURES} && webrsync_gpg=1 || webrsync_gpg=0
+	has webrsync-gpg ${FEATURES} && webrsync_gpg=1
 
-	repo_has_webrsync_verify=$(
-		has $(__repo_attr "${repo_name}" sync-webrsync-verify-signature	| LC_ALL=C tr '[:upper:]' '[:lower:]') true yes
-	)
+	attr=$(__repo_attr "${repo_name}" sync-webrsync-verify-signature)
+	[[ ${attr,,} == @(true|yes) ]] && repo_has_webrsync_verify=1
 
 	if [[ -n ${PORTAGE_TEMP_GPG_DIR} ]] || [[ ${repo_has_webrsync_verify} -eq 1 ]]; then
 		# If FEATURES=webrsync-gpg is enabled then allow direct emerge-webrsync


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-07-26 10:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26 10:22 [gentoo-commits] proj/portage:master commit in: misc/, bin/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2014-09-24 17:13 Zac Medico
2014-02-05 15:50 Arfrever Frehtes Taifersar Arahesis
2013-07-16 22:10 Arfrever Frehtes Taifersar Arahesis
2013-07-10 19:41 Zac Medico
2013-06-22  6:37 Zac Medico
2012-11-07 16:48 Zac Medico
2012-08-18 23:20 Zac Medico
2012-08-18 23:12 Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox