* [gentoo-user] emerge --buildpkg --unmerge
@ 2010-10-29 16:46 Fatih Tümen
2010-10-29 18:18 ` Alan McKinnon
0 siblings, 1 reply; 4+ messages in thread
From: Fatih Tümen @ 2010-10-29 16:46 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] emerge --buildpkg --unmerge
2010-10-29 16:46 [gentoo-user] emerge --buildpkg --unmerge Fatih Tümen
@ 2010-10-29 18:18 ` Alan McKinnon
2010-10-29 19:26 ` Fatih Tümen
0 siblings, 1 reply; 4+ messages in thread
From: Alan McKinnon @ 2010-10-29 18:18 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] emerge --buildpkg --unmerge
2010-10-29 18:18 ` Alan McKinnon
@ 2010-10-29 19:26 ` Fatih Tümen
2010-10-29 19:54 ` Alan McKinnon
0 siblings, 1 reply; 4+ messages in thread
From: Fatih Tümen @ 2010-10-29 19:26 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] emerge --buildpkg --unmerge
2010-10-29 19:26 ` Fatih Tümen
@ 2010-10-29 19:54 ` Alan McKinnon
0 siblings, 0 replies; 4+ messages in thread
From: Alan McKinnon @ 2010-10-29 19:54 UTC (permalink / raw
To: gentoo-user; +Cc: Fatih Tümen
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-29 19:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-29 16:46 [gentoo-user] emerge --buildpkg --unmerge Fatih Tümen
2010-10-29 18:18 ` Alan McKinnon
2010-10-29 19:26 ` Fatih Tümen
2010-10-29 19:54 ` Alan McKinnon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox