[gentoo-dev] portage idea - auto embed user patches

2006-12-21 Thread Alexander Zubkov
Hi!
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:
=pkg-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.

-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] portage idea - auto embed user patches

2006-12-21 Thread Yuri Vasilevski
Hello,

On Thu, 21 Dec 2006 17:32:41 +0300
Alexander Zubkov [EMAIL PROTECTED] wrote:

 Hi!
 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:
 =pkg-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 use portage's bashrc to do that kind of autopatching.

Best regards,
Yuri.
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] portage idea - auto embed user patches

2006-12-21 Thread Raymond Lewis Rebbeck
On Friday, 22 December 2006 1:02, Alexander Zubkov wrote:
 Hi!
 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:
 =pkg-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 edit ebuilds to apply whatever patches you want and put them in an 
overlay. Usually it's just an epatch line that needs to be added.

-- 
Raymond Lewis Rebbeck
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] portage idea - auto embed user patches

2006-12-21 Thread Alec Warner

Alexander Zubkov wrote:

You can use portage's bashrc to do that kind of autopatching.




I have no idea how I can change environment so ebuild will do additional
actions...
May be I can redefine src_unpack function. But package can have its own
src_unpack. If there will be something like system_after_src_unpack,
then I can do it. But I don't know about such.


http://dev.gentoo.org/~solar/bashrc

At the bottom of solar's bashrc you will find some lines dealing with 
AUTOPATCH, I don't see the bashrc.autopatch in his dev space, but you 
can probably request it from him.


-Alec Warner
[EMAIL PROTECTED]
--
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] portage idea - auto embed user patches

2006-12-21 Thread Timothy Redaelli
Alexander Zubkov wrote:
 Hi!
 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:
 =pkg-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 use a bashrc script http://forums.gentoo.org/viewtopic-t-339019.html

-- 
Timothy `Drizzt` Redaelli - http://drizzt.bsdnet.eu/blog/
FreeSBIE Developer, Gentoo Developer, GUFI Staff
There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence.  -- Jeremy S. Anderson



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] portage idea - auto embed user patches

2006-12-21 Thread Alexander Zubkov
 
 You can use a bashrc script http://forums.gentoo.org/viewtopic-t-339019.html
 

Thanks all. I was misunderstood the place of bashrc. Now I see, that it
is a solution. :)
-- 
gentoo-dev@gentoo.org mailing list