After making index for my local repository, I get this error while updating.
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/_home_soroush_repository_dists_precise_local_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.
Then no package manager works. I know that there is a problem with index file generated by dpkg-scan-packages
but can't find it.
I maintain my repo using this script and it worked properly for a long time:
#!/bin/bash
for dist in "precise" #"oneiric"
do
for component in "local"
do
for architecture in "amd64" # "i386" "all"
do
echo "Generating package index for $dist $component $architecture..."
dpkg-scanpackages -a $architecture pool/local /dev/null | gzip -9c > dists/$dist/local/binary-$architecture/Packages
done
echo "Generating source index for $dist $component $architecture..."
dpkg-scansources pool/local > dists/$dist/local/sources/Sources
done
done
My question is how can I find which package is causing problem in index file? There should be some sort of parser for that...