FS#28374 - [pacman] makepkg should clean an existing src directory
Attached to Project:
Pacman
Opened by Olivier (olive) - Sunday, 12 February 2012, 10:03 GMT
Last edited by Allan McRae (Allan) - Monday, 20 February 2012, 08:07 GMT
Opened by Olivier (olive) - Sunday, 12 February 2012, 10:03 GMT
Last edited by Allan McRae (Allan) - Monday, 20 February 2012, 08:07 GMT
|
Details
Description:
Where we build a package, makepkg utar its source in the directory containing the PKGBUIOLD by default, but it is configurable in /etc/makepkg.conf. For that it uses bsdtar, but the last one does not clean an existing src directory, it just overwrite existing files. If we had junk in the src from a previous build, the package is build in a non clean directory. I think makepkg should systematically wipe out any existing src directory before building a package to be sure the package to be build is clean (unless the -e option is specifies, of course). Additional info: * package version(s) pacman 4.0.1-4 |
This task depends upon
Closed by Allan McRae (Allan)
Monday, 20 February 2012, 08:07 GMT
Reason for closing: Duplicate
Additional comments about closing: FS#17175
Monday, 20 February 2012, 08:07 GMT
Reason for closing: Duplicate
Additional comments about closing:
If for whatever reason you want to keep src files across several builds, the -e option is there and makepkg correctly warn that there is no integrity check and that the result will be from whatever is in the src files. In the latter case there is no bsdtar in the src directory which is reasonable.
Keeping the src directory might be what we want in some cases and the -e option is there for that. But I do not see a valid reason to want bsdtar to overwrite existing file in the src directory and at the same time do not want a clean src directory.
Sometimes, we need to apply a patch which would create a new file or rename an existing file, if we do not prune the exsiting src directory before the extraction and just overwrite the one in the src tarball, these newly created files by the patch applied in the previous building would cause the current patch failed to apply.
For a none vcs package, it is better remove the existing src directory before building, or at less the src tarball destination if it exists.
For a vcs package, the vcs-build directory need to be recreated before the building process.