Re: re-compiling package twice errors out
<tomas@tuxteam.de> writes:
> On Thu, Feb 16, 2023 at 10:05:54AM +0100, Andreas Leha wrote:
>> Dear all,
>>
>> I am re-compiling xscreensaver.
>>
>> Re-compiling once works fine:
>>
>> apt-get source xscreensaver
>> cd xscreensaver-6.0.6+dfsg1
>> LANG=C debuild -us -uc
>>
>>
>> Re-compiling a second time errors out, though:
>>
>> > LANG=C debuild -us -uc
>> .... (skipped lines)
>> dpkg-source: info: using source format '3.0 (quilt)'
>> dpkg-source: info: building xscreensaver using existing ./xscreensaver_6.06+dfsg1.orig.tar.xz
>> dpkg-source: info: using patch list from debian/patches/series
>> dpkg-source: error: cannot represent change to hacks/fonts/OCRAStd.otf: binary file contents changed
>> dpkg-source: error: add hacks/fonts/OCRAStd.otf in debian/source/include-binaries if you want to store the modified binary in the debian
>> tarball
>> dpkg-source: warning: newly created empty file 'po/.intltool-merge-cache.lock' will not be represented in diff
>> dpkg-source: error: unrepresentable changes to source
>> dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 1
>> debuild: fatal error at line 1182:
>> dpkg-buildpackage -us -uc -ui failed
>>
>>
>> What am I missing here?
>
> It is trying to apply the patches to an already patched source.
>
> If you run the whole thing (debuild etc) you best start from
> a freshly unpacked source package.
>
> Otherwise you want to jump into the middle of the package
> build (e.g. patches already applied or so). Then you'll have
> to understand how that specific build system works (e.g.
> configure, make or similar).
>
> Cheers
Dear Tomas,
Thanks for the swift reply!
OK, then I should do `quilt pop -a` before the second compilation,
right?
But that leads to another error message:
> apt-get source xscreensaver
> cd xscreensaver-6.0.6+dfsg1
> LANG=C debuild -us -uc
> quilt pop -a -f
> LANG=C debuild -us -uc
dpkg-buildpackage -us -uc -ui
dpkg-buildpackage: info: source package xscreensaver
dpkg-buildpackage: info: source version 6.06+dfsg1-2
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Tormod Volden <debian.tormod@gmail.com>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 10_upstream_skip_retired_hacks.patch
dpkg-source: info: applying 12_upstream_man_beats_speereev_backslash.patch
dpkg-source: info: applying 20_hacks_man_section.patch
dpkg-source: info: applying 20_skip_install-pam.patch
dpkg-source: info: applying 50_debian_branding.patch
dpkg-source: info: applying 51_generalize_external_commands.patch
dpkg-source: info: applying 52_standard_time_format.patch
dpkg-source: info: applying 53_default_newLoginCommand.patch
dpkg-source: info: applying 55_add_unicode_hack.patch
dpkg-source: info: applying 57_grabDesktopImages_default_off.patch
dpkg-source: info: applying 75_Makefile_in-ignore-alien-platforms.patch
dpkg-source: info: applying 81_hacks_deterministic_file_order.patch
dpkg-source: info: applying 90_remove_Easter_egg_about_version.patch
dpkg-source: info: applying 92_hacks_images_distclean.patch
dpkg-source: info: applying 94_allow_unrecognized_conf_opts.patch
dpkg-source: info: applying 96_nogl-build-for-nogl-config.patch
dpkg-source: info: applying 98_daemon_desktop_file.patch
dpkg-source: info: applying 100_configure_allow_warnings.patch
fakeroot debian/rules clean
dh clean --without autoreconf
debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1'
[ ! -f Makefile ] || /usr/bin/make distclean
make[2]: Entering directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1'
make[3]: Entering directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1/utils'
rm -f *.o a.out core
make[3]: Leaving directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1/utils'
make[3]: Entering directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1/jwxyz'
rm -f *.o a.out core
make[3]: Leaving directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1/jwxyz'
make[3]: Entering directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1/hacks/images'
Makefile:64: *** target file 'distclean' has both : and :: entries. Stop.
make[3]: Leaving directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1/hacks/images'
make[2]: *** [Makefile:59: clean] Error 5
make[2]: Leaving directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1'
make[1]: *** [debian/rules:55: override_dh_auto_clean] Error 2
make[1]: Leaving directory '/home/aleha/tmp/xscreensaver2/xscreensaver-6.06+dfsg1'
make: *** [debian/rules:19: clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed
(Of course, I am not simply recompiling, but, I am making a patch via
quilt. But since this is me doing it, the patch is not perfect first
time and I have to go over it again. I
have started from freshly downloaded sources, but that becomes
cumbersome and I would rather like modify the patch instead of starting
over. I am now happy with my patch, but still would like to know how to
do such things without starting over....)
Best,
Andreas
Reply to: