Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 57887

Summary: emerge-webrsync is broken on macos
Product: Portage Development Reporter: Mamoru KOMACHI (RETIRED) <usata>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo, osx, sejo
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 35535    
Bug Blocks:    
Attachments: emerge-webrsync.diff
integrated emerge-webrsync.patch
Adjusted the last patch to curl
emerge-webrsync.diff3

Description Mamoru KOMACHI (RETIRED) gentoo-dev 2004-07-21 12:48:26 UTC
emerge-webrsync does not work on macos.

First, Mac OS X doesn't have GNU date and so
`date -d "-$attempts day"` doesn't work. It should be
branched by $USERLAND variable. Second, Mac OS X
doesn't have wget but curl, so it should check curl
in addition to wget. Third, Mac OS X doesn't have root
group and so chown -R root:root fails with error. 
(chown -R 0:0 works -- it is interpreted as root:wheel
on MacOS X though) 

I'll attach a patch to fix them.
Comment 1 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-07-21 12:49:06 UTC
Created attachment 35907 [details, diff]
emerge-webrsync.diff
Comment 2 Brian Harring (RETIRED) gentoo-dev 2004-07-21 16:10:15 UTC
Using fetchcommand="$(/usr/lib/portage/bin/portageq FETCHCOMMAND)" instead is a better solution imo, considering it's the user's defined fetcher.

Would require a few tweaks of course, but it's a cleaner (and simpler to maintain) solution imo.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-07-21 16:52:42 UTC
covered by the sync refactoring which will obsolete `emerge-webrsync`.
Comment 4 Brian Harring (RETIRED) gentoo-dev 2004-08-01 04:09:37 UTC
*** Bug 57879 has been marked as a duplicate of this bug. ***
Comment 5 Brian Harring (RETIRED) gentoo-dev 2004-08-01 04:57:00 UTC
Created attachment 36576 [details, diff]
integrated emerge-webrsync.patch

please take this patch for a spin- it's basically usata's patch, only modified
to use FETCHCOMMAND's usual distdir/file/uri .
It'll be pushed into cvs in the near future, so please test it (both bsd and
gnu).
Comment 6 Brian Harring (RETIRED) gentoo-dev 2004-08-01 05:01:56 UTC
*** Bug 56775 has been marked as a duplicate of this bug. ***
Comment 7 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-08-02 05:19:31 UTC
Created attachment 36632 [details, diff]
Adjusted the last patch to curl

The last patch doesn't work (missing $DISTDIR in several places).
Please use this patch instead. 

FETCHCOMMAND="/usr/bin/curl ..." didn't work properly when
the first attempt had failed because curl saved "Not found" page as
portage-20040801.tar.bz2.  I added ugly hack to use file
in order to check portage-YYYYMMDD.tar.bz2 is bzip2 compressed
file. I'm not happy with it but emerge-webrsync aborts without it.
Comment 8 Brian Harring (RETIRED) gentoo-dev 2004-08-02 05:39:30 UTC
Hmm. I did miss a couple of things, didn't I? :-/
Couple of tweaks here and there, but your additions will end up in pre14.
Comment 9 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-08-02 10:20:59 UTC
Created attachment 36652 [details, diff]
emerge-webrsync.diff3

wget is broken with diff2; this is a revised version of diff2 that is
happy with both wget and curl.
Comment 10 Brian Harring (RETIRED) gentoo-dev 2004-08-16 11:30:12 UTC
Released in pre17 iirc.