diff --git a/debtap b/debtap new file mode 100755 index 0000000..3783543 --- /dev/null +++ b/debtap @@ -0,0 +1,3309 @@ +#!/usr/bin/bash + +# Defining colors and bold letters +lightgreen='\e[1;32m' +lightred='\e[1;31m' +red='\e[0;31m' +NC='\e[0m' +bold=`tput bold` +normal=`tput sgr0` + +# Help and error messages +if [[ "$1" == "-help" ]] || [[ "$1" == "--help" ]]; then + echo "Syntax: debtap package_filename"; exit 0 +elif [[ "$1" == "" ]]; then + echo -e "${red}Error: You haven't specified a deb package${NC}\nSyntax: debtap package_filename"; exit 1 +elif [[ $(ls "$1" &> /dev/null; echo $?) != 0 ]]; then + echo -e "${red}Error: No such file or directory${NC}"; exit 1 +elif [[ $(file -b "$1" | grep -q "Debian binary package"; echo $?) != 0 ]]; then + echo -e "${red}Error: You haven't specified a valid deb package${NC}"; exit 1 +elif [[ $(ping -c 1 www.google.com &> /dev/null; echo $?) != 0 ]]; then + echo -e "${red}Error: You have no internet access, which is necessary for this script to work${NC}"; exit 1 +elif [[ $(ls /var/cache/pkgfile/*.files | wc -l) == 0 ]]; then + echo -e "${red}Error: You must run at least once "pkgfile -u" with root privileges (preferably recently), before running this script${NC}"; exit 1 +fi + +# Defining and creating working directory +working_directory="`ls "$1" | tr '[:upper:]' '[:lower:]' | sed s'/\.deb//'`-working-directory" +mkdir "$working_directory" +cd "$working_directory" + +# Extracting package data and metadata in working directory +echo -e "${lightgreen}==>${NC} ${bold}Extracting package data...${normal}" +ar p ../"$1" control.tar.gz | tar xz +rm -rf $(ls * | grep -v 'control\|conffiles') +data_tar_check=`ar t ../"$1" | grep data` +if [ $data_tar_check == data.tar.gz ]; then + ar p ../"$1" data.tar.gz | tar xz +elif [ $data_tar_check == data.tar.xz ]; then + ar p ../"$1" data.tar.xz | tar xJ +elif [ $data_tar_check == data.tar.bz2 ]; then + ar p ../"$1" data.tar.bz2 | tar xj +elif [ $data_tar_check == data.tar.lzma ]; then + ar p ../"$1" data.tar.lzma | tar xJ +elif [ $data_tar_check == data.tar ]; then + ar p ../"$1" data.tar | tar x +fi + +# Fixing possible differences in filesystem hierarchy of the extracted package data, so that it matches Arch Linux filesystem hierarchy +echo -e "${lightgreen}==>${NC} ${bold}Fixing possible directories structure differencies...${normal}" +if [ -e usr/games ]; then + mkdir usr/bin 2> /dev/null; cp -a usr/games/* usr/bin; rm -rf usr/games +fi +if [ -e lib ]; then + mkdir usr 2> /dev/null; cp -a lib usr; rm -rf lib +fi +if [ -e lib32 ]; then + if [ $(grep Architecture: control | grep -q i386; echo $?) -eq 0 ]; then + mkdir -p usr/lib 2> /dev/null; cp -a lib32/* usr/lib; rm -rf lib32 + else + mkdir usr 2> /dev/null; cp -a lib32 usr; rm -rf lib32 + fi +fi +if [ -e lib64 ]; then + mkdir -p usr/lib 2> /dev/null; cp -a lib64/* usr/lib; rm -rf lib64 +fi +if [ -e usr/lib32 ] && [ $(grep Architecture: control | grep -q i386; echo $?) -eq 0 ]; then + mkdir usr/lib 2> /dev/null; cp -a usr/lib32/* usr/lib; rm -rf usr/lib32 +fi +if [ -e usr/lib64 ]; then + mkdir usr/lib 2> /dev/null; cp -a usr/lib64/* usr/lib; rm -rf usr/lib64 +fi +if [ -e bin ]; then + mkdir usr 2> /dev/null; cp -a bin usr; rm -rf bin +fi +if [ -e sbin ]; then + mkdir -p usr/bin 2> /dev/null; cp -a sbin/* usr/bin; rm -rf sbin +fi +if [ -e usr/sbin ]; then + mkdir usr/bin 2> /dev/null; cp -a usr/sbin/* usr/bin; rm -rf usr/sbin +fi +if [ -e usr/share/applications ]; then + for i in usr/share/applications/*.desktop; do + sed -i -e s'/Exec=\/bin\//Exec=\/usr\/bin\//g' -e s'/Exec=\/sbin\//Exec=\/usr\/bin\//g' -e s'/Exec=\/usr\/sbin\//Exec=\/usr\/bin\//g' -e s'/Exec=\/usr\/games\//Exec=\/usr\/bin\//g' "$i" 2> /dev/null + done +fi + +# Generating .PKGINFO file +echo -e "${lightgreen}==>${NC} ${bold}Generating .PKGINFO file...${normal}" + +# Generating pkgname field +for i in {git,bzr,darcs,hg}; do + if [ $(grep ^Version: control | gawk '{print $2}' | grep -q $i; echo $?) -eq 0 ]; then + echo "pkgname = `grep Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]'`"-$i | sed s"/-$i-$i/-$i/" > .PKGINFO + fi +done +if [ $(grep ^Version: control | gawk '{print $2}' | grep -q svn; echo $?) -eq 0 ]; then + echo "pkgname = `grep Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]'`"-svn | sed s'/-svn-svn/-svn/' > .PKGINFO +fi +for i in {cvs,CVS}; do + if [ $(grep ^Version: control | gawk '{print $2}' | grep -q $i; echo $?) -eq 0 ]; then + echo "pkgname = `grep Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]'`"-cvs | sed s'/-cvs-cvs/-cvs/' > .PKGINFO + fi +done +if [ $(grep ^Version: control | gawk '{print $2}' | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) -ne 0 ]; then + echo "pkgname = `grep Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]'`" | sed s'/demo/-demo/' | sed s'/trial/-trial/' | sed s'/--/-/' | sed 's/^-\(.*\)/\1/' > .PKGINFO +fi + +# Generating pkgver field +version=$(grep ^Version: control | gawk '{print $2}' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\./\./' | sed s'/\.$//') +for i in {git,bzr,darcs,hg}; do + if [ $(echo $version | grep -q $i; echo $?) -eq 0 ]; then + echo "pkgver = `echo $version | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}'`"-1 >> .PKGINFO; + fi +done +for i in {svn.r,svnr}; do + if [ $(echo $version | grep -q $i; echo $?) -eq 0 ]; then + echo "pkgver = r`echo $version | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}'`"-1 >> .PKGINFO; + fi +done +if [ $(echo $version | grep -q svn; echo $?) -eq 0 ] && [ $(echo $version | grep -q "svn\.r\|svnr"; echo $?) -ne 0 ]; then + echo "pkgver = `echo $version | gawk -F 'svn' '{print $2}' | gawk -F '-' '{print $1}'`"-1 >> .PKGINFO; +fi +for i in {cvs,CVS}; do + if [ $(echo $version | grep -q $i; echo $?) -eq 0 ]; then + echo "pkgver = `echo $version | sed -e s"/[-.]$i/ /g" -e s"/$i/ /g" -e s"/-/ /g" | gawk '{print $2}'`"-1 >> .PKGINFO; + fi +done +if [ $(echo $version | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) -ne 0 ]; then + echo "pkgver = `echo $version | gawk -F '-[0-9]' '{print $1}' | sed s'/-/./'`"-1 >> .PKGINFO; +fi + +# Generating pkgdesc field +if [ $(echo `grep -v ":\| \." control` | grep -iq "`grep Description: control | sed s'/Description: //' | sed s'/\.//'`"; echo $?) -eq 0 ]; then + description=$(echo $(echo "`grep -v ":\| \." control`") | sed s'/^\s*./\U&\E/g' | sed s'/\(\. \|\! \|\? \)\s*./\U&\E/g') +else + description=$(echo $(echo "`grep Description: control | sed s'/Description: //' | sed 's/.*/\u&/'`" | sed s'/\.//'). `grep -v ":\| \." control` | sed s'/^\s*./\U&\E/g' | sed s'/\(\. \|\! \|\? \)\s*./\U&\E/g') +fi +echo "pkgdesc = $description" >> .PKGINFO + +# Generating url field +echo "url = `grep Homepage: control | gawk '{print $2}'`" | sed s'/\/$//' >> .PKGINFO + +# Generating builddate (which is actually packaging date) field +echo "builddate = `date -u "+%s"`" >> .PKGINFO + +# Generating packager field +echo -e "\n:: Enter Packager name:" +read packager_name +echo "packager = $packager_name" >> .PKGINFO + +# Generating arch field +echo "arch = `grep Architecture: control | gawk '{print $2}' | sed -e s'/i386/i686/' -e s'/amd64/x86_64/' -e s'/all/any/'`" >> .PKGINFO + +# Generating size field +if [ -e conffiles ]; then + conffiles_size=$(ls -l | grep conffiles | gawk '{print $5}'); +else + conffiles_size=0; +fi +echo "size =" $(expr `du -sb | tr -d " ."` - `ls -l | grep control | gawk '{print $5}'` - $conffiles_size - `ls -la | grep .PKGINFO | gawk '{print $5}'` - 4096) >> .PKGINFO + +# Generating license field +echo -e "\n:: Enter package license (you can enter multiple licenses comma seperated):" +read package_license +for i in `echo "$package_license" | sed -e s'/ /__/g' -e s'/,/ /g'`; do + license+=($i) +done +for (( i=0; i<$(echo ${#license[@]}); i=i+1 )); do license[$i]=$(echo ${license[$i]} | sed s'/__/ /g'); done +printf '%s\n' "${license[@]}" | while read line; do echo "license = $line" >> .PKGINFO ; done + +# The packages names translator function +packages-names-translator() { +# First method of translating .deb packages names into Arch Linux packages names, more accurate, comparing contents of .deb packages with Arch Linux packages contents +for debian_package_name in $(gawk '{print $1}' `ls | grep initial-check-list`); do + for debian_package_file in `curl -s https://packages.debian.org/sid/all/$debian_package_name/filelist | sed -n '/pfilelist/,/<\/pre><\/div>/p' | sed s'/
//' | sed -n '/<\/pre><\/div>/!p' | sed s'/\// /'g | grep 'bin\|opt\|\.so' | gawk '{print $NF}'`; do
+	echo $debian_package_file $(grep "^$debian_package_name$\|^$debian_package_name " `ls | grep initial-check-list` | gawk '{print $2}');
+    done >> $debian_package_name-tempfile03;
+done
+
+for i in `ls | grep tempfile03`; do
+    for j in `gawk '{print $1}' $i`; do
+	for k in `pkgfile $j | gawk -F '/' '{print $2}'`; do
+	    echo $k`head -1 $i | gawk '{print $2$3}'`;
+	done;
+    done >> `echo $i | sed s'/tempfile03/tempfile04/'`;
+done
+
+touch tempfile05
+for debian_package_name in $(gawk '{print $1}' `ls | grep initial-check-list`); do
+    grep -q "^$debian_package_name$" tempfile05 || echo $debian_package_name >> tempfile05;
+done
+
+for i in $(for j in `cat tempfile05`; do echo $j-tempfile04; done); do
+    k=`sort $i | uniq -c | gawk '{print $1}' | sort -n | tail -1`
+    if [ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -ge 2 ]; then
+	for l in `cat $i`; do
+	    for m in $(sort $i | uniq -c | gawk '{print $1,$2}' | sort -n | grep "^$k " | gawk '{print $2}'); do
+		echo $l | grep "^$m$";
+	    done;
+	done | head -1 >> tempfile06;
+    elif [ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -eq 1 ]; then
+	sort $i | uniq -c | gawk '{print $1,$2}' | sort -n | grep "^$k " | gawk '{print $2}' >> tempfile06;
+    else
+	echo >> tempfile06;
+    fi;
+done
+
+cat tempfile06 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/  =/>=/g' | sed s'/<  =/<=/g' | sed s'/-multilib\|lib32-//g' > tempfile07
+
+cat tempfile07 | while read line; do
+    if [ $(echo "$line" | wc -w) -eq 0 ]; then
+	echo >> final-check-list;
+    elif [ $(echo "$line" | wc -w) -eq 1 ] || [ $(echo "$line" | wc -w) -eq 3 ]; then
+	echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}'`" >> final-check-list;
+    elif [ $(echo "$line" | wc -w) -eq 5 ]; then
+	echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}'`" >> final-check-list;
+	echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $4}'` `echo "$line" | gawk '{print $5}'`" >> final-check-list;
+    fi
+done
+
+for i in $(eval echo {1..$(cat `ls | grep initial-check-list` | wc -l)}); do
+    if [[ $(sed -n ""$i"{p;q;}" final-check-list | gawk '{print $1}') == "" ]]; then
+	echo $(sed -n ""$i"{p;q;}" `ls | grep initial-check-list`) >> untranslated
+	echo $(sed -n ""$i"{p;q;}" `ls | grep initial-check-list` | gawk '{print $1}') >> untranslated-names-only
+    elif [[ $(echo " $(echo $(grep pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//'){-svn,-git,-cvs,-bzr,-darcs,-hg,}) " | grep -q " $(sed -n ""$i"{p;q;}" final-check-list | gawk '{print $1}') "; echo $?) == 0 ]]; then
+	echo $(sed -n ""$i"{p;q;}" `ls | grep initial-check-list` | sed s'/ //') >> missing-files
+    fi
+done
+
+# Second method for translating remaining untranslated .deb packages names into Arch Linux packages names, same as first method, but searches in Ubuntu website for packages contents instead of Debian website
+if [ -e untranslated-names-only ]; then
+    ubuntu_latest_development_version=`curl -s http://packages.ubuntu.com | grep option | gawk -F '=' '{print $2}' | gawk '{print $1}' | grep -v option | tac | sed -n 2'{p;q;}' | sed s'/\("\|-updated\|-backports\)//g'`
+
+    for ubuntu_package_name in $(sort -u untranslated-names-only); do
+	for ubuntu_package_file in `curl -s http://packages.ubuntu.com/$ubuntu_latest_development_version/all/$ubuntu_package_name/filelist | sed -n '/pfilelist/,/<\/pre><\/div>/p' | sed s'/
//' | sed -n '/<\/pre><\/div>/!p' | sed s'/\// /'g | grep 'bin\|opt\|\.so' | gawk '{print $NF}'`; do
+	    echo $ubuntu_package_file $(grep "^$ubuntu_package_name$\|^$ubuntu_package_name " untranslated | gawk '{print $2}');
+	done >> $ubuntu_package_name-tempfile08;
+    done
+
+    for i in `ls | grep tempfile08`; do
+	for j in `gawk '{print $1}' $i`; do
+	    for k in `pkgfile $j | gawk -F '/' '{print $2}'`; do
+		echo $k`head -1 $i | gawk '{print $2$3}'`;
+	    done;
+	done >> `echo $i | sed s'/tempfile08/tempfile09/'`;
+    done
+
+    touch tempfile10
+    for ubuntu_package_name in $(sort -u untranslated-names-only); do
+	grep -q "^$ubuntu_package_name$" tempfile10 || echo $ubuntu_package_name >> tempfile10;
+    done
+
+    for i in $(for j in `cat tempfile10`; do echo $j-tempfile09; done); do
+	k=`sort $i | uniq -c | gawk '{print $1}' | sort -n | tail -1`
+	if [ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -ge 2 ]; then
+	    for l in `cat $i`; do
+		for m in $(sort $i | uniq -c | gawk '{print $1,$2}' | sort -n | grep "^$k " | gawk '{print $2}'); do
+		    echo $l | grep "^$m$";
+		done;
+	    done | head -1 >> tempfile11;
+	elif [ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -eq 1 ]; then
+	    sort $i | uniq -c | gawk '{print $1,$2}' | sort -n | grep "^$k " | gawk '{print $2}' >> tempfile11;
+	else
+	    echo >> tempfile11;
+	fi;
+    done
+
+    cat tempfile11 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/  =/>=/g' | sed s'/<  =/<=/g' | sed s'/-multilib\|lib32-//g' > tempfile12
+
+    cat tempfile12 | while read line; do
+	if [ $(echo "$line" | wc -w) -eq 0 ]; then
+	    echo >> final-check-list;
+	elif [ $(echo "$line" | wc -w) -eq 1 ] || [ $(echo "$line" | wc -w) -eq 3 ]; then
+	    echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}'`" >> final-check-list;
+	elif [ $(echo "$line" | wc -w) -eq 5 ]; then
+	    echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}'`" >> final-check-list;
+	    echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $4}'` `echo "$line" | gawk '{print $5}'`" >> final-check-list;
+	fi
+    done
+
+    for i in $(eval echo {1..$(cat untranslated | wc -l)}); do
+	if [[ $(tac final-check-list | sed -n ""$i"{p;q;}" | gawk '{print $1}') == "" ]]; then
+	    echo $(tac untranslated | sed -n ""$i"{p;q;}") >> new-untranslated
+	    echo $(tac untranslated | sed -n ""$i"{p;q;}" | gawk '{print $1}') >> new-untranslated-names-only
+	elif [[ $(echo " $(echo $(grep pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//'){-svn,-git,-cvs,-bzr,-darcs,-hg,}) " | grep -q " $(tac final-check-list | sed -n ""$i"{p;q;}" | gawk '{print $1}') "; echo $?) == 0 ]]; then
+	    echo $(tac untranslated | sed -n ""$i"{p;q;}" | sed s'/ //') >> missing-files
+	fi
+    done
+
+    rm -rf untranslated untranslated-names-only
+fi
+
+# Third method of translating remaining untranslated .deb packages names into Arch Linux packages names, less accurate, comparing .deb packages names with Arch Linux packages names
+if [ -e new-untranslated-names-only ]; then
+    for i in $(sort -u new-untranslated-names-only | grep -v python-support); do
+
+	j=$(echo "$i" | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//')
+
+        if [ ! -e virtual-packages ]; then
+            echo 'aircrack-ng-scripts
+            alsa-tools-emu10k1
+            alsa-tools-ice1712
+            antigrain
+            antlr
+            arpack-ng
+            audacious-player
+            aumix-gtk
+            avidemux
+            awk
+            beanshell
+            bluez-hcidump
+            bsh
+            btrfs-progs-unstable
+            cairo-xcb
+            cheetah
+            cl-asdf
+            claws
+            common-lisp
+            cron
+            dbus-core
+            dbus-python
+            dchroot
+            d-compiler
+            devmon
+            dhcp-client
+            digest-hmac
+            digest-nilsimsa
+            digest-sha1
+            dns-server
+            docutils
+            doublecmd
+            d-runtime
+            d-stdlib
+            eigen3
+            eject
+            emacs-w3m
+            enblend
+            enlightenment17
+            eric5
+            fam
+            fcitx-qt
+            ffado
+            firebug
+            flake8-python2
+            flake8-python3
+            flashplayer
+            fonttools
+            font-util
+            foomatic-db-hpijs
+            foomatic-filters
+            gambas3-gb-gui
+            gcc-avr
+            gdisk
+            gearman
+            gimp-mathmap
+            girara-common
+            girara-gtk3
+            git-core
+            glut
+            gnupg2
+            go-openoffice
+            grmlzshrc
+            grub-bios
+            grub-common
+            grub-efi-i386
+            grub-emu
+            gst-ffmpeg
+            gtk2hs-cairo
+            gtk2hs-glib
+            gtk2hs-gtk
+            gtk2hs-pango
+            gtk-xfce-engine
+            guitarix
+            gummiboot-efi
+            gx_head
+            hamster-applet
+            haskell-array
+            haskell-base
+            haskell-binary
+            haskell-bin-package-db
+            haskell-bytestring
+            haskell-cabal
+            haskell-containers
+            haskell-deepseq
+            haskell-directory
+            haskell-filepath
+            haskell-ghc-prim
+            haskell-gtk2hs-buildtools
+            haskell-haskell2010
+            haskell-haskell98
+            haskell-hoopl
+            haskell-hpc
+            haskell-integer-gmp
+            haskell-old-locale
+            haskell-old-time
+            haskell-pretty
+            haskell-process
+            haskell-template-haskell
+            haskell-time
+            haskell-transformers
+            haskell-unix
+            heirloom-mailx
+            howl
+            html-tagset
+            httplib2
+            hubbub
+            imap-server
+            inputattach
+            iproute
+            ipython3
+            ircd
+            jack-audio-connection-kit
+            jackdbus
+            jackdmp
+            jackmp
+            jam
+            java-environment
+            java-runtime
+            java-runtime-headless
+            java-web-start
+            java-xerces2
+            jenkins-ci
+            joschy
+            joystick
+            kactivities
+            kdeplasma-addons-dataengines
+            kernel26
+            kernel26-docs
+            kernel26-grsec
+            kernel26-grsec-docs
+            kernel26-grsec-headers
+            kernel26-headers
+            kernel26-lts
+            kernel26-lts-docs
+            kernel26-lts-headers
+            kernel26-manpages
+            khrplatform-devel
+            kpackagekit
+            kpathsea
+            lancelot
+            lcdf-typetools
+            libao-pulse
+            libarchive.so
+            libblkid.so
+            libcurl.so
+            libdjvu
+            libdts
+            libefivar
+            libegl
+            libelf
+            libextl
+            libgbm
+            libglapi
+            libgles
+            libgudev-1.0.so
+            libjpeg
+            libkmod.so
+            libmount.so
+            libmysqlclient
+            liborigin
+            libprofiler.so
+            libreoffice-extension-pdfimport
+            libreoffice-extension-presenter-screen
+            libreoffice-extension-report-builder
+            libreoffice-extension-scripting-python
+            libreoffice-langpack
+            libreoffice-scripting-beanshell
+            libreoffice-scripting-javascript
+            librime-data
+            libsigc++2.0
+            libsigc++2.0-docs
+            libsoup-gnome
+            libssh2.so
+            libsystemd-daemon.so
+            libsystemd-id128.so
+            libsystemd-journal.so
+            libsystemd-login.so
+            libsystemd.so
+            libtcmalloc_and_profiler.so
+            libtcmalloc_debug.so
+            libtcmalloc_minimal_debug.so
+            libtcmalloc_minimal.so
+            libtcmalloc.so
+            libtu
+            libudev.so
+            libusbx
+            libuuid.so
+            libv4l
+            libvisual-projectm
+            libwebkit
+            libwebkit3
+            libxml++2
+            lightdm-gtk-greeter
+            links-g
+            lmms-extras
+            logger
+            lv2core
+            lxshortcut
+            mailx
+            mailx-heirloom
+            man
+            mate-calc
+            mate-document-viewer
+            mate-file-archiver
+            mate-file-manager
+            mate-image-viewer
+            mate-media
+            mate-menu-editor
+            mate-settings-daemon
+            mate-text-editor
+            mate-window-manager
+            mdnsresponder
+            mkvtoolnix
+            module-init-tools
+            monodoc
+            mpeg2dec
+            mysql
+            mysql-clients
+            mythes
+            netcat
+            net-ssleay
+            nodejs-node-gyp
+            nss-myhostname
+            ntfsprogs
+            openoffice-af
+            openoffice-am
+            openoffice-ar
+            openoffice-as
+            openoffice-ast
+            openoffice-be
+            openoffice-bg
+            openoffice-bn
+            openoffice-bn-IN
+            openoffice-bo
+            openoffice-br
+            openoffice-brx
+            openoffice-bs
+            openoffice-ca
+            openoffice-ca-valencia
+            openoffice-cs
+            openoffice-cy
+            openoffice-da
+            openoffice-de
+            openoffice-dgo
+            openoffice-dz
+            openoffice-el
+            openoffice-en-GB
+            openoffice-en-US
+            openoffice-en-ZA
+            openoffice-eo
+            openoffice-es
+            openoffice-et
+            openoffice-eu
+            openoffice-fa
+            openoffice-fi
+            openoffice-fr
+            openoffice-ga
+            openoffice-gd
+            openoffice-gl
+            openoffice-gu
+            openoffice-he
+            openoffice-hi
+            openoffice-hr
+            openoffice-hu
+            openoffice-id
+            openoffice-is
+            openoffice-it
+            openoffice-ja
+            openoffice-ka
+            openoffice-kk
+            openoffice-km
+            openoffice-kmr-Latn
+            openoffice-kn
+            openoffice-ko
+            openoffice-kok
+            openoffice-ks
+            openoffice-lb
+            openoffice-lo
+            openoffice-lt
+            openoffice-lv
+            openoffice-mai
+            openoffice-mk
+            openoffice-ml
+            openoffice-mn
+            openoffice-mni
+            openoffice-mr
+            openoffice-my
+            openoffice-nb
+            openoffice-ne
+            openoffice-nl
+            openoffice-nn
+            openoffice-nr
+            openoffice-nso
+            openoffice-oc
+            openoffice-om
+            openoffice-or
+            openoffice-pa-IN
+            openoffice-pl
+            openoffice-pt
+            openoffice-pt-BR
+            openoffice-ro
+            openoffice-ru
+            openoffice-rw
+            openoffice-sa-IN
+            openoffice-sat
+            openoffice-sd
+            openoffice-si
+            openoffice-sid
+            openoffice-sk
+            openoffice-sl
+            openoffice-sq
+            openoffice-sr
+            openoffice-sr-Latn
+            openoffice-ss
+            openoffice-st
+            openoffice-sv
+            openoffice-sw-TZ
+            openoffice-ta
+            openoffice-te
+            openoffice-tg
+            openoffice-th
+            openoffice-tn
+            openoffice-tr
+            openoffice-ts
+            openoffice-tt
+            openoffice-ug
+            openoffice-uk
+            openoffice-uz
+            openoffice-ve
+            openoffice-vi
+            openoffice-xh
+            openoffice-zh-CN
+            openoffice-zh-TW
+            openoffice-zu
+            osmesa
+            pacman-contrib
+            pdfjam
+            pdflib
+            pdns
+            pdns-ldap
+            pdns-mysql
+            pdns-pgsql
+            pdns-recursor
+            pdns-sqlite
+            pep8-python2
+            pep8-python3
+            perl-apache-soap
+            perl-apache-xmlrpc-lite
+            perl-archive-tar
+            perl-attribute-handlers
+            perl-autodie
+            perl-autoloader
+            perl-autouse
+            perl-base
+            perl-b-debug
+            perl-bignum
+            perl-carp
+            perl-cgi
+            perl-class-accessor-fast
+            perl-class-accessor-faster
+            perl-compress-raw-bzip2
+            perl-compress-raw-zlib
+            perl-config-perl-v
+            perl-constant
+            perl-cpan
+            perl-cpan-meta
+            perl-cpan-meta-requirements
+            perl-cpan-meta-yaml
+            perl-db_file
+            perl-devel-ppport
+            perl-devel-selfstubber
+            perl-device-gsm-charset
+            perl-device-gsm-networks
+            perl-device-gsm-pdu
+            perl-device-modem-log-file
+            perl-device-modem-log-syslog
+            perl-device-modem-usrobotics
+            perl-digest
+            perl-digest-md5
+            perl-digest-sha
+            perl-dumpvalue
+            perl-email-mime-creator
+            perl-email-mime-modifier
+            perl-email-simple-creator
+            perl-encode
+            perl-encoding-warnings
+            perl-env
+            perl-exiftool
+            perl-experimental
+            perl-exporter
+            perl-extutils-cbuilder
+            perl-extutils-command
+            perl-extutils-constant
+            perl-extutils-install
+            perl-extutils-makemaker
+            perl-extutils-manifest
+            perl-extutils-parsexs
+            perl-file-fetch
+            perl-file-path
+            perl-file-temp
+            perl-filter-simple
+            perl-filter-util-call
+            perl-getopt-long
+            perl-http-tiny
+            perl-i18n-collate
+            perl-i18n-langtags
+            perl-if
+            perl-io
+            perl-io-compress
+            perl-io-sessiondata
+            perl-io-sessionset
+            perl-io-socket-ip
+            perl-io-zlib
+            perl-ipc-cmd
+            perl-ipc-sysv
+            perl-json-pp
+            perl-lib
+            perl-libnet
+            perl-libxml
+            perl-locale-codes
+            perl-locale-maketext
+            perl-locale-maketext-simple
+            perl-math-bigint
+            perl-math-bigint-fastcalc
+            perl-math-bigrat
+            perl-math-complex
+            perl-memoize
+            perl-mime-base64
+            perl-mime-body
+            perl-mime-decoder
+            perl-mime-decoder-base64
+            perl-mime-decoder-binary
+            perl-mime-decoder-binhex
+            perl-mime-decoder-gzip64
+            perl-mime-decoder-nbit
+            perl-mime-decoder-quotedprint
+            perl-mime-decoder-uu
+            perl-mime-entity
+            perl-mime-field-contdisp
+            perl-mime-field-contraenc
+            perl-mime-field-conttype
+            perl-mime-field-paramval
+            perl-mime-head
+            perl-mime-parser
+            perl-mime-parser-filer
+            perl-mime-parser-reader
+            perl-mime-parser-results
+            perl-mime-worddecoder
+            perl-mime-words
+            perl-module-corelist
+            perl-module-load
+            perl-module-load-conditional
+            perl-module-loaded
+            perl-module-metadata
+            perl-net-ping
+            perl-package-constants
+            perl-params-check
+            perl-parent
+            perl-parse-cpan-meta
+            perl-passwd-md5
+            perl-pathtools
+            perl-perlfaq
+            perl-perlio-via-quotedprint
+            perl-perl-ostype
+            perl-pod-checker
+            perl-pod-escapes
+            perl-podlators
+            perl-pod-parser
+            perl-pod-perldoc
+            perl-pod-simple
+            perl-pod-usage
+            perl-safe
+            perl-scalar-list-utils
+            perl-search-dict
+            perl-selfloader
+            perl-sms-token
+            perl-sms-token-da
+            perl-sms-token-dcs
+            perl-sms-token-mr
+            perl-sms-token-oa
+            perl-sms-token-pdutype
+            perl-sms-token-pid
+            perl-sms-token-sca
+            perl-sms-token-scts
+            perl-sms-token-ud
+            perl-sms-token-vp
+            perl-soap-constants
+            perl-soap-lite-deserializer-xmlschema1999
+            perl-soap-lite-deserializer-xmlschema2001
+            perl-soap-lite-deserializer-xmlschemasoap1_1
+            perl-soap-lite-deserializer-xmlschemasoap1_2
+            perl-soap-lite-packager
+            perl-soap-lite-utils
+            perl-soap-packager
+            perl-soap-test
+            perl-soap-transport-http
+            perl-soap-transport-io
+            perl-soap-transport-local
+            perl-soap-transport-loopback
+            perl-soap-transport-mailto
+            perl-soap-transport-pop3
+            perl-soap-transport-tcp
+            perl-socket
+            perl-storable
+            perl-sys-syslog
+            perl-term-ansicolor
+            perl-term-cap
+            perl-term-complete
+            perl-term-readline
+            perl-test
+            perl-test-harness
+            perl-test-simple
+            perl-text-abbrev
+            perl-text-balanced
+            perl-text-parsewords
+            perl-text-tabs
+            perl-thread-queue
+            perl-threads
+            perl-thread-semaphore
+            perl-threads-shared
+            perl-tie-file
+            perl-tie-refhash
+            perl-time-hires
+            perl-time-local
+            perl-time-piece
+            perl-uddi-lite
+            perl-unicode-collate
+            perl-unicode-normalize
+            perl-unicode-stringprep-bidi
+            perl-unicode-stringprep-mapping
+            perl-unicode-stringprep-prohibited
+            perl-unicode-stringprep-unassigned
+            perl-uri-escape
+            perl-version
+            perlxml
+            perl-xml-libxml-common
+            perl-xml-parser-lite
+            perl-xmlrpc-lite
+            perl-xmlrpc-test
+            perl-xmlrpc-transport-http
+            perl-xmlrpc-transport-pop3
+            perl-xmlrpc-transport-tcp
+            perl-xsloader
+            phonon
+            phonon-backend
+            phonon-qt4-backend
+            phonon-qt5-backend
+            php-apc
+            pion-net
+            pkgconfig
+            plan9
+            polkit-qt
+            pop3-server
+            poppler-qt
+            portaudio_cpp
+            postgresql-client
+            premake4
+            procinfo
+            procps
+            protobuf-python
+            proxychains
+            psutils-lprng
+            puredata
+            py3gobject
+            pyaim
+            pyasn1
+            pyatspi
+            pybonjour
+            pycairo
+            pycrypto
+            pycups
+            pydot
+            pyexiv2
+            pyglet
+            pygobject
+            pyopenssl
+            pypoppler
+            pyqt
+            pyqt-common
+            pysmbc
+            python2-distribute
+            python2-gevent-beta
+            python2-imaging
+            python2-mayavi
+            python2-mmkeys
+            python2-openpyxl
+            python2-pyqt
+            python2-pyxenstore
+            python2-udev
+            python3
+            python3-numpy
+            python3-scipy
+            python-antlr
+            python-beautifulsoup
+            python-caja
+            python-cheetah
+            python-distribute
+            python-gflags
+            python-imaging
+            python-keybinder
+            python-nautilus
+            python-openpyxl
+            python-poppler
+            python-waf
+            pyudev
+            pyxattr
+            pyxdg
+            qt-doc
+            qupzilla-qt5
+            raismth
+            rake
+            remmina-plugins
+            resolvconf
+            rouge
+            rox-lib2
+            rubygems
+            rxtx
+            sbuild
+            scipy
+            sdl_perl
+            setuptools
+            sh
+            smtp-forwarder
+            smtp-server
+            speechd
+            sqlite3
+            sqlite3-doc
+            sqlite3-tcl
+            squeak
+            sunpinyin-data-le
+            svn
+            synaptics
+            synce-librapi
+            synce-libsynce
+            systemd-tools
+            sysvinit-tools
+            telepathy-qt4
+            test-number-delta
+            Test::Number::Delta
+            tetex
+            texlive-langafrican
+            texlive-langarabic
+            texlive-langarmenian
+            texlive-langcroatian
+            texlive-langhebrew
+            texlive-langindic
+            texlive-langmongolian
+            texlive-langtibetan
+            texlive-langvietnamese
+            texlive-latex3
+            timedate
+            tint
+            toluapp
+            ttf-fireflysung
+            ttf-font
+            turbojpeg
+            twisted
+            udev
+            umfpack
+            urw-fonts
+            urxvt-keyboard-select
+            urxvt-url-select
+            util-linux-ng
+            vapoursynth-plugin-ffms2
+            vlock
+            webkitgtk3
+            x264-10bit
+            x264-dev
+            x2goagent
+            X-ABI-EXTENSION_VERSION
+            X-ABI-VIDEODRV_VERSION
+            X-ABI-XINPUT_VERSION
+            xf86-video-intel-sna
+            xf86-video-intel-uxa
+            xfce4-dict-plugin
+            xfsacl
+            xfsattr
+            xfsdmapi
+            xindy
+            xkbdata
+            xorriso
+            xorriso-tcltk
+            x-server
+            zbar-gtk
+            zbar-qt
+            zd1211
+            zeitgeist-datahub
+            zope-interface' | while read line; do echo $line >> virtual-packages; done
+        fi
+
+	package-query -SsA $(echo "$j" | sed s'/^lib//') | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' > result1
+	grep -q "^$j$" result1 virtual-packages && echo "$j" > tempfile
+	grep -q "^$(echo "$j" | sed s'/^lib//')$" result1 virtual-packages && echo "$j" | sed s'/^lib//' >> tempfile
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $4}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $5}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + $o + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do 
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o - 1))} $(($k + $l + $m + $n + $o + 1))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 4))} $(($k + $l + $m + $n + $o - 2))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 3))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o - 1))} $(($k + $l + $m + $n + $o + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//3' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $4}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + $o))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 4))} $(($k + $l + $m + $n + $o - 2))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 3))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 2))} $(($k + $l + $m + $n + $o))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 3))} $(($k + $l + $m + $n + $o - 1))); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $4}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $4}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + $o))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 3))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} {$(($k + $l + $m + $n + 1))..$(($k + $l + $m + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/\./ /g' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $4}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + $o - 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} {$(($k + $l + $m + $n - 1))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n + $o - 3))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} {$(($k + $l + $m + $n))..$(($k + $l + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n + $o - 2))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/-/ /g' | gawk '{print $4}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o - 1))} $(($k + $m + $n + $o + 1))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o - 1))} $(($k + $m + $n + $o + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $2}' | wc -c)
+	    o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} {$(($k + $m + $n + 1))..$(($k + $m + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /' -e s'/\./ /' | gawk '{print $2}' | wc -c)
+	    o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o - 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} $(($k + $l + $m + $n + 1))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} $(($k + $l + $m + $n))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} $(($k + $l + $m + $n))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} $(($k + $l + $m + $n - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n - 1))} $(($k + $l + $m + $n + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} $(($k + $l + $m + $n))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 3))} $(($k + $l + $m + $n - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 2))} $(($k + $l + $m + $n))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m + 1))..$(($k + $l + $m + $n))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + $n - 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + $m - 1))..$(($k + $l + $m + $n - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed 's/\.//1' | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + $m))..$(($k + $l + $m + $n - 1))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} $(($k + $m + $n + 1))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/-//1' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n - 1))} $(($k + $m + $n + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//3' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m + 1))..$(($k + $m + $n))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n - 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $4}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 2))} $(($k + $m + $n + $o))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 3))} $(($k + $m + $n + $o - 1))); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/\./ /g' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n + $o - 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} {$(($k + $m + $n))..$(($k + $m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n + $o - 2))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 2))} $(($k + $m + $n))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + $n - 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $m))..$(($k + $m + $n - 1))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $2}' | wc -c)
+	    o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + $o + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o - 1))} $(($m + $n + $o + 1))); do
+		grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
+		grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 2))} $(($m + $n + $o))); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p" >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o - 1))} $(($m + $n + $o + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 2))} $(($m + $n + $o))); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /' -e s'/\./ /' | gawk '{print $2}' | wc -c)
+	    o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + $o))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
+		grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
+		grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$p" >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} $(($m + $n + 1))); do
+		grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
+		grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} $(($m + $n + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $1}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
+		grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
+		grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $4}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + $o + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o - 1))} $(($m + $n + $o + 1))); do
+	        grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
+	        grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+	        for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+	        done
+	    fi
+	    if [ ! -e tempfile ]; then
+	        for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 2))} $(($m + $n + $o))); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p" >> tempfile;
+	        done
+	    fi
+	    if [ ! -e tempfile ]; then
+	        for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+	        done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o - 1))} $(($m + $n + $o + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 2))} $(($m + $n + $o))); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/\./ /g' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + $o))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
+	        grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
+	        grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+	        for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$p" >> tempfile;
+	        done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} {$(($m + $n + 1))..$(($m + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} $(($m + $n + 1))); do
+	        grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
+	        grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+	        for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$p" >> tempfile;
+	        done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n - 1))} $(($m + $n + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    p=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | rev)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + $n))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
+	        grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$p" >> tempfile;
+	        grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p)$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$p" >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($m + 1))..$(($m + $n))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
+		grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		grep -q "^$(echo "$j" | rev | cut -c $(($k + $l + $m + 1))- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $(($k + $l + $m + 1))- | rev >> tempfile;
+		grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + 1))- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m + 1))- | rev >> tempfile;
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
+		grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		grep -q "^$(echo "$j" | rev | cut -c $(($k + $l + $m))- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $(($k + $l + $m))- | rev >> tempfile;
+		grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m))- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $m))- | rev >> tempfile;
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
+		grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    grep -q "^$(echo $(echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		grep -q "^$(echo "$j" | rev | cut -c $(($k + $m + 1))- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $(($k + $m + 1))- | rev >> tempfile;
+		grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + 1))- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m + 1))- | rev >> tempfile;
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
+		grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		grep -q "^$(echo "$j" | rev | cut -c $(($k + $m))- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $(($k + $m))- | rev >> tempfile;
+		grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev >> tempfile;
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+\.[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    m=$(echo "$j" | rev | sed s'/[0-9]/ /g' | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		grep -q "^$(echo $(echo "$j" | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
+		grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev))$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		grep -q "^$(echo "$j" | rev | cut -c $(($k + $m))- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $(($k + $m))- | rev >> tempfile;
+		grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $m))- | rev >> tempfile;
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    grep -q "^$(echo "$j" | rev | cut -c $(($m + 1))- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $(($m + 1))- | rev >> tempfile;
+	    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev >> tempfile;
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[a-z]\+\.[a-z]\+$"; echo $?) -eq 0 ]; then
+	    m=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    grep -q "^$(echo "$j" | rev | cut -c $(($m + 1))- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $(($m + 1))- | rev >> tempfile;
+	    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $(($m + 1))- | rev >> tempfile;
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/-/ /g' | gawk '{print $4}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $n + $o + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do 
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o - 1))} $(($k + $l + $n + $o + 1))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 2))} {$(($k + $l + $n))..$(($k + $l + $n + $o - 2))} $(($k + $l + $n + $o))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 2))} {$(($k + $l + $n))..$(($k + $l + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 2))} $(($k + $l + $n + $o))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l))..$(($k + $l + $n + $o - 3))} $(($k + $l + $n + $o - 1))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l))..$(($k + $l + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o - 1))} $(($k + $l + $n + $o + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 2))} $(($k + $l + $n + $o))); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//2' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/\./ /g' | gawk '{print $3}' | wc -c)
+	    o=$(echo "$j" | rev | sed -e s'/\./ /g' -e s'/[a-z]/ /g' | gawk '{print $3}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $n + $o))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 2))} {$(($k + $l + $n))..$(($k + $l + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l))..$(($k + $l + $n + $o - 2))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} {$(($k + $l + $n + 1))..$(($k + $l + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+\.[0-9]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $2}' | wc -c)
+	    o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/-/ /g' | gawk '{print $3}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $n + $o + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o - 1))} $(($k + $n + $o + 1))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 2))} $(($k + $n + $o))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o - 1))} $(($k + $n + $o + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 2))} $(($k + $n + $o))); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | sed s'/\./ /' | gawk '{print $2}' | wc -c)
+	    o=$(echo "$j" | rev | sed s'/\./ /' | sed s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $n + $o))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} {$(($k + $n + 1))..$(($k + $n + $o))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + 1))..$(($k + $n + $o - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $n + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} $(($k + $l + $n + 1))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		    for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 2))} $(($k + $l + $n))); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n - 1))} $(($k + $l + $n + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + $n))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    for r in $(eval echo {$(($k + $l))..$(($k + $l + $n - 1))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $r- | rev)-$(echo "$j" | rev | sed 's/\.//1' | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + $l + 1))..$(($k + $l + $n))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]\+-[0-9]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed s'/-/ /g' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $n + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} $(($k + $n + 1))); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))}); do
+		    for r in $(eval echo {$(($k + 1))..$(($k + $n))}); do
+			grep -q "^$(echo $(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+			grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    done
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + 1))..$(($k + $n - 1))} $(($k + $n + 1))); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + 1))..$(($k + $n))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//2' | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    n=$(echo "$j" | rev | sed -e s'/-/ /g' -e s'/[a-z]/ /g' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $n))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		for r in $(eval echo {$(($k + 1))..$(($k + $n))}); do
+		    grep -q "^$(echo $(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		    grep -q "^$(echo $(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev))$" result2 virtual-packages && echo "$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)-$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | cut -c $q- | rev)" >> tempfile;
+		done
+	    done
+	    if [ ! -e tempfile ]; then
+		for r in $(eval echo {$(($k + 1))..$(($k + $n))}); do
+		    grep -q "^$(echo "$j" | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $r- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $r- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/-/ /' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l - 1))}); do
+		grep -q "^$(echo "$j" | rev | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
+		grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 2))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed -e 's/\.//1' -e 's/-//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+\.[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/\./ /' | gawk '{print $1}' | wc -c)
+	    l=$(echo "$j" | rev | sed -e s'/\./ /' -e s'/[a-z]/ /' | gawk '{print $2}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + $l))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))} {$(($k + 1))..$(($k + $l))}); do
+		grep -q "^$(echo "$j" | rev | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
+		grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$(($k + $l - 1))}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/\.//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+-[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/-/ /' | gawk '{print $1}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $(($k + 1))- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$(($k - 1))}); do
+		grep -q "^$(echo "$j" | rev | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
+		grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
+	    done
+	    if [ ! -e tempfile ]; then
+		for q in $(eval echo {1..$k}); do
+		    grep -q "^$(echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
+		    grep -q "^$(echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | sed 's/-//1' | cut -c $q- | rev >> tempfile;
+		done
+	    fi
+	fi
+
+	if [ ! -e tempfile ] && [ $(echo "$j" | grep -q "^[[:alnum:]]*[a-z]\+[0-9]\+$"; echo $?) -eq 0 ]; then
+	    k=$(echo "$j" | rev | sed s'/[a-z]/ /' | gawk '{print $1}' | wc -c)
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | rev | cut -c $k- | rev) | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | sort -u > result2
+	    for q in $(eval echo {1..$k}); do
+		grep -q "^$(echo "$j" | rev | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | rev | cut -c $q- | rev >> tempfile;
+		grep -q "^$(echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev)$" result2 virtual-packages && echo "$j" | sed s'/^lib//' | rev | cut -c $q- | rev >> tempfile;
+	    done
+	fi
+
+	if [ ! -e tempfile ]; then
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | sed s'/[0-9]\|\.\|-/ /g') | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' > result3
+	    grep -q "^$(echo "$j" | sed -e s'/[0-9]\|\.//g' -e s'/-\+/-/g' -e s'/-$//g')" result3 virtual-packages && echo "$j" | sed -e s'/[0-9]\|\.//g' -e s'/-\+/-/g' -e s'/-$//g' >> tempfile
+	    grep -q "^$(echo "$j" | sed s'/^lib//' | sed -e s'/[0-9]\|\.//g' -e s'/-\+/-/g' -e s'/-$//g')$" result3 virtual-packages && echo "$j" | sed s'/^lib//' | sed -e s'/[0-9]\|\.//g' -e s'/-\+/-/g' -e s'/-$//g' >> tempfile
+	fi
+
+	if [ ! -e tempfile ]; then
+	    package-query -SsA $(echo "$j" | sed s'/^lib//' | sed s'/[0-9]\|\.\|-/ /g' | gawk '{print $1}') | grep -v '    ' | gawk -F '/' '{print $2}' | gawk '{print $1}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' > result3
+	    grep -q "^$(echo "$j" | sed s'/[0-9]\|\.\|-/ /g' | gawk '{print $1}')" result3 virtual-packages && echo "$j" | sed s'/[0-9]\|\.\|-/ /g' | gawk '{print $1}' >> tempfile
+	    grep -q "^$(echo "$j" | sed s'/^lib//' | sed s'/[0-9]\|\.\|-/ /g' | gawk '{print $1}')$" result3 virtual-packages && echo "$j" | sed s'/^lib//' | sed s'/[0-9]\|\.\|-/ /g' | gawk '{print $1}' >> tempfile
+	fi
+
+	if [ -e tempfile ] && [ $(grep pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//' | grep -q "^$(head -1 tempfile)$"; echo $?) != 0 ]; then
+	    for s in {svn,git,cvs,bzr,darcs,hg}; do
+		if [ $(echo "$i" | grep -q "\-$s$"; echo $?) -eq 0 ]; then
+		    grep "^$i$\|^$i " new-untranslated | sed s"/^$i/$(head -1 tempfile))-$s/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' >> final-check-list
+		fi
+	    done
+	    if [ $(echo "$i" | grep -q '\-svn$\|\-git$\|\-cvs$\|\-bzr$\|\-darcs$\|\-hg$'; echo $?) -ne 0 ]; then
+	        grep "^$i$\|^$i " new-untranslated | sed s"/^$i/$(head -1 tempfile)/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' >> final-check-list
+	    fi
+	    sed -i "/^$i$\|^$i /d" new-untranslated
+	fi
+
+	rm -rf tempfile result*
+    done
+
+    rm -rf new-untranslated-names-only
+fi
+
+# Appending untranslated packages names (if any exist) to the translated packages names list
+if [ -e new-untranslated ]; then
+    if [ $(cat new-untranslated | wc -l) -eq 0 ]; then
+	rm -rf new-untranslated
+    else
+	tac new-untranslated | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' >> final-check-list
+	gawk '{print $1}' new-untranslated | sort -u > $(echo `ls | grep initial-check-list` | sed s'/initial-check-list/untranslated-names-only/')
+	rm -rf new-untranslated
+    fi
+fi
+
+# Sorting packages with missing files (if any exist)
+if [ -e missing-files ]; then
+    sort -u missing-files > $(echo `ls | grep initial-check-list` | sed s'/initial-check-list/missing-files/')
+    rm -rf missing-files
+fi
+
+# Special rules for (non optional) dependencies
+if [ -e dependencies-initial-check-list ]; then
+    grep -q qt final-check-list && echo hicolor-icon-theme >> final-check-list
+    grep -q gtk final-check-list && echo -e "hicolor-icon-theme\ndesktop-file-utils" >> final-check-list
+    grep -q Python-Version: control && echo python`grep Python-Version: control | gawk '{print $2}' | sed s'/\.//g'` >> final-check-list
+fi
+
+# Appending ready translated names (if any needed) to the translated packages names list
+grep -q libgl1 tempfile02 && echo libgl >> final-check-list;
+grep -q libglu1 tempfile02 && echo glu >> final-check-list;
+grep -q default-jre tempfile02 && echo java-runtime >> final-check-list;
+grep -q python:any tempfile02 && echo python >> final-check-list;
+grep libpango tempfile02 | grep -v libpangomm | sed s"/`grep libpango tempfile02 | grep -v libpangomm | gawk '{print $1}' | head -1`/pango/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib\|lib32-//g' >> final-check-list;
+grep libpangomm tempfile02 | sed s"/`grep libpangomm tempfile02 | gawk '{print $1}' | head -1`/pangomm/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib\|lib32-//g' >> final-check-list;
+grep -q fonts-freefont-ttf tempfile02 && echo ttf-freefont >> final-check-list;
+
+# Stripping unnecessary symbols and words from packages versions
+grep -v "^$" final-check-list | while read line; do
+    echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\./\./g' | sed s'/\.$//'`" >> tempfile13;
+done
+
+# Special rules for version control systems
+cat tempfile13 | while read line; do
+    for i in {git,bzr,darcs,hg}; do
+	if [ $(echo "$line" | gawk '{print $3}' | grep -q $i; echo $?) -eq 0 ]; then
+	    echo "$(echo `echo "$line" | gawk '{print $1}'`-$i | sed s"/-$i-$i/-$i/") `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}'`" >> tempfile14;
+	fi
+    done
+    for i in {svn.r,svnr}; do
+	if [ $(echo "$line" | gawk '{print $3}' | grep -q $i; echo $?) -eq 0 ]; then
+	    echo "$(echo `echo "$line" | gawk '{print $1}'`-svn | sed s'/-svn-svn/-svn/') `echo "$line" | gawk '{print $2}'` r`echo "$line" | gawk '{print $3}' | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}'`" >> tempfile14;
+	fi
+    done
+    if [ $(echo "$line" | gawk '{print $3}' | grep -q svn; echo $?) -eq 0 ] && [ $(echo "$line" | gawk '{print $3}' | grep -q "svn\.r\|svnr"; echo $?) -ne 0 ]; then
+	echo "$(echo `echo "$line" | gawk '{print $1}'`-svn | sed s'/-svn-svn/-svn/') `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | gawk -F 'svn' '{print $2}' | gawk -F '-' '{print $1}'`" >> tempfile14;
+    fi
+    for i in {cvs,CVS}; do
+	if [ $(echo "$line" | gawk '{print $3}' | grep -q $i; echo $?) -eq 0 ]; then
+	    echo "$(echo `echo "$line" | gawk '{print $1}'`-cvs | sed s'/-cvs-cvs/-cvs/') `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | sed -e s"/[-.]$i/ /g" -e s"/$i/ /g" -e s"/-/ /g" | gawk '{print $2}'`" >> tempfile14;
+	fi
+    done
+    if [ $(echo "$line" | gawk '{print $3}' | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) -ne 0 ]; then
+	echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | gawk -F '-[0-9]' '{print $1}' | sed s'/-/./'`" >> tempfile14;
+    fi
+done
+
+# Sorting packages names and versions
+sort -u tempfile14 > tempfile15
+
+# Sorting only packages names
+gawk '{print $1}' tempfile15 | sort -u > tempfile16
+
+# Removing packages names that are the same with the name of the package to be converted from translated packages list (if any exist)
+for i in `cat tempfile16`; do
+    if [ $(echo " $(echo $(grep pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//'){-svn,-git,-cvs,-bzr,-darcs,-hg,}) " | grep -q " $i "; echo $?) != 0 ]; then
+	grep "^$i$\|^$i " tempfile15 >> $i-tempfile17
+    fi
+done
+
+# Isolating versions from packages
+for i in `ls | grep tempfile17`; do
+    if [ $(grep -q "=\|>\|<" $i; echo $?) -ne 0 ]; then
+	cat $i >> `echo $i | sed s'/tempfile17/tempfile19/'`
+    else
+	cat $i | while read line; do
+	    echo $line | gawk '{print $3}' | sed -e s'/\.[a-z]/ /g' -e s'/[a-z]/ /g' | gawk '{print $1}' >> `echo $i | sed s'/tempfile17/tempfile18/'`
+	done
+    fi
+done
+
+# Sorting versions for each package
+for i in `ls | grep tempfile18`; do
+    j=`echo $i | sed s'/tempfile18/tempfile17/'`
+    k=`echo $i | sed s'/tempfile18/tempfile19/'`
+    for l in `sort -uV $i | grep -v "^$"`; do
+	grep -q "$l[a-z]\+" $j && grep "$l[a-z]\+" $j | sort -V >> $k
+	grep -q "$l$" $j && grep "$l$" $j >> $k
+	grep -q "$l\.[a-z]\+" $j && grep "$l\.[a-z]\+" $j | sort -V >> $k
+    done
+done
+
+# Choosing the appropriate version for each package
+for i in `ls | grep tempfile19`; do
+    if [ $(grep -q "=\|>\|<" $i; echo $?) -ne 0 ]; then
+	cat $i >> tempfile20;
+    elif [ $(grep -q "=" $i; echo $?) -eq 0 ] && [ $(grep -q ">\|<" $i; echo $?) -ne 0 ]; then
+	grep "=" $i | tail -1 | sed s'/ //g' >> tempfile20;
+    elif [ $(grep -q ">" $i; echo $?) -eq 0 ] && [ $(grep -q "<" $i; echo $?) -ne 0 ]; then
+	grep ">" $i | tail -1 | sed s'/ //g' >> tempfile20;
+    elif [ $(grep -q "<" $i; echo $?) -eq 0 ] && [ $(grep -q ">" $i; echo $?) -ne 0 ]; then
+	grep "<" $i | head -1 | sed s'/ //g' >> tempfile20;
+    elif [ $(grep -q ">" $i; echo $?) -eq 0 ] && [ $(grep -q "<" $i; echo $?) -eq 0 ]; then
+	grep ">" $i | tail -1 | sed s'/ //g' >> tempfile20;
+	grep "<" $i | head -1 | sed s'/ //g' >> tempfile20;
+    fi
+done
+}
+
+# Generating replacements fields
+if [ $(grep -q Replaces: control; echo $?) -eq 0 ]; then
+    grep Replaces: control | sed -e s'/Replaces: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> tempfile01
+	done
+    done
+    sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
+    grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > replacements-initial-check-list
+    packages-names-translator
+    for i in `sort -u tempfile20`; do echo "replaces = $i" >> .PKGINFO ; done
+    rm -rf *tempfile* replacements-initial-check-list final-check-list
+fi
+
+# Generating conflicts fields
+if [ $(grep -q Conflicts: control; echo $?) -eq 0 ]; then
+    grep Conflicts: control | sed -e s'/Conflicts: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> tempfile01
+	done
+    done
+    sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
+    grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > conflicts-initial-check-list
+    packages-names-translator
+    for i in `sort -u tempfile20`; do echo "conflict = $i" >> .PKGINFO ; done
+    rm -rf *tempfile* conflicts-initial-check-list final-check-list
+fi
+
+# Generating provisions fields
+if [ $(grep -q Provides: control; echo $?) -eq 0 ]; then
+    grep Provides: control | sed -e s'/Provides: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> tempfile01
+	done
+    done
+    sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
+    grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > provisions-initial-check-list
+    packages-names-translator
+    for i in `sort -u tempfile20`; do echo "provides = $i" >> .PKGINFO ; done
+    rm -rf *tempfile* provisions-initial-check-list final-check-list
+fi
+
+# Generating backups fields
+if [ -e conffiles ]; then
+    sed s'/^\///g' conffiles > tempfile
+    if [ $(grep Architecture: control | grep -q i386; echo $?) -eq 0 ]; then
+	sed -i -e s'/^bin\//usr\/bin\//g' -e s'/^sbin\//usr\/bin\//g' -e s'/^usr\/sbin\//usr\/bin\//g' -e s'/^usr\/games\//usr\/bin\//g' -e s'/^lib\//usr\/lib\//g' -e s'/^lib32\//usr\/lib\//g' -e s'/^usr\/lib32\//usr\/lib\//g' tempfile
+    else
+	sed -i -e s'/^bin\//usr\/bin\//g' -e s'/^sbin\//usr\/bin\//g' -e s'/^usr\/sbin\//usr\/bin\//g' -e s'/^usr\/games\//usr\/bin\//g' -e s'/^lib\//usr\/lib\//g' -e s'/^lib32\//usr\/lib32\//g' -e s'/^lib64\//usr\/lib\//g' -e s'/^usr\/lib64\//usr\/lib\//g' tempfile
+    fi
+    for i in `sort -u tempfile`; do echo "backup = $i" >> .PKGINFO ; done
+    rm -rf tempfile
+fi
+
+# Generating (non optional) dependencies fields
+if [ $(grep -q Depends: control; echo $?) -eq 0 ]; then
+    grep Depends: control | sed -e s'/Pre-Depends: //' -e s'/Depends: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> tempfile01
+	done
+    done
+    sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
+    grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > dependencies-initial-check-list
+    packages-names-translator
+    for i in `sort -u tempfile20`; do echo "depend = $i" >> .PKGINFO ; done
+    rm -rf *tempfile* dependencies-initial-check-list final-check-list
+fi
+
+# Generating optional dependencies fields
+if [ $(grep -q 'Recommends:\|Suggests:' control; echo $?) -eq 0 ]; then
+    grep 'Recommends:\|Suggests:' control | sed -e s'/Recommends: \|Suggests: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /> tempfile01
+	done
+    done
+    sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
+    grep -v 'libgl1\|libglu1\|default-jre\|python:any\|libpango\|fonts-freefont-ttf\|dpkg' tempfile02 > optional-dependencies-initial-check-list
+    packages-names-translator
+    for i in `sort -u tempfile20`; do
+	j=$(echo $i | sed s'/=\|>\|\|^depend = $j<" .PKGINFO; echo $?) -ne 0 ]; then
+	    echo "optdepend = $i" >> .PKGINFO
+	fi
+    done
+    rm -rf *tempfile* optional-dependencies-initial-check-list final-check-list
+fi
+
+# Moving report files to /tmp/debtap-tmp (if any exist)
+mkdir /tmp/debtap-tmp
+mv *untranslated* /tmp/debtap-tmp 2> /dev/null
+mv *missing-files /tmp/debtap-tmp 2> /dev/null
+
+# Report of (warning messages for) untranslated packages names and packages with missing files (if any exist)
+if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ]; then
+    echo -e "\n${lightred}Warning: These dependencies (depend =   fields) could not be translated into Arch Linux packages names:${NC}"
+    echo `cat /tmp/debtap-tmp/dependencies-untranslated-names-only` | sed s'/ /, /g'
+fi
+if [ -e /tmp/debtap-tmp/dependencies-missing-files ]; then
+    if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ]; then
+	echo -e "${lightred}Warning: These packages names could not be included as dependencies, because debtap has translated them into the same name with the package for conversion. This happens sometimes when you convert packages that already exist in your repositories (which is a bad idea in general). The following packages contain files that are already included in the package from your repositories (without these files your converted package may be dysfunctional):${NC}"
+    else
+	echo -e "\n${lightred}Warning: These packages names could not be included as dependencies, because debtap has translated them into the same name with the package for conversion. This happens sometimes when you convert packages that already exist in your repositories (which is a bad idea in general). The following packages contain files that are already included in the package from your repositories (without these files your converted package may be dysfunctional):${NC}"
+    fi
+    echo `cat /tmp/debtap-tmp/dependencies-missing-files` | sed s'/ /, /g'
+fi
+if [ -e /tmp/debtap-tmp/optional-dependencies-untranslated-names-only ]; then
+    if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/dependencies-missing-files ]; then
+	echo -e "${lightred}Warning: These optional dependencies (optdepend =   fields) could not be translated into Arch Linux packages names:${NC}"
+    else
+	echo -e "\n${lightred}Warning: These optional dependencies (optdepend =   fields) could not be translated into Arch Linux packages names:${NC}"
+    fi
+    echo `cat /tmp/debtap-tmp/optional-dependencies-untranslated-names-only` | sed s'/ /, /g'
+fi
+if [ -e /tmp/debtap-tmp/replacements-untranslated-names-only ]; then
+    if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/dependencies-missing-files ] || [ -e /tmp/debtap-tmp/optional-dependencies-untranslated-names-only ]; then
+	echo -e "${lightred}Warning: These replacements (replaces =   fields) could not be translated into Arch Linux packages names:${NC}"
+    else
+	echo -e "\n${lightred}Warning: These replacements (replaces =   fields) could not be translated into Arch Linux packages names:${NC}"
+    fi
+    echo `cat /tmp/debtap-tmp/replacements-untranslated-names-only` | sed s'/ /, /g'
+fi
+if [ -e /tmp/debtap-tmp/conflicts-untranslated-names-only ]; then
+    if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/dependencies-missing-files ] || [ -e /tmp/debtap-tmp/optional-dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/replacements-untranslated-names-only ]; then
+	echo -e "${lightred}Warning: These conflicts (conflict =   fields) could not be translated into Arch Linux packages names:${NC}"
+    else
+	echo -e "\n${lightred}Warning: These conflicts (conflict =   fields) could not be translated into Arch Linux packages names:${NC}"
+    fi
+    echo `cat /tmp/debtap-tmp/conflicts-untranslated-names-only` | sed s'/ /, /g'
+fi
+if [ -e /tmp/debtap-tmp/provisions-untranslated-names-only ]; then
+    if [ -e /tmp/debtap-tmp/dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/dependencies-missing-files ] || [ -e /tmp/debtap-tmp/optional-dependencies-untranslated-names-only ] || [ -e /tmp/debtap-tmp/replacements-untranslated-names-only ] || [ -e /tmp/debtap-tmp/conflicts-untranslated-names-only ]; then
+	echo -e "${lightred}Warning: These provisions (provides =   fields) could not be translated into Arch Linux packages names:${NC}"
+    else
+	echo -e "\n${lightred}Warning: These provisions (provides =   fields) could not be translated into Arch Linux packages names:${NC}"
+    fi
+    echo `cat /tmp/debtap-tmp/provisions-untranslated-names-only` | sed s'/ /, /g'
+fi
+
+# Generating .INSTALL file (if necessary)
+if [ $(grep '^depend =' .PKGINFO | grep -q qt; echo $?) -eq 0 ]; then
+    echo -e "\n${lightgreen}==>${NC} ${bold}Generating .INSTALL file...${normal}"
+
+    SAVEIFS=$IFS
+    IFS=$'\n'
+echo 'post_install() {
+    xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+    if [ -f usr/bin/update-mime-database ]; then
+	update-mime-database usr/share/mime &> /dev/null
+    fi
+    update-desktop-database -q
+}
+
+post_upgrade() {
+    post_install
+}
+
+post_remove() {
+    post_install
+}' | while read line; do echo $line >> .INSTALL; done
+    IFS=$SAVEIFS
+elif [ $(grep '^depend =' .PKGINFO | grep -q gtk; echo $?) -eq 0 ]; then
+    echo -e "\n${lightgreen}==>${NC} ${bold}Generating .INSTALL file...${normal}"
+
+    SAVEIFS=$IFS
+    IFS=$'\n'
+echo 'post_install() {
+    gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+    if [ -f usr/bin/update-mime-database ]; then
+	update-mime-database usr/share/mime &> /dev/null
+    fi
+    update-desktop-database -q
+}
+
+post_upgrade() {
+    post_install
+}
+
+post_remove() {
+    post_install
+}' | while read line; do echo $line >> .INSTALL; done
+    IFS=$SAVEIFS
+fi
+
+# Removing metadata of original .deb package and virtual packages file
+rm -rf control conffiles virtual-packages
+
+# Prompting user for editing .PKGINFO and .INSTALL files
+if [ -e .INSTALL ]; then
+    echo -en "\n${bold}:: If you want to edit .PKGINFO and .INSTALL files (in this order), press (1) For${normal} ${lightred}vi${NC} ${bold}(2) For${normal} ${lightred}nano${NC} ${bold}(3) For${normal} ${lightred}a custom editor${NC} ${bold}or any other key to continue: ${normal}"
+    read -n 1 number
+    if [[ $number == 1 ]]; then
+	vi .PKGINFO; vi .INSTALL
+    elif [[ $number == 2 ]]; then
+	nano .PKGINFO; nano .INSTALL
+    elif [[ $number == 3 ]]; then
+	echo -en "\n${bold}:: Enter command for running custom editor: ${normal}"
+	read custom_editor
+	$custom_editor .PKGINFO; $custom_editor .INSTALL
+    fi
+else
+    echo -en "\n${bold}:: If you want to edit .PKGINFO file, press (1) For${normal} ${lightred}vi${NC} ${bold}(2) For${normal} ${lightred}nano${NC} ${bold}(3) For${normal} ${lightred}a custom editor${NC} ${bold}or any other key to continue: ${normal}"
+    read -n 1 number
+    if [[ $number == 1 ]]; then
+	vi .PKGINFO
+    elif [[ $number == 2 ]]; then
+	nano .PKGINFO
+    elif [[ $number == 3 ]]; then
+	echo -en "\n${bold}:: Enter command for running custom editor: ${normal}"
+	read custom_editor
+	$custom_editor .PKGINFO
+    fi
+fi
+
+# Generating .MTREE file
+echo -e "\n${lightgreen}==>${NC} ${bold}Generating .MTREE file...${normal}"
+
+bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' * .PKGINFO .INSTALL 2> /dev/null
+
+# Creating final package in a fakeroot environment
+echo -e "\n${lightgreen}==>${NC} ${bold}Creating final package...${normal}"
+fakeroot << EOF
+tar --force-local -pcf `grep pkgname .PKGINFO | gawk '{print $3}'`-`grep pkgver .PKGINFO | gawk '{print $3}'`-`grep 'arch =' .PKGINFO | gawk '{print $3}'`.pkg.tar * .PKGINFO .INSTALL .MTREE 2> /dev/null
+xz -z -9 *.tar
+EOF
+mv *.xz ../
+cd ..
+
+# Removing leftover files
+echo -e "${lightgreen}==>${NC} ${bold}Removing leftover files...${normal}"
+rm -rf "$working_directory"
+rm -rf /tmp/debtap-tmp
+
+# Announcement of successful creation of package
+echo -e "${lightgreen}==>${NC} ${bold}Package successfully created!${normal}"