3

I'm working with two virtualized servers which keep time extremely poorly for some reason, so that one is always a little bit ahead of the other (up to 2 seconds). The problem I'm having is that I build packages on the one "in the future", and then the other machine refuses to install them. The build-upload-install is one step, so I could potentially just add a delay, but I'd prefer not to.

Is there a way to tell dpkg to just ignore the timestamp?

The error message looks like this:

 [exec] Command: sudo /usr/bin/dpkg -i /home/deploy/Media/Media_2011-09-06_100724.deb
 [exec] Error: tar: ./control: time stamp 2011-09-06 10:07:47 is 2.68160212 s in the future
 [exec] tar: ./control-template: time stamp 2011-09-06 10:07:46 is 1.681412205 s in the future
 [exec] tar: ./postinst: time stamp 2011-09-06 10:07:46 is 1.681347869 s in the future
 [exec] tar: .: time stamp 2011-09-06 10:07:47 is 2.681313485 s in the future

(it's part of an ant script)

4
  • 1
    Probably a --force-all could help, nevertheless it is overkill. I would see the exact error message.
    – enzotib
    Sep 6, 2011 at 16:05
  • I think fixing your time problem shouldn't be very complicated and is the best way to solve your problem instead of looking for some workaround to ignore it.
    – laurent
    Sep 6, 2011 at 16:16
  • What's the error you see? How are you installing the package?
    – Iain Lane
    Sep 6, 2011 at 17:54
  • @Iain Lane, I added the error message Sep 6, 2011 at 18:53

1 Answer 1

2

The best option would be to install the ntp package to get time sync working correctly, but barring that, you could trick the other system's "dpkg" into thinking it is living in the future by installing the faketime package, and running it with "-f +10s":

$ date +%H:%M:%S; faketime -f +10s date +%H:%M:%S
22:38:52
22:39:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .