Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 36652 Details for
Bug 57887
emerge-webrsync is broken on macos
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
emerge-webrsync.diff3
emerge-webrsync.diff3 (text/plain), 2.43 KB, created by
Mamoru KOMACHI (RETIRED)
on 2004-08-02 10:20:59 UTC
(
hide
)
Description:
emerge-webrsync.diff3
Filename:
MIME Type:
Creator:
Mamoru KOMACHI (RETIRED)
Created:
2004-08-02 10:20:59 UTC
Size:
2.43 KB
patch
obsolete
>--- emerge-webrsync.orig Mon Aug 2 19:46:38 2004 >+++ emerge-webrsync Tue Aug 3 02:09:57 2004 >@@ -7,21 +7,27 @@ > > GENTOO_MIRRORS="$(/usr/lib/portage/bin/portageq gentoo_mirrors)" > PORTDIR="$(/usr/lib/portage/bin/portageq portdir)" >-syncpath="/var/tmp/emerge-webrsync" >+FETCHCOMMAND="$(/usr/lib/portage/bin/portageq envvar FETCHCOMMAND)" >+USERLAND="$(/usr/lib/portage/bin/portageq envvar USERLAND)" >+DISTDIR="/var/tmp/emerge-webrsync" > >-if [ ! -d $syncpath ] ; then >- mkdir -p $syncpath >+if [ ! -d $DISTDIR ] ; then >+ mkdir -p $DISTDIR > fi > >-cd $syncpath >- > found=0 > attempts=0 > download=1 > if [ "$1" == "-v" ] ; then > wgetops= > else >- wgetops=-q >+ #this sucks. probably better to do 1> /dev/null >+ #that said, waiting on the refactoring. >+ if [ "${FETCHCOMMAND/wget}" != "${FETCHCOMMAND}" ]; then >+ wgetops="-q" >+ elif [ "${FETCHCOMMAND/curl}" != "${FETCHCOMMAND}" ]; then >+ wgetops="-s -f" >+ fi > fi > > if [ "$1" == "-n" ] ; then >@@ -29,11 +35,12 @@ > fi > > sync_local() { >+ cd $DISTDIR > echo Syncing local tree... >- tar jxf $file >- rm -f $file >+ tar jxf $FILE >+ rm -f $FILE > # Make sure user and group file ownership is root >- chown -R root:root portage >+ chown -R 0:0 portage > cd portage > rsync -av --progress --stats --delete --delete-after \ > --exclude='distfiles/*' --exclude='packages/*' . ${PORTDIR%%/} >@@ -45,22 +52,30 @@ > > while (( $attempts < 40 )) ; do > >- day=`date -d "-$attempts day" +"%d"` >- month=`date -d "-$attempts day" +"%m"` >- year=`date -d "-$attempts day" +"%Y"` >+ #this too, sucks. it works in the interim though. >+ if [ "$USERLAND" == "BSD" ] ; then >+ daysbefore=$(expr $(date +"%s") - 86400 \* $attempts) >+ day=$(date -r $daysbefore +"%d") >+ month=$(date -r $daysbefore +"%m") >+ year=$(date -r $daysbefore +"%Y") >+ else >+ day=$(date -d "-$attempts day" +"%d") >+ month=$(date -d "-$attempts day" +"%m") >+ year=$(date -d "-$attempts day" +"%Y") >+ fi > >- file="portage-${year}${month}${day}.tar.bz2" >+ FILE="portage-${year}${month}${day}.tar.bz2" > >- if [ -f $file ] && [ $download == 0 ] ; then >+ if [ -f $DISTDIR/$FILE ] && [ $download == 0 ] ; then > sync_local > exit 0 > fi > > for i in $GENTOO_MIRRORS ; do >- url="${i}/snapshots/$file" >- rm -f $file >+ URI="${i}/snapshots/$FILE" >+ rm -f $DISTDIR/$FILE > >- if (wget $wgetops $url) && [ -s $file ] ; then >+ if (eval "$FETCHCOMMAND $wgetops") && [ -s $DISTDIR/$FILE ] ; then > sync_local > echo > echo " *** Completed websync, please now perform a normal rsync if possible."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 57887
:
35907
|
36576
|
36632
| 36652