summaryrefslogtreecommitdiff
path: root/tools/repo2solv.sh
diff options
context:
space:
mode:
authorJosef Reidinger <jreidinger@suse.cz>2008-05-13 12:12:15 +0000
committerJosef Reidinger <jreidinger@suse.cz>2008-05-13 12:12:15 +0000
commitf895a165dca56d253fa87974bb51425064530cf1 (patch)
treeb9fcf2bd7daec26b7741533766daf4b3b70a20e1 /tools/repo2solv.sh
parent66d477f004c3ad563c512635ae798d4fe77ccdbb (diff)
downloadlibsolv-f895a165dca56d253fa87974bb51425064530cf1.tar.gz
libsolv-f895a165dca56d253fa87974bb51425064530cf1.tar.bz2
libsolv-f895a165dca56d253fa87974bb51425064530cf1.zip
read description dir path from content file (bnc #389414)
Diffstat (limited to 'tools/repo2solv.sh')
-rwxr-xr-xtools/repo2solv.sh21
1 files changed, 19 insertions, 2 deletions
diff --git a/tools/repo2solv.sh b/tools/repo2solv.sh
index 96873c8..7e3421e 100755
--- a/tools/repo2solv.sh
+++ b/tools/repo2solv.sh
@@ -4,6 +4,19 @@
# give it a directory of a local mirror of a repo and this
# tries to detect the repo type and generate one SOLV file on stdout
+test_susetags() {
+ if test -s content; then
+ DESCR=`grep DESCRDIR content | cut -d ' ' -f 2`
+ if test -z $DESCR; then
+ DESCR=suse/setup/descr
+ fi
+ test -d $DESCR
+ return $?
+ else
+ return 1
+ fi
+}
+
# this should signal an error if there is a problem
set -e
@@ -103,9 +116,13 @@ if test -d repodata; then
mergesolv $m_primfile $m_patchfile $m_updateinfofile $m_deltainfofile
rm -f $primfile $patchfile $updateinfofile $deltainfofile
-elif test -d suse/setup/descr && test -s content; then
+elif test_susetags; then
olddir=`pwd`
- cd suse/setup/descr || exit 2
+ DESCR=`grep DESCRDIR content | cut -d ' ' -f 2`
+ if test -z $DESCR; then
+ DESCR=suse/setup/descr
+ fi
+ cd ${DESCR} || exit 2
(
# First packages
if test -s packages.gz; then