[Mageia-dev] [soft-commits] [7213] Check-in debuginfo-install

Pascal Terjan pterjan at gmail.com
Sat Jan 26 23:14:10 CET 2013


On Sat, Jan 26, 2013 at 4:22 PM,  <root at mageia.org> wrote:
> Revision 7213 Author kamil Date 2013-01-26 17:22:26 +0100 (Sat, 26 Jan 2013)
>
> Log Message
>
> Check-in debuginfo-install
>
> Added Paths
>
> rpm/debuginfo-install/trunk/debuginfo-install
>
> Added: rpm/debuginfo-install/trunk/debuginfo-install
> ===================================================================
> --- rpm/debuginfo-install/trunk/debuginfo-install	
> (rev 0)
> +++ rpm/debuginfo-install/trunk/debuginfo-install	2013-01-26 16:22:26 UTC
> (rev 7213)
> @@ -0,0 +1,14 @@
> +#!/usr/bin/sh
> +# Kamil Rytarowski 2012, <kamil AT mageia DOT org> | <n54 AT gmx DOT com>
> +# Any copyright is dedicated to the Public Domain.
> +# http://creativecommons.org/publicdomain/zero/1.0/
> +
> +urpmi_args=""
> +
> +while [ "$1" ]; do
> +  new_arg="`urpmq --sourcerpm $1|awk -F': ' '{print $2}'|sed
> 's/-[^-]*-[^-]*$/-debuginfo/'`"
> +  urpmi_args="$urpmi_args $new_arg"
> +  shift
> +done

You can run urpmq only once with all the args but as the packages are
installed, I would just use rpmquery

urpmi $(rpmquery --qf "%{SOURCERPM}\n" "$@" | sed 's/-[^-]*-[^-]*$/-debuginfo/')

That should make things faster :)


More information about the Mageia-dev mailing list