Re: [opensuse] Zypper segmentation fault
- From: "David C. Rankin" <drankinatty@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 25 Mar 2009 12:11:22 -0500
Carlos E. R. wrote:
On Wednesday, 2009-03-25 at 01:02 -0500, David C. Rankin wrote:
the list of files you updated from there. For example, use 'zypper lr
-u' to
Remember that his "zypper" segfaults. He can not use zypper for
anything, (nor yast) just raw rpm.
] Subject : Re: [opensuse] Zypper segmentation fault
-- Cheers,
Carlos E. R.
Yes,
The script uses rpm. I guess I should have added that if the OP (I'm not going
to try to spell the name) can't even use zypper lr to find out what
repositories he has, then he will need to just look in /etc/zypp/repos.d to get
the URLs for the offending repos, then the script will take care of the rest.
Zypper didn't have anything to do with the repair beyond having text config
files that will point to the URL of the repository where the conflicting
updates came from. Then it just checks whether any of the files in that repo
are installed via rpm -q and if so, then downgrades the package to the original
..... crud! I knew I missed something.... This will do it:
#!/bin/bash
showem () {
echo -e "\n\tARCH = $ARCH"
echo -e "\tBADREPO = $BADREPO"
echo -e "\tOSSREPO = $OSSREPO"
echo -e "\tRPMURL = $RPMURL"
echo -e "\tRPMFILE = $RPMFILE"
echo -e "\tRPMNAME = $RPMNAME"
echo -e "\tRPM = $RPM"
echo -e "\tOSSURL = $OSSURL\n"
}
getarch() {
case $(arch) in
i[3-6]* ) echo i586;;
*64 ) echo x86_64;;
esac
}
[[ -z $1 ]] && { echo "\n\tUsage: ${0##*/} URL-2-BadRepository\n"; exit 1; }
ARCH=$(getarch)
BADREPO=$(echo $1 | sed -e 's/\/$//')/${ARCH}
OSSREPO=http://download.opensuse.org/distribution/11.0/repo/oss/suse/${ARCH}
# use lynx to get the list, or just save the list to a file and change
# the filename at the end of the while loop
if [[ ! -r "/tmp/repolist" ]]; then
echo -e "Retrieving suspect RPM list from ${BADREPO}\n"
if lynx -dump ${BADREPO} > /tmp/repolist; then
sed -e '/mirrorlist/d' -e '/metalink/d' -e '/\s\[/d' -e 's/^.*http/http/'
/tmp/repolist | grep rpm > /tmp/repofinal
else
echo -e "\n\tUnable to get RPM list from ${BADREPO}, check your URL\n"
exit 1
fi
fi
if [[ ! -r "/tmp/osslist" ]]; then
echo -e "Retrieving OSS RPM list from ${OSSREPO}\n"
if lynx -dump ${OSSREPO} > /tmp/osslist; then
sed -e '/mirrorlist/d' -e '/metalink/d' -e '/\s\[/d' -e 's/^.*http/http/'
/tmp/osslist | grep rpm > /tmp/ossfinal
else
echo -e "\n\tUnable to get OSS RPM list from ${OSSREPO}\n"
exit 1
fi
fi
while IFS=$'\n' read line; do
RPMURL=${line}
RPMFILE=${line##*/}
RPMNAME=${RPMFILE/%.x86_64.rpm/}
RPM=$(echo $RPMNAME | sed -e 's/-[0-9][.][0-9].*$//')
showem
if rpm -q $RPMNAME >/dev/null 2>&1; then
OSSURL=$(grep $RPM /tmp/ossfinal)
if [[ -n $OSSURL ]]; then
echo -e "\tDowngrading: $RPMNAME to ${OSSURL##*/}"
rpm -Uvh --oldpackage ${OSSURL}
else
echo -e "\tPackage: $RPM, not available in ${OSSREPO}"
fi
showem
fi
done < /tmp/repofinal
--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
- Follow-Ups:
- Re: [opensuse] Zypper segmentation fault
- From: Carlos E. R.
- Re: [opensuse] Zypper segmentation fault
- References:
- [opensuse] Zypper segmentation fault
- From: Γαβριήλ Παπαδάκης
- Re: [opensuse] Zypper segmentation fault
- From: David C. Rankin
- Re: [opensuse] Zypper segmentation fault
- From: Ken Schneider - openSUSE
- Re: [opensuse] Zypper segmentation fault
- From: David C. Rankin
- Re: [opensuse] Zypper segmentation fault
- From: Γαβριήλ Παπαδάκης
- Re: [opensuse] Zypper segmentation fault
- From: David C. Rankin
- Re: [opensuse] Zypper segmentation fault
- From: Carlos E. R.
- [opensuse] Zypper segmentation fault
- Prev by Date: Re: [opensuse] /var/log/zypp-refresh.log Size on 11.0? ( 275 Megabytes -- WTF? )
- Next by Date: Re: [opensuse] web server deployment
- Previous by thread: Re: [opensuse] Zypper segmentation fault
- Next by thread: Re: [opensuse] Zypper segmentation fault
- Index(es):
Relevant Pages
|