dragora-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dragora-users] Dragora recipes with cp command


From: Matias Fonzo
Subject: Re: [Dragora-users] Dragora recipes with cp command
Date: Sun, 06 Feb 2022 18:28:35 -0300
User-agent: Roundcube Webmail/1.4.12

Hello DustDFG,

El 2022-02-06 15:05, Dust DFG escribió:

I saw that many of dragora recipes use the "cp -p" command. I want to ask
you why you don't use the mv command. Cp command waste time and disk
resource. When source directory of package and package-$pkgname directories
are in the one filesystem and one physical disk(most cases), mv command
just moves the file (It is cheap). When those directories aren't near, mv
command is similar to cp. I think mv should be preferred.

The "cp -p" command is in various parts of a recipe in order to copy local files that are located in the working directory, such as a configuration file, a configuration for a daemon, etc. Mostly it is used to copy documentation from a source and insert it preserving the timestamp in the documentation directory for a package.

Moving the files instead of copying them would not be ideal, since it would disarrange the git aggregate files, also if you move the documentation files from a source, they would no longer be there when you want to preserve the source at build time (qi -k recipe).

For example, a recipe for the package buildtree-generic that copies a folder with kernel sources and binaries and then removes the original folder. It isn't quick but it is very expensive because a computer wastes time and disk resources.


For this particular case, yes, it may be useful and save resources instead of copying the kernel source directory...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]