public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Peter Alfredsen <loki_val@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user]  Applying patches without needing overlays and modifying ebuilds
Date: Sun, 17 May 2009 12:13:27 +0200	[thread overview]
Message-ID: <20090517121327.15e28ff8@gentoo.org> (raw)
In-Reply-To: <20090517094220.5d49de31@krikkit.digimed.co.uk>

On Sun, 17 May 2009 09:42:20 +0100
Neil Bothwick <neil@digimed.co.uk> wrote:

> I think you can redefine ebuild functions
> in /etc/portage/env/cat/pkg, so you could out a custom src_unpack()
> in there. It should work if the ebuild has no src_unoack, so you
> could do something like
> 
> src_unpack() {
> 	unpack ${A}
> 	epatch mypatch
> }
> 
> I don't know how this would work with an existing src_unpack in the
> ebuild, if you copied the existing function and added your patch.

I use /etc/portage/bashrc for the same purpose. For instance, this is a
patch I'm tacking onto portage ATM:

if [[ ${CATEGORY}/${PN} == sys-apps/portage ]]
then
        post_src_unpack() {
                cd "${S}"/bin
                epatch "/etc/portage/patches/misc-functions.patch"
        }
fi

As you can see, there are post_ and pre_ phases for all phase functions
which can be used to do fancy stuff like this.

I prefer /etc/portage/bashrc for this, since these hacks are usually
only needed for a short time, so having them all in one place for an
easy overview helps to keep the cruft down.

/loki_val



  reply	other threads:[~2009-05-17 10:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-17  6:44 [gentoo-user] Applying patches without needing overlays and modifying ebuilds Nikos Chantziaras
2009-05-17  6:48 ` Saphirus Sage
2009-05-17  7:20   ` [gentoo-user] " Nikos Chantziaras
2009-05-17  8:22     ` Mike Kazantsev
2009-05-17  8:26 ` [gentoo-user] " Graham Murray
2009-05-17  8:42 ` Neil Bothwick
2009-05-17 10:13   ` Peter Alfredsen [this message]
2009-05-17 10:33     ` [gentoo-user] " Nikos Chantziaras
2009-05-17 17:30     ` [gentoo-user] " Neil Bothwick
2009-05-26 10:56 ` Pavel Sanda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090517121327.15e28ff8@gentoo.org \
    --to=loki_val@gentoo.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox