This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author d.amian
Recipients d.amian, eric.araujo, tarek
Date 2011-11-17.11:23:56
SpamBayes Score 3.0066186e-08
Marked as misclassified No
Message-id <1321529038.98.0.0841934486822.issue13420@psf.upfronthosting.co.za>
In-reply-to
Content
Hi, I had a problem making deb packages with distutils and cdbs. Looking for any solution, I found Issue 11933 and saw that the newer() method has been changed, using [ST_MTIME] instead of st_mtime. This commit is to solve Issue 10148 that describes a bug when copying files with python, it depends on the filesystem.

In these changes, modification time of files are checked as a integer, discarding the millisec. It makes the issue.

For example, I've a file that is modified with an installation prefix. CDBS runs the build step and after the install step. In build step, the prefix is '/usr/local' because the prefix argument isn't supported, immediately the install step runs with prefix='/usr', so the file that contains a variable with project path modified with the prefix is not copied by distutils, it runs in a different millisec but in the same second.

Then when install my app, it crashes because the variable with project path is '/usr/local' instead of '/usr' and this variable is used in the source.

To solve this problem I made ​​some modifications on file_util.py and dep_util.py files, I revert the changes of the issue 11933, but rounding all times returned by stat() with two decimals. With that changes, distutils is not affected by the Issue 10148 and if any file is modified in the same second, but in different millisec, distutils will compare it and it wil copy the file.
History
Date User Action Args
2011-11-17 11:23:59d.amiansetrecipients: + d.amian, tarek, eric.araujo
2011-11-17 11:23:58d.amiansetmessageid: <1321529038.98.0.0841934486822.issue13420@psf.upfronthosting.co.za>
2011-11-17 11:23:58d.amianlinkissue13420 messages
2011-11-17 11:23:57d.amiancreate