[Interest] QMAKE_COPY not used anymore for files in INSTALLS. Workaround?

Olivier B. perso.olivier.barthelemy at gmail.com
Tue Sep 25 18:35:04 CEST 2018


This does not seem to be the case.
If i try to qinstall an executable that is on a samba share, and
currently locked because the result of make install is being run,
qinstall fails with "Error copying A to B: Destination already exists"
(this error is after the remove() of previous destination file, when
QFile::copy fails).
In the QFileInfo::exists() in QFile::copy(), the path is still marked
as existing, while the app that locks the file is running. But the
QFile::remove() seems to have been 'acknowledged', and as soon as the
app unlocks the file, it disappears, so i end up without the original
nor the new destination file. Hence my need to rename the original
destination file before asking for it's removal



Le mer. 12 sept. 2018 à 18:15, Thiago Macieira
<thiago.macieira at intel.com> a écrit :
>
> On Wednesday, 12 September 2018 08:27:04 PDT Olivier B. wrote:
> > - Make a renamed backup of the previous target file if it already exists on
> > the network share, to avoid some issues (allow to overwrite the installed
> > file on the network path, even if some people are currently using that file
> > by running the project where it was installed)
>
> This one shouldn't be needed anymore. The "qinstall" should do this for you by
> writing to a temporary file and then doing an atomic rename to clobber the old
> file.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
>
>



More information about the Interest mailing list