Christian, you can speedupdate the script a lot by query the rpm once for a single package instead of multiple times. Have a look at the aptate script of apt4rpm project (providing the tools to keep your system up to date, so might want to check those tools as well). Here is an excerpt from the aptate tool: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/apt4rpm/apt4rpm/server/aptate... n?rev=1.138.2.31&only_with_tag=libxml2_branch&content-type=text/vnd.viewcvs-ma rkup RPM_QUALIFIER="RPM_QRYRES RPM_TYPE=%{SOURCERPM}" RPM_QUALIFIER="$RPM_QUALIFIER RPM_NVR=%{NAME}-%{VERSION}-%{RELEASE}" RPM_QUALIFIER="$RPM_QUALIFIER RPM_ARCH=%{ARCH}\n" RPM_OUT=$(rpm -qp -requires --queryformat "$RPM_QUALIFIER" $FILENAME 2>/dev/null) if [ $? -eq 0 ]; then RPM_OUT=$(echo "$RPM_OUT" | sed 's+rpmlib(PatchRPMs).*$+RPM_QRYRES RPM_PATCHRPM=yes+' | grep ^RPM_QRYRES | cut -d" " -f2- ) eval $RPM_OUT aptate can be found at http://apt4rpm.sf.net
builtfrom=$(rpm -qp --queryformat '%-8{SOURCERPM}' $1) rpmgroup=$(rpm -qp --queryformat '%-8{GROUP}' $1) copyright=$(rpm -qp --queryformat '%-8{COPYRIGHT}' $1) author=$(rpm -qp --queryformat '%-8{PACKAGER}' $1) version=$(rpm -qp --queryformat '%-8{VERSION}' $1) release=$(rpm -qp --queryformat '%-8{RELEASE}' $1)
-- Richard Bos -- Dit bericht is verzonden met Webmail van Freeler. Ook snel en betrouwbaar toegang tot internet? Meld je aan op http://www.freeler.nl
Richard,
aptate can be found at http://apt4rpm.sf.net
thank you for the tip. The tool looks very interesting. So I will have a look at the Advanced Package Tool. Regards Christian -- Christian Stoltze Computer Science, University of Constance (Lake Constance/SW-Germany) Email: Christian.Stoltze@uni-konstanz.de Voice: +49 (0)7531 88-4448 Fax: +49 (0)7531 88-3577
* Christian Stoltze <stoltze@fmi.uni-konstanz.de> [Sep 10. 2002 09:27]:
Richard,
aptate can be found at http://apt4rpm.sf.net
thank you for the tip. The tool looks very interesting. So I will have a look at the Advanced Package Tool.
Just a side note, the next SuSE release will have a script for generating the package database which now looks different due to major changes in package handling. Anas -- Anas Nashif <nashif@suse.com>, SuSE Linux AG Montreal (Laval), Canada
participants (3)
-
Anas Nashif
-
Christian Stoltze
-
Richard Bos