[MacPorts] #49498: Switching to a mirror causes a complete rebuild of the port index

MacPorts noreply at macports.org
Wed Oct 28 17:16:28 PDT 2015


#49498: Switching to a mirror causes a complete rebuild of the port index
----------------------------+---------------------
 Reporter:  lpancescu@…     |      Owner:  admin@…
     Type:  defect          |     Status:  new
 Priority:  Normal          |  Milestone:
Component:  server/hosting  |    Version:
 Keywords:                  |       Port:
----------------------------+---------------------
 I switched to a local mirror as a workaround to the network problems
 described in bug #49452. The rsync-ing was very fast, but the lack of an
 index made mirror switching pretty annoying: the first "port selfupdate"
 thinks that every single port is new, and rebuilds the entire index. So
 mirror users have to wait 30+ minutes for the index to build (see bug
 #49050) not once, but //two times//.

 I was curious why that happens, so I base.tar from three different mirrors
 (sea.us.rsync.macports.org, lil.fr.rsync.macports.org and
 nue.de.rsync.macports.org). Since MacPorts 2.3.4 was released some time
 ago, I expected the archives to be identical. They aren't, although the
 file size is the same: diff reports every archive as binary different from
 the other two. The timestamps also differ: 20:02, 23:02, respectively
 22:02 - all from today. After unpacking the archives into different
 directories, I used FileMerge to directly compare the directories: every
 single file is identical, but the tar archives aren't. So I redirected the
 output of "ls -lR" in each directory to a different file, then ran "diff
 -u" to compare them. Here's a part of the result:
 {{{
  -rw-r--r--   1 laur  staff  1922 May 24  2014 pkg_mkindex.sh.in
 -drwxr-xr-x   8 laur  staff   272 Oct 28 19:31 port
 -drwxr-xr-x  35 laur  staff  1190 Oct 28 19:31 port1.0
 -drwxr-xr-x   4 laur  staff   136 Oct 28 19:31 programs
 -drwxr-xr-x  36 laur  staff  1224 Oct 28 19:31 registry2.0
 +drwxr-xr-x   8 laur  staff   272 Oct 28 22:31 port
 +drwxr-xr-x  35 laur  staff  1190 Oct 28 22:31 port1.0
 +drwxr-xr-x   4 laur  staff   136 Oct 28 22:31 programs
 +drwxr-xr-x  36 laur  staff  1224 Oct 28 22:31 registry2.0
  drwxr-xr-x  11 laur  staff   374 May 24  2014 tclobjc1.0
  drwxr-xr-x  19 laur  staff   646 May 24  2014 thread2.6
 --rwxr-xr-x   1 laur  staff  4311 Oct 28 19:30
 upgrade_sources_conf_default.tcl
 +-rwxr-xr-x   1 laur  staff  4311 Oct 28 22:30
 upgrade_sources_conf_default.tcl
  -rwxr-xr-x   1 laur  staff  4265 May 24  2014
 upgrade_sources_conf_default.tcl.in
 }}}

 It seems that the timestamps of //every single directory// and of the few
 generated files (files like Makefile probably generated from Makefile.in)
 are set to the timestamp of the archive on the mirror. Perhaps the "fresh"
 directory timestamps are the reason for the index being rebuilt, and that
 each mirror runs some sort of build locally, at least daily, even when
 nothing has actually changed? I should have downloaded ports.tar.gz, to be
 sure, but it's quite big.

-- 
Ticket URL: <https://trac.macports.org/ticket/49498>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list