Merge ~panfaust/kubuntu-packaging/+git/libksane:work into ~kubuntu-packagers/kubuntu-packaging/+git/libksane:kubuntu_yakkety_archive

Proposed by Jose Manuel Santamaria Lema
Status: Merged
Merged at revision: a3d5a8047534b4793e957fdf6c93eb431fa3118e
Proposed branch: ~panfaust/kubuntu-packaging/+git/libksane:work
Merge into: ~kubuntu-packagers/kubuntu-packaging/+git/libksane:kubuntu_yakkety_archive
Diff against target: 81 lines (+30/-4)
5 files modified
debian/changelog (+7/-1)
debian/control (+19/-0)
debian/libkf5sane-data.install (+1/-0)
debian/libkf5sane5.install (+0/-1)
debian/rules (+3/-2)
Reviewer Review Type Date Requested Status
Rik Mills Approve
Philip Muškovac Needs Fixing
Review via email: mp+302979@code.launchpad.net

Description of the change

This merge request contains 2 commits, the first one corrects a problem similar to this one:
https://code.launchpad.net/~panfaust/kubuntu-packaging/+git/libkipi/+merge/302962

Here in libksane are the misplaced files are
usr/share/icons/hicolor/16x16/*

So in addition to the problems already mentioned in the libpiki merge request (violates a 'must' policy, contradicts the lib packaging guide, makes the upgrades unneccesarily difficult), here in libksane also the misplaced files can break the multiarch installation because the files have the same name for any architecture so libkf5ksane5 couldn't be installed, for instance, for both amd64 and i386 in the same system.

So I moved the files in question to a libkf5ksane-data package. That's the name of the package in debian's git master. In xenial there is already 'libksane-data', version '4:15.08.2-0ubuntu1' (note the epoch in the version) so I also made a dummy transitional package so the package managers will find more easily a solution for xenial->yakkety dist-upgrades, avoiding situations like this one:

root@xdu-up-test:/home/santa# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
[snip]
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
  gir1.2-packagekitglib-1.0 python3-aptdaemon skanlite
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

The change I made in the first commit in the debian/rules file is to add the epoch to the libksane-data dummy package and ONLY to that package; this way we don't have to add an epoch to the other packages so once yakkety is released we could remove both this change in the rules file and the dummy transitional package.

The change I made in the second commit is just removing the exclusion of 'kde-runtime' when calling dh_shlibdeps, this exclusion was there to avoid undesired dependencies when libksane was still based on kdelibs 4; note that the libkdecore5 symbols file from kde4libs injects a dependency on kde-runtime. So now that libksane is based on KDE Frameworks that exclusion is no longer needed.

To post a comment you must log in.
Revision history for this message
Philip Muškovac (yofel) wrote :

So the idea is ok, but the versions for the breaks are wrong

libkf5sane5 (<= 16.04.3-0ubuntu1~ubuntu16.10~ppa50),
should be
libkf5sane5 (<= 16.04.3~),

libksane-data (<= 16.04.3-0ubuntu1~ubuntu16.10~ppa50)
should be
libksane-data (<= 4:16.04.3~)

and is $(overridden_command) not a thing for dh_gencontrol?

review: Needs Fixing
Revision history for this message
Jose Manuel Santamaria Lema (panfaust) wrote :

Thank you for your reply Philip,

> So the idea is ok, but the versions for the breaks are wrong
>
> libkf5sane5 (<= 16.04.3-0ubuntu1~ubuntu16.10~ppa50),
> should be
> libkf5sane5 (<= 16.04.3~),
>
> libksane-data (<= 16.04.3-0ubuntu1~ubuntu16.10~ppa50)
> should be
> libksane-data (<= 4:16.04.3~)

Indeed I missed the epoch in libksane-data, that has to be corrected. However I think it's very arguably that the version of libkf5sane5 is wrong, because it depends on what you understand as "wrong": if I'm not mistaken the version you suggest would break dist-upgrades in the staging ppa; if you don't want to support that, then OK, but I used that version working on the assumption that you might want to support dist-upgrades with the staging ppa and you would include this request and you would upload the version with the ~ppa51 suffix to staging.

Anyway I will push a commit using the versions you said.

> and is $(overridden_command) not a thing for dh_gencontrol?

Well, in this case there won't be any difference in the final command to be executed, but I agree it's better to use $(overridden_command). It was done that way because I got the idea from other package not using dhmk.

Revision history for this message
Rik Mills (rikmills) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index da78194..d1d6e8f 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -13,10 +13,16 @@ libkf5sane (16.04.3-0ubuntu1) UNRELEASED; urgency=medium
6 * New upstream bugfix release.
7
8 [ Clive Johnston ]
9- * libkf5sane5 breaks/replaces libksane-data
10 * New upstream release (16.04.2)
11 * New upstream release (16.04.3)
12
13+ [ José Manuel Santamaría Lema ]
14+ * Install usr/share/icons/hicolor/16x16/* in libkf5sane-data
15+ * Provide libksane-data dummy transitional package to make the upgrades
16+ easier for the package managers.
17+ * Remove dh_shlibdeps override to exclude kde-runtime; this is no
18+ longer needed since the port to frameworks.
19+
20 -- Clive Johnston <clivejo@kubuntu.org> Fri, 08 Jul 2016 01:34:49 +0100
21
22 libkf5sane (15.12.3-0ubuntu1) xenial; urgency=medium
23diff --git a/debian/control b/debian/control
24index 6cfbc7a..2d75d32 100644
25--- a/debian/control
26+++ b/debian/control
27@@ -33,6 +33,25 @@ Description: scanner library (runtime)
28 .
29 This package contains the shared library.
30
31+Package: libkf5sane-data
32+Architecture: all
33+Depends: ${misc:Depends}
34+Breaks: libkf5sane5 (<= 16.04.3~), libksane-data (<= 4:16.04.3~)
35+Replaces: libkf5sane5 (<= 16.04.3~), libksane-data (<= 4:16.04.3~)
36+Description: scanner library (data files)
37+ The KDE scanner library provides an API and widgets for using scanners and
38+ other imaging devices supported by SANE.
39+ .
40+ This package contains data files used by the library.
41+
42+Package: libksane-data
43+Architecture: all
44+Section: oldlibs
45+Priority: extra
46+Depends: libkf5sane-data, ${misc:Depends}
47+Description: scanner library (data files) - transitional package
48+ This is a transitional dummy package. It can safely be removed.
49+
50 Package: libkf5sane-dev
51 Section: libdevel
52 Architecture: any
53diff --git a/debian/libkf5sane-data.install b/debian/libkf5sane-data.install
54new file mode 100644
55index 0000000..5dda087
56--- /dev/null
57+++ b/debian/libkf5sane-data.install
58@@ -0,0 +1 @@
59+usr/share/icons/hicolor/16x16/*
60diff --git a/debian/libkf5sane5.install b/debian/libkf5sane5.install
61index 30e7449..e631579 100644
62--- a/debian/libkf5sane5.install
63+++ b/debian/libkf5sane5.install
64@@ -1,3 +1,2 @@
65 usr/lib/*/libKF5Sane.so.5
66 usr/lib/*/libKF5Sane.so.5.*
67-usr/share/icons/hicolor/16x16/*
68diff --git a/debian/rules b/debian/rules
69index d8e4a0c..6441b1c 100755
70--- a/debian/rules
71+++ b/debian/rules
72@@ -2,6 +2,7 @@
73
74 include /usr/share/pkg-kde-tools/qt-kde-team/3/debian-qt-kde.mk
75
76-override_dh_shlibdeps:
77- $(overridden_command) $(foreach p,$(shell dh_listpackages | grep ^lib),-p$p) -- -xkde-runtime
78+PACKAGE_VERSION = $(shell dpkg-parsechangelog | grep '^Version: ' | sed 's/^Version: //')
79+override_dh_gencontrol:
80+ $(overridden_command) -plibksane-data -- -v"4:${PACKAGE_VERSION}"
81 $(overridden_command) --remaining-packages

Subscribers

People subscribed via source and target branches