Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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)

share|improve this question
1  
Probably a --force-all could help, nevertheless it is overkill. I would see the exact error message. –  enzotib Sep 6 '11 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 '11 at 16:16
    
What's the error you see? How are you installing the package? –  Iain Lane Sep 6 '11 at 17:54
    
@Iain Lane, I added the error message –  Brendan Long Sep 6 '11 at 18:53
add comment

1 Answer

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.