From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1GxTC0-00039z-Pt for garchives@archives.gentoo.org; Thu, 21 Dec 2006 19:03:01 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kBLJ29RL027744; Thu, 21 Dec 2006 19:02:09 GMT Received: from shuttle.zlin.dk (port78.ds1-abs.adsl.cybercity.dk [212.242.227.17]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kBLJ04eC028453 for ; Thu, 21 Dec 2006 19:00:04 GMT Received: from BA.zlin.dk (unknown [10.0.0.3]) by shuttle.zlin.dk (Postfix) with ESMTP id 36A5630037 for ; Thu, 21 Dec 2006 20:00:04 +0100 (CET) From: Bo =?utf-8?q?=C3=98rsted_Andresen?= To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] portage idea - auto embed user patches Date: Thu, 21 Dec 2006 19:59:42 +0100 User-Agent: KMail/1.9.5 References: <458A9B09.7070804@area-b.msu.ru> In-Reply-To: <458A9B09.7070804@area-b.msu.ru> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2617527.OcMd1A5Nr6"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612212000.04085.bo.andresen@zlin.dk> X-Archives-Salt: 36d47868-944e-4fc2-9136-852d0c610261 X-Archives-Hash: 58cf667453b114565d9920ff1f4a5ebc --nextPart2617527.OcMd1A5Nr6 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 21 December 2006 15:32, Alexander Zubkov wrote: > I have some idea on extending portage building system (ebuild?). > Sometimes I'm (for example) want to apply custom patch to some package. > This patch can do something unusual, that can not be accepted by > maintainers and I know this. But I like features in my patch and want it > to apply automatically when updating the package. Not to do it like this: > $ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 unpack > $ cd /var/tmp/portage/pkg-categoty/some-package/work/... > $ patch -p1 < ~/my-patch-for-some-package > $ cd > $ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 merge > > It is lot of manual work. The idea is having an file, for example > /etc/portage/package.patch with contents like this: > =3Dpkg-category/some-package-1* /path/to/my-patch-for-some-package > > Of course, patches could fail in newer versions. But when I'll use that > feature - I'll understand why it can be and it'll be more convenient to > maintain it. You can also use the post_src_unpack() user hook and the profile.bashrc in = the=20 base profile for this. E.g.: # mkdir -p /etc/portage/env/$category # cat << END > /etc/portage/env/$category/$name post_src_unpack() { epatch foo.patch } END =2D-=20 Bo Andresen --nextPart2617527.OcMd1A5Nr6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBFitm08/kKEzmwNNoRAoZaAJwJ27LjZi6ndGB1e2S4IlKFyLN35ACgrt5J 2DtvqJMlXFt47LSJ7etH/PQ= =wmiL -----END PGP SIGNATURE----- --nextPart2617527.OcMd1A5Nr6-- -- gentoo-dev@gentoo.org mailing list