Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
Similar question for those that are seeing the same sort of error but not using a local repository: askubuntu.com/questions/30072/… –  fossfreedom Dec 10 '13 at 23:48
add comment

1 Answer 1

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.

share|improve this answer
    
how did you update? –  Mild Fuzz Jun 8 '13 at 19:25
    
@MildFuzz dpkg-scanpackages -a $architecture pool/local | gzip -9c > dists/$dist/local/binary-$architecture/Packages.gz –  sorush-r Jun 10 '13 at 9:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.