1984
Comment:
|
← Revision 8 as of 2021-10-26 16:15:29 ⇥
2526
Add When an upstream assumes existence of machinery to inject correct version
|
Deletions are marked like this. | Additions are marked like this. |
Line 15: | Line 15: |
= When an upstream assumes existence of machinery to inject correct version = This approach avoids the pitfall of forgetting to update a patch or debian-autoloads.el file, and additionally ensures that the source package can build twice without "unrepresented upstream changes to the source" `debian/rules:` {{{ include /usr/share/dpkg/pkg-info.mk export DEB_VERSION_UPSTREAM … override_dh_elpa: sed -i "s/0.1/$(DEB_VERSION_UPSTREAM)/" foo.el dh_elpa sed -i "s/$(DEB_VERSION_UPSTREAM)/0.1/" foo.el }}} |
Workaround for cut backtrace output lines
ERT cuts backtrace output lines at 70 characters by default. This can be configured:
d/elpa-test:
ert_eval = (setq ert-batch-backtrace-right-margin 500)
The documentation of this variable says:
- Maximum length of lines in ERT backtraces in batch mode. Use nil for no limit (caution: backtrace lines can be very long).
When an upstream assumes existence of machinery to inject correct version
This approach avoids the pitfall of forgetting to update a patch or debian-autoloads.el file, and additionally ensures that the source package can build twice without "unrepresented upstream changes to the source" debian/rules:
include /usr/share/dpkg/pkg-info.mk export DEB_VERSION_UPSTREAM … override_dh_elpa: sed -i "s/0.1/$(DEB_VERSION_UPSTREAM)/" foo.el dh_elpa sed -i "s/$(DEB_VERSION_UPSTREAM)/0.1/" foo.el
Exclude ERT tests
Used in package lsp-mode where upstream also excludes some tests in their Makefile.
d/elpa-test:
ert_helper = debian/ert-helper.el
d/ert-helper.el:
See:
When a package test suite wants to write to $HOME
d/elpa-test:
ert_eval = (setq user-emacs-directory (make-temp-file "foo-test" 'dir-flag))
Rebuild all elpa-* packages in unstable against new Emacs in experimental
aptitude search "~Aunstable~n^elpa-" -F"%e" | while read p; do sbuild --extra-repository='deb http://deb.debian.org/debian experimental main' --build-dep-resolver=aspcud --add-depends="emacs (>= 1:26)" --add-depends="emacs-common (>= 1:26)" --add-depends="emacs-bin-common (>= 1:26)" --add-depends="emacs-nox (>= 1:26)" "$p"; done
You can then run autopkgtest on all the changes files (untested!):
for f in *.changes; do autopkgtest --setup-commands="echo >>/etc/apt/sources.list deb http://deb.debian.org/debian experimental main" --setup-commands="apt-get update" --setup-commands="apt-get install emacs/experimental" "$f" -l "$f.autopkgtest.log"; done