[MacPorts] #29223: if an install is interrupted, a later install of the same package can fail if version number has since changed.

MacPorts noreply at macports.org
Thu Apr 21 00:50:00 PDT 2011


#29223: if an install is interrupted, a later install of the same package can fail
if version number has since changed.
----------------------------------+-----------------------------------------
 Reporter:  rogerdpack@…          |       Owner:  macports-tickets@…                   
     Type:  defect                |      Status:  new                                  
 Priority:  Normal                |   Milestone:                                       
Component:  ports                 |     Version:  1.9.2                                
 Keywords:                        |        Port:                                       
----------------------------------+-----------------------------------------
Changes (by ryandesign@…):

 * cc: ryandesign@… (added)


Comment:

 Replying to [comment:4 ryandesign@…]:
 > Replying to [comment:3 rogerdpack@…]:
 > > I suppose I am hoping that when it does the fetch phase it can double
 check that its cached fetch is the right version.
 >
 > I'm telling you that MacPorts already does this, by comparing the date
 the portfile was modified with the date the work directory was created.

 Unfortunately, I've just realized at least one way this problem can occur,
 and have been able to reproduce a failure like yours on my own system.

 It hinges on the following sequence of events (using m4 as the example
 port, though it would apply to any port):

  1. At time T1, you sync or selfupdate, getting a current set of ports
 (for example including m4 1.4.15)
  2. At time T2, we update a port (for example we update m4 to 1.4.16)
  3. At time T3, without selfupdating or syncing again, you begin
 installing e.g. m4 (1.4.15) and cancel the installation before it
 finishes, or it stops due to an error
  4. At time T4, you sync or selfupdate, which downloads our current set of
 portfiles, preserving the modification date/time of those changes. Now you
 have the new m4 1.4.16 Portfile, but its modification date/time is T2,
 whereas the creation date of your m4 port's work directory is T3
  5. At time T5, you try installing m4 again, which, since the work
 directory seems to be newer than the portfile, is retained instead of
 being cleaned up

 We're going to have to think about the proper way of fixing this.

-- 
Ticket URL: <https://trac.macports.org/ticket/29223#comment:5>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list