Reputation: 7877
I'm playing with dpkg, but I got rather strange problem: Package can not be build second time after 1st package was successfully build.
dpkg-buildpackage -sa
....
dpkg-source: warning: newly created empty file 'build/lib.linux-x86_64-2.7/neutron/api/__init__.py' will not be represented in diff
(repeats 100500 times for different files).
How can I to rebuild deb second time?
It looks like I miss some cleanup command.
Upvotes: 8
Views: 20599
Reputation: 1641
Another possibility is to use debuild
instead of calling dpkg-buildpackage
directly.
Simplest method is to build the binary packages along with unsigned source and unsigned changelog, cd to the debian/
directory of the source and:
$ debuild -uc -us
You can call the clean
target on debuild
to clean up.
$ debuild -T clean
Upvotes: 5
Reputation: 7877
Thanks everyone for help.
In my case problem was spitted into two parts:
So in my case solution was rather complex:
Upvotes: 1
Reputation: 31274
the debian/rules
file is actually a Makefile
, and it MUST (according to the Debian policy) have a clean target to cleanup the build.
if this target is not run automatically, you can call it explictely with something like:
dpkg-buildpackage -rfakeroot -Tclean
Upvotes: 16
Reputation: 189327
The debian/rules
file is usually set up to clean out old build artefacts, but yours seems to have a bug, or simply lack this functionality. (Submit a bug report?)
Without more knowledge about your package, this is speculative, but try removing the build
directory.
In the worst case, start over by unpacking the sources anew.
Upvotes: 2