Commit 92c5aa32 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmreqs: fix for x86_64

parent 4714410e
......@@ -25,6 +25,7 @@ get_rpm_package_requires()
filter_pkgname()
{
sed -e "s/^i586-//g
s/.*(64bit)$//g
s/\.32bit$//g"
}
......@@ -37,7 +38,7 @@ filter_multiple_provides()
s|/usr/bin/wine||g
s|/usr/bin/jconsole|java-1.7.0-openjdk-devel|g
s|/sbin/modprobe||g
s|gcc-c++|gcc4.7-c++|g
s|gcc-c++|gcc5-c++|g
s|libwine.so.1||g"
}
......@@ -122,7 +123,7 @@ passwdqc-control"
trans_rpmdeps_to_pkgname_lav()
{
# partially copied from aptU
local ALREADYHANDLEDRPM="rpmlib.* rtld libgcc_s\..* libstdc\+\+.* libc\.so.* ld-linux\.so.* libpthread\.so.* librt\.so.* libdl\.so.*"
local ALREADYHANDLEDRPM="rpmlib.* rtld libgcc_s\..* libstdc\+\+.* libc\.so.* libm\.so.* ld-linux\.so.* libpthread\.so.* librt\.so.* libdl\.so.*"
local REQLIST="$@"
REQLIST=$(estrlist reg_wordexclude "$ALREADYHANDLEDRPM" "$REQLIST")
......@@ -130,17 +131,21 @@ trans_rpmdeps_to_pkgname_lav()
# FIXME: strange regexp for drop libNAME.so.NUM and perl(Package) and /bin/sh
REALPKGNAMELIST=$(estrlist reg_exclude "\. /.* (.*" "$REQLIST")
# FIXME: external list? Set priorities/
REQCONVLIST=$(estrlist exclude "$REALPKGNAMELIST" "$REQLIST" | filter_multiple_provides)
REQCONVLIST=$(estrlist exclude "$REALPKGNAMELIST" "$REQLIST" | filter_multiple_provides | sed -e "s|(64bit)|.*(64bit)|g")
# partially copied from aptU
#VIRTREQ=$(LANG=C apt-get install --print-uris $REQLIST 2>&1 | grep "is a virtual package provided by" | cut -f2 -d" " | sort -u)
#FIXME: f.i., we got /usr/bin/lpstat in VIRTREQ (select cups or lprng package?). Skip now
#REQLIST=$(regexp_exclude_list "VIRTREQ" "$REQLIST")
TFILE=$(make_temp_file)
PKGFILES=$(LANG=C apt-get install --print-uris $REQCONVLIST 2>$TFILE | grep "^Selecting" | cut -f2 -d" " | sort -u | filter_pkgname)
PKGFILES=$(LANG=C apt-get install --print-uris $REQCONVLIST 2>$TFILE | grep "^Selecting" | cut -f2 -d" " | sort -u | filter_pkgname) || warning "Error return code from apt-get install"
if grep -q "is a virtual package provided by" $TFILE ; then
fatal "multiple provides: $(cat $TFILE)"
fi
if grep -q "Couldn't find package" $TFILE ; then
fatal "$(cat $TFILE | grep "Couldn't find package")"
fi
#grep -q "^E:" $TFILE && fatal "Can't get correct result from apt: $(cat $TFILE)"
rm -f $TFILE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment