• Re: dh_auto_clean, autoconf, and building packages twice (was: Potentia

    From Andrey Rakhmatullin@21:1/5 to Magnus Holmgren on Sun Jun 23 14:20:01 2024
    On Sun, Jun 23, 2024 at 02:06:04PM +0200, Magnus Holmgren wrote:
    I'm very late to the party, but after reading the entire thread, I'd like to discuss a more specific, but perhaps not uncommon, situation with regard to cleaning and building again:

    We have a [still fairly] typical upstream package using Autotools. The tarball
    includes some built files (e.g. documentation), i.e. make dist builds them (as
    long as the right tools are installed) and make distclean deletes them. dh_auto_clean by default runs make distclean if such a target exists. But that's not the case until ./configure has been run, because until then, there
    are no makefiles. So The first time you run debian/rules build, the shipped version of the files will be untouched and used in the final package, but when
    you then clean and build again, they will be deleted and rebuilt (or the second build fails because of missing build dependencies).

    Besides building a package twice potentially failing, this can lead to the second build being different from the first. So I'm thinking:

    1. Do we generally want dh_auto_build to run make distclean, deleting files that we otherwise wouldn't need to build?

    My autotools knowledge is rusty so I don't know what else except docs is included here, but docs is a perfect example of a thing that we normally
    *want* to rebuild.



    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmZ4EQQtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh IWQP/AgwpAKxIUiHJFt+Qm7fYfn0aPiU7h4nnAwX3fghs2AZ/++h1P7H4R8jIHBj ByJn8WpJSIZbE0cwTRtoAUSyZBPS/S28n66OXwvs/JID7OuiQlSNW4MD+q4BmEOR J88nqq00cIa5Ck9ZQqNf4laCepi4aAdR2GV5thv1N6MeHHTOPKArSsZCsAj78/9W RE8H3+a5deR9xNgo6ZZjuP2Ep57KkrGTxolIorHGzBc/K4tRMI01oHVsPdcm7r+W B2K+CftrfLhNT1dltf/Y6kzW1ELjc1j6NY3ms62KHfAogQkj+Uo/60ZIl78nSEkQ pG8ymxM8YcY2lsWPSPdfs14lkAhUI5KpshsUaepIqp4iBXWL+UiLk90nOugNj89q ESruKV8Z1obf7xZuBYjwGYvtRSHBPS6jRFNvH9c5ztoevFKRRCDD2PKwPg/MN61b ZtV2L9lVarCxnXM9fw9/QhanQRIuiJY6hDk5obIEiJFjN7repDesAEZx/svlp4gZ QRP7BrFxKSKmTTdgEsRRQZ7K/JtxqFMzW1F9HnwL4raTIeo6AKpmHBl0Ne3Taudh ezqST/I2Z91c8eclCM+fdhKrBHZeFbI/+4Q7JKtsUDcFgCV+g/TTlFCID49Guv9b PEiRZaYmIouEb/o5X5dmVBX24JvvoFhocTS5TlFzbOmowbG7
    =bFhe
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)