Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 23409 Details for
Bug 35535
[PATCH] `emerge sync` refactoring
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
cvs module
cvs.py (text/plain), 2.24 KB, created by
Marius Mauch (RETIRED)
on 2004-01-08 12:10:52 UTC
(
hide
)
Description:
cvs module
Filename:
MIME Type:
Creator:
Marius Mauch (RETIRED)
Created:
2004-01-08 12:10:52 UTC
Size:
2.24 KB
patch
obsolete
>from aux import * # to be removed >import os,portage >import sync > >class CvsConnection(sync.Connection): > def __init__(self, src, dest, settings): > self.transtype = "cvs" > self.syncuri = src[6:] > if not self.syncuri[0] == ":": > self.syncuri = ":"+self.syncuri > self.portdir = dest > self.settings = settings > > def setup(self): > # checking for old SYNC form > if self.syncuri.count(":") == 1: > info("The old syntax for cvs-sync with the implicit gentoo-x86 module is") > info("deprecated. Please change your make.conf to the new syntax:") > info(" cvs://access:user@server:cvsroot:cvsmodule") > info("(access should be \"ext\" for ssh-based CVS as used by Gentoo)") > self.cvsaccess = "ext" > self.cvsroot = self.syncuri > self.cvsmodule = "gentoo-x86" > elif self.syncuri.count(":") in [3, 4]: > self.cvsaccess=self.syncuri.split(":")[1] > mpos=self.syncuri.rindex(":") > self.cvsmodule=self.syncuri[mpos+1:] > self.cvsroot=self.syncuri[:mpos] > else: > warn("invalid cvs SYNC setting: cvs://%s, syntax is:" % self.syncuri) > warn(" cvs://:access:user@server:cvsroot:cvsmodule") > return -1 > > if not self.toolcheck("/usr/bin/cvs", "dev-util/cvs", quiet=False): > return -1 > > def sync(self): > cvsdir=os.path.dirname(self.portdir) > if not os.path.exists(self.portdir+"/CVS"): > #initial checkout > msg(">>> starting initial cvs checkout with %s ...\n" % self.syncuri) > if self.cvsaccess != "ext": > rValue = portage.spawn("cd "+cvsdir+"; cvs -d "+self.cvsroot+" login",free=1) > if rValue: > warn("cvs login error [exitcode %d]; aborting." % rValue) > return rValue > if os.path.exists(cvsdir+"/"+self.cvsmodule): > warn("existing %s/%s directory; aborting." % (cvsdir, self.cvsmodule)) > return -1 > rValue = portage.spawn("cd "+cvsdir+"; cvs -z0 -d "+self.cvsroot+" co "+self.cvsmodule,free=1) > if rValue: > warn("cvs checkout error [exitcode %d]; aborting." % rValue) > return rValue > if cvsdir != self.portdir: > portage.movefile(cvsdir+"/"+self.cvsmodule,self.portdir) > return 0 > else: > #cvs update > msg(">>> starting cvs update with cvs://%s ..." % self.syncuri) > rValue=portage.spawn("cd "+self.portdir+"; cvs -z0 -q update -dP",free=1) > return rValue > > >print "Loading cvs" >sync.addTransport("cvs", CvsConnection)
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 Raw
Actions:
View
Attachments on
bug 35535
:
22067
|
22068
|
22069
|
23407
|
23408
| 23409 |
23410
|
23411