From patchwork Tue Feb 14 14:49:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 19528 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15834C6379F for ; Tue, 14 Feb 2023 14:49:35 +0000 (UTC) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by mx.groups.io with SMTP id smtpd.web11.8692.1676386172451702240 for ; Tue, 14 Feb 2023 06:49:33 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SeNoSVvl; spf=pass (domain: bootlin.com, ip: 217.70.183.194, mailfrom: michael.opdenacker@bootlin.com) Received: (Authenticated sender: michael.opdenacker@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 94BD340011; Tue, 14 Feb 2023 14:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1676386170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2XyOFCsNpqFRhZS6q9K84FOyxI5XAlozIKClVUZZ5QA=; b=SeNoSVvlMF4TfF7HE/2SyP7+8SYziH5KKR8+uMvJo1jxjNDiDtX0jcAg1/IuOpL4AV6MLv FxmkZ3pXdprqCOYf2Lxb+Ta5j6cMifTneb7zBpiqgbaPjJ6/ZOg2FfQfoIvu+stceM6Y6B r5MOpS78kv/dnp2g86LO/VbJFtuQN1INyhhhC4TDLACbsIXcDLXWyO+6y3/X3s9q+GQ2Vf Kqt2BZzSzZPJJ0yr1ilc6ItPQjqiUIJfZCE1i+yLVN0ZXDb9kwNuDHcxVfkb/9OvvLL20j 2LqRxeLiNnpeUcBj/BOem6HImf1QNMwYloC8abdziPE8WGnGMvjAxAdKgIAKzQ== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [PATCH] [RFC] dev-manual: stop advising to produce patches with Quilt Date: Tue, 14 Feb 2023 15:49:27 +0100 Message-Id: <20230214144927.80982-1-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 14 Feb 2023 14:49:35 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/3683 From: Michael Opdenacker Signed-off-by: Michael Opdenacker --- Who still wants to produce patches with Quilt instead of Git? Who still wants to accept patches which are not generated by Git or a modern source control system? Today: - 1012 patches in Poky were created using Git - 4 patches were created using Quilt If this patch is acceptable, I'll also update dev-manual/debugging.rst so that it gives an example based on git, to create a patch for a package to fix. --- documentation/dev-manual/debugging.rst | 3 - documentation/dev-manual/index.rst | 1 - documentation/dev-manual/quilt.rst | 89 -------------------------- 3 files changed, 93 deletions(-) delete mode 100644 documentation/dev-manual/quilt.rst diff --git a/documentation/dev-manual/debugging.rst b/documentation/dev-manual/debugging.rst index 9fb159eae6..e36d5a8fc1 100644 --- a/documentation/dev-manual/debugging.rst +++ b/documentation/dev-manual/debugging.rst @@ -820,9 +820,6 @@ to patch the ``Makefile.am`` file, which is generated from $ quilt add Makefile.am File Makefile.am added to patch patches/parallelmake.patch -For more information on using Quilt, see the -":ref:`dev-manual/quilt:using quilt in your workflow`" section. - At this point you need to make the edits to ``Makefile.am`` to add the missing dependency. For our example, you have to add the following line to the file:: diff --git a/documentation/dev-manual/index.rst b/documentation/dev-manual/index.rst index b0bb5576ad..affea1cf46 100644 --- a/documentation/dev-manual/index.rst +++ b/documentation/dev-manual/index.rst @@ -18,7 +18,6 @@ Yocto Project Development Tasks Manual new-machine upgrading-recipes temporary-source-code - quilt.rst development-shell python-development-shell building diff --git a/documentation/dev-manual/quilt.rst b/documentation/dev-manual/quilt.rst deleted file mode 100644 index 59240705ad..0000000000 --- a/documentation/dev-manual/quilt.rst +++ /dev/null @@ -1,89 +0,0 @@ -.. SPDX-License-Identifier: CC-BY-SA-2.0-UK - -Using Quilt in Your Workflow -**************************** - -`Quilt `__ is a powerful tool -that allows you to capture source code changes without having a clean -source tree. This section outlines the typical workflow you can use to -modify source code, test changes, and then preserve the changes in the -form of a patch all using Quilt. - -.. note:: - - With regard to preserving changes to source files, if you clean a - recipe or have :ref:`ref-classes-rm-work` enabled, the - :ref:`devtool workflow ` - as described in the Yocto Project Application Development and the - Extensible Software Development Kit (eSDK) manual is a safer - development flow than the flow that uses Quilt. - -Follow these general steps: - -#. *Find the Source Code:* Temporary source code used by the - OpenEmbedded build system is kept in the :term:`Build Directory`. See the - ":ref:`dev-manual/temporary-source-code:finding temporary source code`" section to - learn how to locate the directory that has the temporary source code for a - particular package. - -#. *Change Your Working Directory:* You need to be in the directory that - has the temporary source code. That directory is defined by the - :term:`S` variable. - -#. *Create a New Patch:* Before modifying source code, you need to - create a new patch. To create a new patch file, use ``quilt new`` as - below:: - - $ quilt new my_changes.patch - -#. *Notify Quilt and Add Files:* After creating the patch, you need to - notify Quilt about the files you plan to edit. You notify Quilt by - adding the files to the patch you just created:: - - $ quilt add file1.c file2.c file3.c - -#. *Edit the Files:* Make your changes in the source code to the files - you added to the patch. - -#. *Test Your Changes:* Once you have modified the source code, the - easiest way to test your changes is by calling the :ref:`ref-tasks-compile` - task as shown in the following example:: - - $ bitbake -c compile -f package - - The ``-f`` or ``--force`` option forces the specified task to - execute. If you find problems with your code, you can just keep - editing and re-testing iteratively until things work as expected. - - .. note:: - - All the modifications you make to the temporary source code disappear - once you run the :ref:`ref-tasks-clean` or :ref:`ref-tasks-cleanall` - tasks using BitBake (i.e. ``bitbake -c clean package`` and - ``bitbake -c cleanall package``). Modifications will also disappear if - you use the :ref:`ref-classes-rm-work` feature as described in - the ":ref:`dev-manual/disk-space:conserving disk space during builds`" - section. - -#. *Generate the Patch:* Once your changes work as expected, you need to - use Quilt to generate the final patch that contains all your - modifications:: - - $ quilt refresh - - At this point, the - ``my_changes.patch`` file has all your edits made to the ``file1.c``, - ``file2.c``, and ``file3.c`` files. - - You can find the resulting patch file in the ``patches/`` - subdirectory of the source (:term:`S`) directory. - -#. *Copy the Patch File:* For simplicity, copy the patch file into a - directory named ``files``, which you can create in the same directory - that holds the recipe (``.bb``) file or the append (``.bbappend``) - file. Placing the patch here guarantees that the OpenEmbedded build - system will find the patch. Next, add the patch into the :term:`SRC_URI` - of the recipe. Here is an example:: - - SRC_URI += "file://my_changes.patch" -