Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Re: [SLE] stupid dependencies
  • From: Luca Botti <botti.luca@xxxxxxxx>
  • Date: Mon, 7 Mar 2005 18:43:06 +0100
  • Message-id: <200503071843.06331.botti.luca@xxxxxxxx>
thanks John


Alle 17:53, lunedì 07 marzo 2005, John Kelly ha scritto:
> On Mon, 07 Mar 2005 09:12:48 +0100, Luca Botti <botti.luca@xxxxxxxx>
>
> wrote:
> >> John Kelly ha scritto:
> >>
> >> I use grep and sed in a shell script to strip the source rpm spec
> >> files down to essential dependencies
> >
> > Would you mind sharing the script you use?
>
> Here is my script called "breq" which you can customize to your own
> needs. It prints a new BuildRequires: line to stdout, which you can
> capture and use to replace the one in the spec file.
>
> It requires first copying the *.spec file to *.spec.orig, which is a
> good idea anyway.
>
> I also add to the new spec file lines like:
>
> Source971: {somepackage}.spec.orig
> Source972: {somepackage}.spec.patch
>
> and move the .spec.orig and .spec.patch files to SOURCES for capture
> when building a new source RPM, because later, I may forget what
> changes I made; sometimes I add additional source code patches, etc.
>
> >#!/bin/sh
> >grep -m 1 '^BuildRequires:' /usr/src/packages/SPECS/*.spec.orig | sed -r \
> > -e 's/[[:space:]]+acl([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+attr([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+cvs([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+devs([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+doxygen([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+filesystem([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+gcc-g77([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+gcc-java([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+gcc-objc([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+gnat-runtime([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+gnat([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+gpm([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+graphviz([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+less([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+libgcj-devel([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+libgcj([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+libobjc([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+libselinux-devel([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+libselinux([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+libzio([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+module-init-tools([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+netcfg([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+openldap2-client([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+openslp-devel([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+openslp([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+permissions([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+postfix([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+procinfo([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+psmisc([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+pwdutils([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+rcs([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+strace([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+syslogd([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+unzip([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+update-desktop-files([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+vim([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+xorg-x11-devel([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+xorg-x11-libs([[:space:]]+|$)/ /' \
> > -e 's/[[:space:]]+xorg-x11([[:space:]]+|$)/ /' \
> >
> > | xargs -n 1 | sort | tr '\n' ' ' | sed -e 's/ $//'; echo
>
> Enjoy!
>
> --
> A: Maybe because some people are too annoyed by top-posting.
> Q: Why do I not get an answer to my question(s)?
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?

< Previous Next >
Follow Ups