From owner-freebsd-ports@FreeBSD.ORG Wed Jul 10 09:03:47 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DF9E56BE for ; Wed, 10 Jul 2013 09:03:47 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from eu1sys200aog117.obsmtp.com (eu1sys200aog117.obsmtp.com [207.126.144.143]) by mx1.freebsd.org (Postfix) with ESMTP id 422F51D3A for ; Wed, 10 Jul 2013 09:03:46 +0000 (UTC) Received: from mail-ea0-f182.google.com ([209.85.215.182]) (using TLSv1) by eu1sys200aob117.postini.com ([207.126.147.11]) with SMTP ID DSNKUd0jV3nK++fN2ZrNjrh7tnceDLziG6Mp@postini.com; Wed, 10 Jul 2013 09:03:47 UTC Received: by mail-ea0-f182.google.com with SMTP id d10so4791926eaj.27 for ; Wed, 10 Jul 2013 02:03:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:date:from:message-id:to:subject:reply-to:x-gm-message-state; bh=E6lqkyw8rKO9hhw8QDxUQaRay0Sv9/8EQaUvOrNuOEY=; b=nI0vYJz0jKhSPfX5YRJe7LEp5QNh3WYWCyWFJh16Ah/QCNzsbeI5snCemYKjXGhJ8t flIptU/LUDy6Ej+x1zh7V+KybsEiNEJfRDIMY5JotT67uPwvC3mf6sZOBNfUGALtJavi 39sqoglqkUo5Ols14ELyeZVI8jzgtYclvXll5Vx+ohjbHzxobHXheg75VHvl++rHy8ro TU/QSlXXiUToPJHZAFRpkiXUcIsz4MjwtsA6S2UuOwq7G1+1SLTomdUM3deJ50TiNqD4 8vWj8FgM9b89ZVoBf5CWvy+zgvahrHtkGF48TVPn53o+JLW3I9q6cwgiZJr39RH21+oO BHqA== X-Received: by 10.14.215.5 with SMTP id d5mr34910077eep.143.1373446999618; Wed, 10 Jul 2013 02:03:19 -0700 (PDT) X-Received: by 10.14.215.5 with SMTP id d5mr34910071eep.143.1373446999532; Wed, 10 Jul 2013 02:03:19 -0700 (PDT) Received: from mech-cluster241.men.bris.ac.uk (mech-cluster241.men.bris.ac.uk. [137.222.187.241]) by mx.google.com with ESMTPSA id cg12sm58268772eeb.7.2013.07.10.02.03.18 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Jul 2013 02:03:18 -0700 (PDT) Sender: Anton Shterenlikht Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6) with ESMTP id r6A93Gl0001318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 10 Jul 2013 10:03:16 +0100 (BST) (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6/Submit) id r6A93Gdb001317 for freebsd-ports@freebsd.org; Wed, 10 Jul 2013 10:03:16 +0100 (BST) (envelope-from mexas) Date: Wed, 10 Jul 2013 10:03:16 +0100 (BST) From: Anton Shterenlikht Message-Id: <201307100903.r6A93Gdb001317@mech-cluster241.men.bris.ac.uk> To: freebsd-ports@freebsd.org Subject: order of patches under ports/xxx/zzz/files X-Gm-Message-State: ALoCoQneGKij2Toew9NepoNBzfbqqoGj3/8BoLgqIvVz/pzTfk7fuHnt3it2Cg9VqnjVC2Sy1O7SL8m8sfFSSDIBv1lRKUkkHW3BPzSV6j0ZglTfNvElmOHiq+dgPtNPi87H0civIaC5Or+gMARx/pUiiVOIdD7lH7FEusoyY6KOBquCPsWTgIc= X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bristol.ac.uk List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2013 09:03:48 -0000 I'm trying to understand exactly how the patches located in files directory in a port apply. For example, port math/metis-edf has under files: # ls files/ medis-patch-Lib_Makefile.txt patch-Lib::proto.h patch-Test::Makefile patch-CONFIG::configure patch-Lib_Makefile patch-onmetis patch-CONFIG_onmetis.in patch-Programs::Makefile # Patch medis-patch-Lib_Makefile.txt must be applied on top of patch-Lib_Makefile. This does seem to work, but what process makes sure that the order of patch application is exactly that. I can see that it works manually: # cd ./work/metis-edf-4.1/ /usr/ports/math/metis-edf/work/metis-edf-4.1 # patch < ../../files/patch-Lib_Makefile Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- Lib/Makefile.orig 2008-12-03 11:08:03.000000000 +0100 |+++ Lib/Makefile 2010-05-16 16:33:40.000000000 +0200 -------------------------- Patching file Lib/Makefile using Plan A... Hunk #1 succeeded at 2. Hunk #2 succeeded at 22. done # patch < ../../files/medis-patch-Lib_Makefile.txt Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- Lib/Makefile.intermediate 2013-03-22 20:40:34.429173000 +0000 |+++ Lib/Makefile -------------------------- Patching file Lib/Makefile using Plan A... Hunk #1 succeeded at 22. done # and that applying the second patch directly does not work: # cd ../.. # make clean extract ===> Cleaning for metis-edf-4.1.2_3 ===> metis-edf-4.1.2_3 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by metis-edf-4.1.2_3 for building ===> Extracting for metis-edf-4.1.2_3 => SHA256 Checksum OK for aster-full-src-10.8.0-3.noarch.tar.gz. (cd /usr/ports/math/metis-edf/work && /usr/bin/tar -xf /usr/ports/math/metis-edf/work/aster-full-src-10.8.0/SRC/metis-edf-4.1-2.noarch.tar.gz --no-same-owner --no-same-permissions) # cd work/metis-edf-4.1/ # patch < ../../files/medis-patch-Lib_Makefile.txt Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- Lib/Makefile.intermediate 2013-03-22 20:40:34.429173000 +0000 |+++ Lib/Makefile -------------------------- Patching file Lib/Makefile using Plan A... Hunk #1 failed at 22. 1 out of 1 hunks failed--saving rejects to Lib/Makefile.rej done # But how does the ports environment know the order of patch application? Thanks Anton