4

I'm doing several huge package builds with dpkg-buildpackage -b in Ubuntu 17.04 (Debian-like "stretch/sid"). Packages has very high number of files and in build process there is step Scanning upstream source for new/changed copyright notices... with licensecheck script to recreate debian/copyright_newhints:

apt source packagename-V.E.R
sudo apt build-dep packagename-V.E.R
cd packagename-V.E.R

DEB_BUILD_OPTIONS='nostrip noopt debug' dpkg-buildpackage -b -uc -us

... normal work ...

make[1]: Leaving directory '..../debian/build/deb'
touch debian/stamp-makefile-check/deb
CDBS WARNING:  DEB_MAKE_CHECK_TARGET unset, not running checks
 fakeroot debian/rules binary
CDBS WARNING:  copyright-check disabled - touch debian/copyright_hints to enable.
debian/rules:158: warning: overriding recipe for target 'list-missing'
/usr/share/cdbs/1/rules/utils.mk:126: warning: ignoring old recipe for target 'list-missing'
test -x debian/rules
dh_testroot
dh_prep -X org.gtk.test.gschema.xml.orig
dh_installdirs -A
mkdir -p "debian/build"
CDBS WARNING:    DEB_DH_INSTALL_ARGS is deprecated since 0.4.85
CDBS WARNING:    DEB_DH_STRIP_ARGS is deprecated since 0.4.85
CDBS WARNING:    DEB_DH_BUILDDEB_ARGS is deprecated since 0.4.85

Scanning upstream source for new/changed copyright notices...

set -e; LC_ALL=C.UTF-8 /usr/bin/licensecheck --check '.*' --recursive --copyright --deb-fmt --ignore '^(debian/(changelog|copyright(|_hints|_newhints)))$' --lines 0 * | /usr/lib/cdbs/licensecheck2dep5 > debian/copyright_newhints

The step licensecheck --check '.*' --recursive is very slow and takes up to dozen minutes or even longer (and in top output licensecheck is the program which consumes CPU time). It does something like custom grepping of all files. But I have fast FS and reading all of files (with md5sum computation) is just 10 seconds.

I want to make this step faster: either by disabling licensecheck run completely or by changing some settings of licensecheck to make it faster.

osgx
  • 90,338
  • 53
  • 357
  • 513

1 Answers1

2

I'm stuck at this issue myself. A quick and dirty workaround is to simply apt-get remove licensecheck, and then reinstall after you're done building. It will just say it couldn't find it and continue with the build.

I would post this as a comment, but stackoverflow wants me register for an account.