0

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...

sorush-r
  • 1,012
  • Similar question for those that are seeing the same sort of error but not using a local repository: http://askubuntu.com/questions/30072/how-do-i-fix-a-problem-with-mergelist-or-status-file-could-not-be-parsed-err?lq=1 – fossfreedom Dec 10 '13 at 23:48

1 Answers1

3

So, this is a little weird I'm answering my own question! :D

This may help someone out there. I found that the only problem is file name of generated index. It should end up with .gz extension. Previously Packages was acceptable for dpkg now he expects Packages.gz. This is a new rule, meanwhile, someone in debian team decided it to be like this! I updated my local repo generator script and everything works file now.

sorush-r
  • 1,012