Package: openjdk-8 Version: 8u40~b04-2 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu utopic ubuntu-patch
Hi guys, We got a backport request in Ubuntu for openjdk-8, with a note that gcc-4.9 → gcc-4.8 in d/control is required. I took a look and noticed some automagic generation, but this assumes that the release on the machine being built for is the same as the one the package is being prepared for. I don't think this assumption will always hold. How about the attached approach, which uses the changelog distribution instead? A modification might be to fall back to the old way in the UNRELEASED case? Don't have a solution for the distribution variable apart from maintaining a table mapping from release to distro, but I think that it's less likely to be a problem in practice. Cheers, -- Iain Lane [ i...@orangesquash.org.uk ] Debian Developer [ la...@debian.org ] Ubuntu Developer [ la...@ubuntu.com ]
diff -u openjdk-8-8u40~b04/debian/rules openjdk-8-8u40~b04/debian/rules --- openjdk-8-8u40~b04/debian/rules +++ openjdk-8-8u40~b04/debian/rules @@ -27,8 +27,8 @@ PKGVERSION := $(call vafilt,$(CHANGELOG_VARS),Version) distribution := $(shell lsb_release --id --short) -distrel := $(shell lsb_release --codename --short) -ifeq ($(distrel),n/a) +distrel := $(strip $(patsubst %-backports, %, $(patsubst %-updates, %, $(call vafilt,$(CHANGELOG_VARS),Distribution)))) +ifeq ($(distrel),UNRELEASED) distrel := sid endif