cp --preserve=mode might prevent that.
However, I'm wondering why the +x gets lost in the first place. Normal GNU copy seems to copy that flag by default. Even when doing it as root using sudo.

Aren't we looking in the wrong place for the executable bit(s) to fall off?

-- Bas.


On 2018-10-15 20:53, Burton, Ross wrote:
cp -a will preserve ownership, which you don't want.

Ross
On Mon, 15 Oct 2018 at 19:45, Bas Mevissen <[email protected]> wrote:



cp -a or --preserve(=<something>) optionally combined with other options
does the trick. However, using install is the better solution.


-- Bas.

On 2018-10-15 14:35, Burton, Ross wrote:
> As you've discovered, cp doesn't preserve permissions.  Using install
> -m755 is the idiom.
>
> Ross
> On Mon, 15 Oct 2018 at 11:12, Belisko Marek <[email protected]>
> wrote:
>>
>> Hi,
>>
>> I have package which contains bunch of scripts (with +x flag for
>> user). When installed in do_install method (simply by copying them to
>> destination) they loose +x flag. I know copying directly is not best
>> approach but there exists better way how to keep scripts permissions
>> like in repo (except calling install -m 755 for all of them)? Thanks.
>>
>> BR,
>>
>> marek
>>
>> --
>> as simple and primitive as possible
>> -------------------------------------------------
>> Marek Belisko - OPEN-NANDRA
>> Freelance Developer
>>
>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>> Tel: +421 915 052 184
>> skype: marekwhite
>> twitter: #opennandra
>> web: http://open-nandra.com
>> --
>> _______________________________________________
>> yocto mailing list
>> [email protected]
>> https://lists.yoctoproject.org/listinfo/yocto

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to