[MacPorts] #16373: svn git and hg fetch type should maintain a persistent working copy

MacPorts noreply at macports.org
Tue Mar 18 09:02:47 PDT 2014


#16373: svn git and hg fetch type should maintain a persistent working copy
---------------------------+--------------------------------
  Reporter:  ryandesign@…  |      Owner:  macports-tickets@…
      Type:  enhancement   |     Status:  new
  Priority:  Normal        |  Milestone:  MacPorts Future
 Component:  base          |    Version:  1.7.0
Resolution:                |   Keywords:  performance fetch
      Port:                |
---------------------------+--------------------------------

Comment (by mojca@…):

 Replying to [comment:13 cal@…]:
 > Keeping a (bare repo) clone of the whole thing would speed up fetching
 even after a port is updated, though. Packaging tarballs wouldn't.

 Yes, that would be a huge benefit over tarballs.

 > Also we can't easily avoid the git dependency because by the time the
 fetch phase is started we wouldn't know whether our mirrors already had a
 generated tarball or we'd have to fetch from git.

 I don't think that getting rid of the dependency on git would be of any
 substantial benefit.

 > I guess getting this implemented using bare clones wouldn't be so hard
 after all. For git, you'd have to
 >  - generate a unique identifier from the repository URL (e.g. using a
 hash function)
 >  - test whether $cachedir/$identifier is a valid git repository
 >  - create a bare clone if it isn't, run git fetch if it is
 >  - export the version/revision/tag you need from $cachedir/$identifier
 into $worksrcdir.

 I would also suggest to add/check the SHA sum of the commit (even when
 dealing with tags) just to be on the safe side.

 > I think that's actually easier to implement than getting the mirroring
 stuff you propose into the scripts that update our distfile mirrors.

 I'm too clumsy when it comes to tcl (I've learnt to handle the
 `Portfiles`, but changing anything in base is still too complex for me).

 I would be thrilled if someone would be willing and able to implement
 this.

 Once that gets implemented – how would you handle GitHub and BitBucket
 from that point on? And how would you handle situations when the servers
 go offline? Would you mirror the bare repository on one of MacPorts
 servers? (This is of course less important.)

-- 
Ticket URL: <https://trac.macports.org/ticket/16373#comment:14>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list