Reprepro adding same deb package

15,264

Solution 1

Your first command shouldn't have worked; remove requires the codename of the distribution from which you want to remove that package.

Assuming this was just a mispaste, and that you gave "squeeze" to the remove command like you did for the includedeb, you most likely still have the same package in a different distribution. Reprepro tries to enforce the debian ideal of "packages with the same name and exact same version have the exact same contents", no matter which distro they were first released in.

You can do reprepro ls $package to see where it might still be located. Once you find it, the right thing to do would be to reprepro copy it back into squeeze from the other place.

Solution 2

If you are supporting multiple distros in your archive, you will need to remove the file reference from all of them, before you will be allowed to includedeb with a new file.

After reprepro ls you may wish to use reprepro remove {dist} {pkg} once for each distro in which the file is referenced.

When all references are gone, you can includedeb a new one.

Solution 3

It is not enough to change the version in the package name, it should be also changed in the control file (DEBIAN/control in the binary archive, and debian/control in the source deb).

You modified a deb package, so you have to give it a different version. Typically, you should change the line

Version: 1.2.3-something

To:

Version: 1.2.3-kioplays1 (...2, 3, etc)

or similar.

If the versions differ, you will be able to include the packages in the repo multiple times.

Share:
15,264
ki0
Author by

ki0

Updated on June 04, 2022

Comments

  • ki0
    ki0 almost 2 years

    I got a problem in my debian repo. I removed a wrong package with:

    reprepro -Vb . remove package
    

    This was ok, but when I tried to add again the same package with next command:

    reprepro -Vb . includedeb squeeze package
    

    I got the next output:

    Already existing files can only be included again, if they are the same, but:
    md5 expected: 1035762e5e21e6ad8689660c0032f42d, got: 77ea3b094fcbfca4110afb5a9af0d2cb
    sha1 expected: e41527e49bee98a59b3a5e16fbe856bb15a836bd, got: 5c6b673e5f11f1a80201e76d0fa4ba1d5935f095
    sha256 expected: ae795de3b2d62f513b634a00c4bec74c90d2a6f750e5ec0386ee2b7775af39ec, got: 1531b2dd1869214afe58bb526fa8bda70db1bd1ef73d133bde002d42f147a041
    size expected: 327748, got: 253398
    There have been errors!
    

    Anyone know how could I fix this? I have been checking the reprepro man and I didn't find the solution to solve this situation.