[QBS] Install fails if target file is read only

Epting, Thomas thomas.epting at stryker.com
Mon Dec 9 14:17:35 CET 2013


Hi everyone,

When trying to install a file which is marked as read-only, installation
fails if the file was changed but a previous read-only copy already
exists at the target location. This scenario can easily happen with SCCM
systems like Perforce, where unmodified checked-out files always are
marked as read-only.

Example:
 
Product {
    Group {
        name: "MyFiles"
        qbs.install: true
        qbs.installDir: "my_target"
        files : [ "my.file" ]
    }
}

When executing "install" on this, my.file is copied to my_target.
However, since the source file was checked-out from Perforce, it is
marked as read-only. After copying it to the target, the copy of my.file
also is marked as read-only. Now if the source changes for some reason
and "install" is executed again, it fails with this error message:

:-1: error: Installation error: Could not copy file 'my_source\my.file'
to 'my_target\my.file'. Destination file exists

If the read-only mark is manually removed from the target, everything
works fine. My suggestion would be to always remove the read-only mark
after copying. Note: I've already filed a bug report on this (QBS-475).

Thanks,
Thomas



Stryker Leibinger GmbH & Co. KG
Sitz: Freiburg - Handelsregister: AG Freiburg HRA 4375
Komplementaerin: Stryker Beteiligungs GmbH
Geschaeftsfuehrer: Oliver Baertl
Sitz: Freiburg - Handelsregister: AG Freiburg HRB 5441, EAR Nr. 92587730
Bankverbindung: Bank of America N.A. Frankfurt 17 362 010 - BLZ 500 109 00, IBAN: DE04 5001 0900 0017 3620 10

 

Diese Nachricht und etwaige Dateianhaenge sind vertrauliche Informationen, die besonderen Geheimhaltungsvereinbarungen oder -vorschriften unterliegen koennen. Falls Sie nicht der beabsichtigte Empfaenger der Nachricht sind, werden Sie gebeten, den Absender telefonisch oder durch E-Mail zu unterrichten und die Nachricht und etwaige Dateianhaenge vollstaendig und endgueltig zu loeschen. Die Nachricht und ihr Inhalt duerfen in diesem Fall nicht kopiert, ausgedruckt oder weitergeleitet werden.

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.  If you are not the intended recipient, please telephone or e-mail the sender and delete this message and any attachment from your system.  If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.






More information about the Qbs mailing list