Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge rsync -u?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Mon Jun 03, 2002 6:04 pm    Post subject: emerge rsync -u? Reply with quote

I am reluctant to add strain to gentoo.org's CVS server, but am finding it necessary
to make some changes to files in /usr/portage, and am looking for ways to avoid having
emerge rsync blast them away. For the time being, I have added the -u flag to the rsync
call in my local copy of emerge. I would appreciate feedback on this idea. Might it be a
useful default? Toggleable option?

Or is it simply impossible to do what I am trying to do without telling emerge to use CVS?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Mon Jun 03, 2002 7:25 pm    Post subject: Re: emerge rsync -u? Reply with quote

rac wrote:
I am reluctant to add strain to gentoo.org's CVS server, but am finding it necessary
to make some changes to files in /usr/portage, and am looking for ways to avoid having
emerge rsync blast them away


What kinds of changes? If they're simply changes to your profile, you can move that profile outside of /usr/portage. You can then symlink /etc/make.profile to the new location. (or, simply copy your current profile to /etc/make.profile)

otherwise, no, there's no way to do what you're asking short of using CVS. emerge rsync blows away everything in /usr/portage whether you like it or not.

Adding that ability would certainly be useful. might check to see if anyone has filed a similar feature request on bugs.gentoo.org.

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Mon Jun 03, 2002 9:22 pm    Post subject: Re: emerge rsync -u? Reply with quote

klieber wrote:
What kinds of changes?


Some tweaking of ebuilds to get them to play nice with GCC3, and (so far) to begin trying
to recreate my necessary Japanese working environment (adding a USE canna and getting
xemacs-gtk to use it, for example). Not just profile stuff.

kleiber wrote:
otherwise, no, there's no way to do what you're asking short of using CVS. emerge rsync blows away everything in /usr/portage whether you like it or not.


Well, adding the -u flag to the rsync call did seem to have the desired effect of preserving
local files if they were modified more recently than the upstream version. Since actual
official Gentoo developers would (I assume) bump release numbers when modifying an ebuild,
I figured this should be OK. Here's the trivial patch, if anyone is remotely interested:

Code:

--- /usr/lib/portage/bin/emerge~ Thu May 30 13:57:55 2002
+++ /usr/lib/portage/bin/emerge Mon Jun  3 10:54:37 2002
@@ -897,7 +897,7 @@
    print "!!! /usr/bin/rsync does not exist, so rsync support is disabled."
    print "!!! Type \"emerge net-misc/cvs\" to enable rsync support."
    sys.exit(1)
-  mycommand="/usr/bin/rsync -rlptDvz --stats --progress "
+  mycommand="/usr/bin/rsync -rlptDvzu --stats --progress "
   if rclean:
    mycommand=mycommand+"--delete --exclude='distfiles/*' --exclude='packages/*' "
   mycommand=mycommand+syncuri+"/* "+myportdir


The only downside of this approach that I have thought of so far is that it is not easy
to get back to the original behavior, if you want rsync to overwrite things again.
I figure it would be fairly easy to add a command-line argument to toggle this behavior;
the main question seems to me whether or not this is an important enough feature
to warrant bloating one of the crucial Portage components. My first instinct would be "no",
so I am certainly not suggesting that the current behavior is a bug.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
tdb
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 293
Location: New Orleans, Louisiana, U.S.A. (what's left of it anyway...)

PostPosted: Mon Jun 30, 2003 5:08 pm    Post subject: Reply with quote

Just curious, wouldn't moving your modified ebuilds into the portage overlay directory keep them from getting blasted with an rsync? I dont' know if you have to change the names, though.
Back to top
View user's profile Send private message
dice
Guru
Guru


Joined: 21 Apr 2002
Posts: 577

PostPosted: Tue Jul 01, 2003 1:27 am    Post subject: Reply with quote

tdb wrote:
Just curious, wouldn't moving your modified ebuilds into the portage overlay directory keep them from getting blasted with an rsync? I dont' know if you have to change the names, though.


I'd probably use the PORTDIR_OVERLAY directory and create my own set of packages (i.e. app-xemacs/xemacs-base-dice-1.75-r2 ) and use the PROVIDE variable in the ebuild to keep portage happy.
Back to top
View user's profile Send private message
avenj
Retired Dev
Retired Dev


Joined: 11 Oct 2002
Posts: 495
Location: New Hampshire

PostPosted: Tue Jul 01, 2003 2:59 am    Post subject: Reply with quote

tdb wrote:
Just curious, wouldn't moving your modified ebuilds into the portage overlay directory keep them from getting blasted with an rsync? I dont' know if you have to change the names, though.


Wow, talk about reviving a dead thread...

(The original posts were likely before overlay support existed. Check out the dates)
Back to top
View user's profile Send private message
tdb
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 293
Location: New Orleans, Louisiana, U.S.A. (what's left of it anyway...)

PostPosted: Tue Jul 01, 2003 5:23 am    Post subject: Reply with quote

I actually realized the dates after I posted. Need to slow down next time.
Back to top
View user's profile Send private message
Woland
Apprentice
Apprentice


Joined: 02 Aug 2002
Posts: 248
Location: Russian Jack, Alaska

PostPosted: Tue Jul 01, 2003 6:24 am    Post subject: Reply with quote

Well gentlmen, this is some walk down memory lane----although at first my mouth was gaping open at the fact that rac didn't seem to know about overlay.

This thread does show you came up with a very elegant solution to this problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum