#29523 closed defect (fixed)
Strange definition of "future"
Reported by: | mattalbright@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.0.0 |
Component: | base | Version: | 1.9.2 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), raimue (Rainer Müller) | |
Port: |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Future: "You keep using that word. I do not think it means what you think it means."
From trunk/base/src/port1.0/portutil.tcl:
if {[file mtime ${portpath}/Portfile] >= [clock seconds]} { return -code error "Portfile is from the future - check date and time of your system" }
I'm pretty sure "future" means mtime > now, not >=. I'm syncing a Portfile from an RCS and building it in a script, and apparently my computer is too fast, cause it's getting this error about the future.
Yes, a sleep 1
works, but c'mon! :-)
Change History (4)
comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… raimue@… added |
---|---|
Component: | ports → base |
Description: | modified (diff) |
comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
comment:3 Changed 13 years ago by raimue (Rainer Müller)
Resolution: | → fixed |
---|---|
Status: | new → closed |
I didn't expect anyone to be fast enough to trigger this! ;-)
Seriously, modifications in the same second should not be a problem. Committed as suggested in r78956.
comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Milestone: | → MacPorts 2.0.0 |
---|
Note: See
TracTickets for help on using
tickets.
This seems like a valid complaint, and I have encountered this problem myself when I am especially quick about pressing Command-S in the editor, Command-Tab to return to the Terminal, Up Arrow to repeat the last "sudo port install" command, and Return to execute it, all in less than one second. Rainer, you added this check in r65246. Any reason not to change it as the reporter indicates?