FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 10-29-2010, 04:46 PM
Fatih Tümen
 
Default emerge --buildpkg --unmerge

Hi,

Is there a way tell portage to build binary package before removing it
from the system?

man emerge says:
--buildpkg (-b)
Tells emerge to build binary packages for all ebuilds
processed in addition to actually **merging** the packages.
[...]
An alternative for already-merged packages is to use
quickpkg(1) which creates a tbz2 from the live filesystem.

I have about 20 packages to unmerge or remerge with new use flags. But
I want to keep binary copies (with old use settings) before unmerging
them. Unfortunately I did not have buildpkg in FEATURES at the time of
emerging them. Doing this now by hand sounds kinda fatigue unless...
the output of --pretend was parsable so I do what I want by..

for pkg in ${PKGS}; do quickpkg --include-config=y $pkg; done

or by something better?

Thanks for ideas in advance.
--
* *Fatih
 
Old 10-29-2010, 06:18 PM
Alan McKinnon
 
Default emerge --buildpkg --unmerge

Apparently, though unproven, at 18:46 on Friday 29 October 2010, Fatih Tümen
did opine thusly:

> Hi,
>
> Is there a way tell portage to build binary package before removing it
> from the system?
>
> man emerge says:
> --buildpkg (-b)
> Tells emerge to build binary packages for all ebuilds
> processed in addition to actually **merging** the packages.
> [...]
> An alternative for already-merged packages is to use
> quickpkg(1) which creates a tbz2 from the live filesystem.
>
> I have about 20 packages to unmerge or remerge with new use flags. But
> I want to keep binary copies (with old use settings) before unmerging
> them. Unfortunately I did not have buildpkg in FEATURES at the time of
> emerging them. Doing this now by hand sounds kinda fatigue unless...
> the output of --pretend was parsable so I do what I want by..
>
> for pkg in ${PKGS}; do quickpkg --include-config=y $pkg; done
>
> or by something better?
>
> Thanks for ideas in advance.
> --
> Fatih


Write a wrapper script around quickpkg and emerge.

And set buildpkg in FEATURES so this doesn't happen again :-)



--
alan dot mckinnon at gmail dot com
 
Old 10-29-2010, 07:26 PM
Fatih Tümen
 
Default emerge --buildpkg --unmerge

On Fri, Oct 29, 2010 at 21:18, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
> Apparently, though unproven, at 18:46 on Friday 29 October 2010, Fatih Tümen
> did opine thusly:
>
>> Hi,
>>
>> Is there a way tell portage to build binary package before removing it
>> from the system?
>>
>> man emerge says:
>> --buildpkg (-b)
>> * * * * * * * Tells *emerge *to *build binary packages for all ebuilds
>> processed in addition to actually **merging** the packages.
>> * * * * * * * [...]
>> * * * * * * * An alternative for already-merged packages is to use
>> quickpkg(1) which creates a tbz2 from the live filesystem.
>>
>> I have about 20 packages to unmerge or remerge with new use flags. But
>> I want to keep binary copies (with old use settings) before unmerging
>> them. Unfortunately I did not have buildpkg in FEATURES at the time of
>> emerging them. Doing this now by hand sounds kinda fatigue unless...
>> the output of --pretend was parsable so I do what I want by..
>>
>> for pkg in ${PKGS}; do quickpkg --include-config=y $pkg; done
>>
>> or by something better?
>>
>> Thanks for ideas in advance.
>> --
>> * *Fatih
>
>
> Write a wrapper script around quickpkg and emerge.
>
> And set buildpkg in FEATURES so this doesn't happen again :-)


'wrapper' rang the bell. Thanks.

The only one I recalled was post_src_install from lafilefixer thing.
So I grepped /usr/lib/portage/ for it and found the list of others at
/usr/lib/portage/bin/isolated-functions.sh +521 and wrote this inside
/etc/portage/bashrc

pkg_prerm() {
echo ">>> Building binary package before unmerging "
if [[ -f /var/db/.pkg.portage_lockfile ]]; then
rm -f /var/db/.pkg.portage_lockfile #2>/dev/null
fi
quickpkg --include-config=y "=$CATEGORY/$P"
touch /var/db/.pkg.portage_lockfile
}

Voila!

--
* *Fatih
 
Old 10-29-2010, 07:54 PM
Alan McKinnon
 
Default emerge --buildpkg --unmerge

Apparently, though unproven, at 21:26 on Friday 29 October 2010, Fatih Tümen
did opine thusly:

> On Fri, Oct 29, 2010 at 21:18, Alan McKinnon <alan.mckinnon@gmail.com>
wrote:
> > Apparently, though unproven, at 18:46 on Friday 29 October 2010, Fatih
> > Tümen
> >
> > did opine thusly:
> >> Hi,
> >>
> >> Is there a way tell portage to build binary package before removing it
> >> from the system?
> >>
> >> man emerge says:
> >> --buildpkg (-b)
> >> Tells emerge to build binary packages for all ebuilds
> >> processed in addition to actually **merging** the packages.
> >> [...]
> >> An alternative for already-merged packages is to use
> >> quickpkg(1) which creates a tbz2 from the live filesystem.
> >>
> >> I have about 20 packages to unmerge or remerge with new use flags. But
> >> I want to keep binary copies (with old use settings) before unmerging
> >> them. Unfortunately I did not have buildpkg in FEATURES at the time of
> >> emerging them. Doing this now by hand sounds kinda fatigue unless...
> >> the output of --pretend was parsable so I do what I want by..
> >>
> >> for pkg in ${PKGS}; do quickpkg --include-config=y $pkg; done
> >>
> >> or by something better?
> >>
> >> Thanks for ideas in advance.
> >> --
> >> Fatih
> >
> > Write a wrapper script around quickpkg and emerge.
> >
> > And set buildpkg in FEATURES so this doesn't happen again :-)
>
> 'wrapper' rang the bell. Thanks.
>
> The only one I recalled was post_src_install from lafilefixer thing.
> So I grepped /usr/lib/portage/ for it and found the list of others at
> /usr/lib/portage/bin/isolated-functions.sh +521 and wrote this inside
> /etc/portage/bashrc
>
> pkg_prerm() {
> echo ">>> Building binary package before unmerging "
> if [[ -f /var/db/.pkg.portage_lockfile ]]; then
> rm -f /var/db/.pkg.portage_lockfile #2>/dev/null
> fi
> quickpkg --include-config=y "=$CATEGORY/$P"
> touch /var/db/.pkg.portage_lockfile
> }


It didn't occur to me to do it that way :-)

But it's actually a fine idea, and the way you are supposed to do it by
design. Maybe next time I'll remember what those hooks are for :-)




--
alan dot mckinnon at gmail dot com
 

Thread Tools




All times are GMT. The time now is 08:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org