Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 142729 Details for
Bug 208991
dev-lang/ocaml - ocaml-rebuild.sh script should use portage API instead of messing with VDB directly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
ocaml-rebuild.sh
ocaml-rebuild.sh (text/plain), 1.72 KB, created by
Jakub Moc (RETIRED)
on 2008-02-05 15:44:02 UTC
(
hide
)
Description:
ocaml-rebuild.sh
Filename:
MIME Type:
Creator:
Jakub Moc (RETIRED)
Created:
2008-02-05 15:44:02 UTC
Size:
1.72 KB
patch
obsolete
>#!/bin/sh ># run like this: ocaml-rebuild.sh [-h|--help|-f|--force] [emerge_options] > >emerge="$(type -P emerge) --ignore-default-opts" >portageq="$(type -P portageq)" >egrep="$(type -P egrep)" > >if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then > echo "usage: ocaml-rebuild.sh [-h | --help | -f | --force)] [emerge_options]" > echo "With -f|--force, the packages will first be unmerged and then emerged" > echo "with the given options to ensuree correct dependancy analysis." > echo "Otherwise emerge is run with the --pretend flag and the given" > echo "options." > echo "It is recommended to keep the list of rebuilt packages printed" > echo "in pretend mode in case something go wrong" > exit 1 >fi > >if [ "$1" = "-f" ] || [ "$1" = "--force" ] ; then > pretend=0 > shift >else > pretend=1 > echo "Running in pretend mode, will only show which actions would be taken ..." >fi > >installed="$($portageq match / '')" > >echo "Searching installed packages for ocaml dependencies." >echo "Please be patient; this will take a while ..." > >depends= >for i in $installed ; do > LC_ALL=C # grep performance completely sucks with UTF-8 > depstring="$($portageq metadata / installed $i DEPEND)" > if echo $depstring | $egrep -l 'dev-lang/ocaml|dev-ml/findlib' > /dev/null ; then > depends="$depends $i" > fi >done > >echo "Building a list of packages to reinstall ..." > >toclean= >tobuild= >for dep in $depends ; do > slot="$($portageq metadata / installed $dep SLOT)" > tobuild=">=$dep:$slot $tobuild" > toclean="=$dep:$slot $toclean" >done > >if [ "$toclean" != "" ] ; then > if [ $pretend -eq 1 ] ; then > $emerge --pretend $@ $tobuild > else > echo "Cleaning $toclean ..." > $emerge --unmerge $toclean > echo "Building $tobuild ..." > $emerge $@ $tobuild > fi >else > echo "Nothing to update" >fi > >echo "All done!"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 208991
: 142729 |
155605