Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 35907 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.diff
emerge-webrsync.diff (text/plain), 1.97 KB, created by
Mamoru KOMACHI (RETIRED)
on 2004-07-21 12:49:06 UTC
(
hide
)
Description:
emerge-webrsync.diff
Filename:
MIME Type:
Creator:
Mamoru KOMACHI (RETIRED)
Created:
2004-07-21 12:49:06 UTC
Size:
1.97 KB
patch
obsolete
>--- emerge-webrsync.orig Thu Jul 22 03:03:41 2004 >+++ emerge-webrsync Thu Jul 22 04:05:17 2004 >@@ -7,6 +7,7 @@ > > GENTOO_MIRRORS="$(/usr/lib/portage/bin/portageq gentoo_mirrors)" > PORTDIR="$(/usr/lib/portage/bin/portageq portdir)" >+USERLAND="$(/usr/lib/portage/bin/portageq envvar USERLAND)" > syncpath="/var/tmp/emerge-webrsync" > > if [ ! -d $syncpath ] ; then >@@ -18,10 +19,20 @@ > found=0 > attempts=0 > download=1 >+if which wget >/dev/null 2>&1 ; then >+ fetchcommand="wget" >+else >+ fetchcommand="curl -O" >+fi >+ > if [ "$1" == "-v" ] ; then >- wgetops= >+ opts= > else >- wgetops=-q >+ case $fetchcommand in >+ wget) opts=-q ;; >+ curl) opts=-s ;; >+ *) opts= ;; >+ esac > fi > > if [ "$1" == "-n" ] ; then >@@ -33,7 +44,8 @@ > tar jxf $file > rm -f $file > # Make sure user and group file ownership is root >- chown -R root:root portage >+ # Specify with numeric expression because of Mac OS X >+ chown -R 0:0 portage > cd portage > rsync -av --progress --stats --delete --delete-after \ > --exclude='distfiles/*' --exclude='packages/*' . ${PORTDIR%%/} >@@ -45,13 +57,21 @@ > > while (( $attempts < 40 )) ; do > >- day=`date -d "-$attempts day" +"%d"` >- month=`date -d "-$attempts day" +"%m"` >- year=`date -d "-$attempts day" +"%Y"` >+ 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" > >- if [ -f $file ] && [ $download == 0 ] ; then >+ if [ -f "$file" ] && [ "$download" == 0 ] ; then > sync_local > exit 0 > fi >@@ -60,7 +80,7 @@ > url="${i}/snapshots/$file" > rm -f $file > >- if (wget $wgetops $url) && [ -s $file ] ; then >+ if ($fetchcommand $opts $url) && [ -s $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