Bug#739885: rewrite the python3.x shebang to avoid an explicit dependency on python3.x

Simon McVittie smcv at debian.org
Thu Sep 24 11:36:07 BST 2020


Control: retitle -1 rhythmbox-plugins: explicitly Depends on the python3.X that was default at build time
Control: tags -1 = help moreinfo

On Mon, 09 Mar 2020 at 11:40:30 +0100, Laurent Bigonville wrote:
> On Sun, 23 Feb 2014 15:12:52 +0100 Matthias Klose <doko at debian.org> wrote:
> > rewrite the python3.x shebang to avoid an explicit dependency on python3.x
> >
> > patch at
> > http://launchpadlibrarian.net/167275626/rhythmbox_3.0.1-1ubuntu9_3.0.1-1ubuntu10.diff.gz
> 
> Are you sure this patch is doing anything?
> 
> AFAICS, adding the --shebang=/usr/bin/python3 is not changing anything (at
> least it the recent versions)
> 
> I don't think this has anything to do with the shebang, but more about
> rtupdate mechanism

I confirm that this updated version of the proposed patch:

----8<----
diff --git a/debian/rules b/debian/rules
index f93664d7c..0ac2f1da8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,7 +30,7 @@ override_dh_missing:
 	dh_missing --fail-missing -Xsample-plugins -Xcontext -Xrbzeitgeist

 override_dh_python3:
-	dh_python3 --no-ext-rename /usr/lib/$(DEB_HOST_MULTIARCH)/rhythmbox
+	dh_python3 --shebang=/usr/bin/python3 --no-ext-rename /usr/lib/$(DEB_HOST_MULTIARCH)/rhythmbox --verbose

 override_dh_makeshlibs:
 	dh_makeshlibs -prhythmbox-plugins --no-act
----8<----

has no practical effect on the current version of rhythmbox: it still ends
up with rhythmbox-plugins Depends: python3 (>= 3.8), python3 (<< 3.9) and
python3.8.

Matthias, please could you rephrase the bug you were reporting in terms of
steps to reproduce (presumably "build src:rhythmbox"), expected result, and
actual result?

dh_python3 --verbose output appears below, in case it helps anyone to work
out what (if anything) we are doing wrong.

My best guess is that because our private library directory
/usr/lib/x86_64-linux-gnu/rhythmbox contains a mixture of Python and
non-Python plugins, dh_python3 cannot identify which Python version is
needed for plugins/android/libandroid.so (because the answer is actually
"no Python version, it has nothing to do with Python") and pessimistically
assumes that only the current default version of Python is acceptable.

This means rhythmbox needs to be rebuilt every time the default Python
version changes, and cannot be built with support for both python3.8 and
python3.9 during the transitional period when the default is in the process
of changing from python3.8 to python3.9.

However, I don't think that's a serious problem, because there are lots of
packages that only support one Python version and need to be rebuilt,
in particular anything that embeds Python (such as libpeas-1.0-0, which
Rhythmbox depends on!) - so this does not create a problem that would not
already exist. But perhaps there's something I'm not seeing?

Thanks,
    smcv

dh_python3 --shebang=/usr/bin/python3 --no-ext-rename /usr/lib/x86_64-linux-gnu/rhythmbox --verbose
D: dh_python3 dh_python3:161: version: 4.20200804
D: dh_python3 dh_python3:162: argv: ['/usr/bin/dh_python3', '--shebang=/usr/bin/python3', '--no-ext-rename', '/usr/lib/x86_64-linux-gnu/rhythmbox', '--verbose']
D: dh_python3 dh_python3:163: options: {'guess_deps': True, 'skip_private': False, 'verbose': True, 'arch': None, 'package': None, 'no_package': None, 'compile_all': False, 'vrange': None, 'regexpr': None, 'accept_upstream_versions': False, 'depends': None, 'depends_section': None, 'recommends': None, 'recommends_section': None, 'suggests': None, 'suggests_section': None, 'requires': None, 'shebang': '/usr/bin/python3', 'ignore_shebangs': False, 'clean_dbg_pkg': True, 'no_ext_rename': True, 'no_shebang_rewrite': False, 'O': None}
D: dh_python3 dh_python3:164: args: ['/usr/lib/x86_64-linux-gnu/rhythmbox']
D: dh_python3 dh_python3:165: supported Python versions: 3.8 (default=3.8)
D: dh_python3 debhelper:99: skipping package rhythmbox-data (missing ${python3:Depends} in Depends)
D: dh_python3 debhelper:99: skipping package rhythmbox-plugin-cdrecorder (missing ${python3:Depends} in Depends)
D: dh_python3 debhelper:99: skipping package librhythmbox-core10 (missing ${python3:Depends} in Depends)
D: dh_python3 debhelper:99: skipping package rhythmbox-dev (missing ${python3:Depends} in Depends)
D: dh_python3 debhelper:99: skipping package rhythmbox-doc (missing ${python3:Depends} in Depends)
D: dh_python3 debhelper:99: skipping package gir1.2-rb-3.0 (missing ${python3:Depends} in Depends)
D: dh_python3 debhelper:152: source=rhythmbox, binary packages=['rhythmbox', 'rhythmbox-plugins']
D: dh_python3 dh_python3:183: processing package rhythmbox...
D: dh_python3 fs:260: package rhythmbox details = {'requires.txt': set(), 'egg-info': set(), 'nsp.txt': set(), 'shebangs': set(), 'public_vers': set(), 'private_dirs': {}, 'compile': False, 'ext_vers': set(), 'ext_no_version': set()}
D: dh_python3 depends:117: generating dependencies for package rhythmbox
D: dh_python3 depends:275: D=set(); R=[]; S=[]; E=[], B=[]; RT=[]
D: dh_python3 dh_python3:183: processing package rhythmbox-plugins...
D: dh_python3 fs:260: package rhythmbox-plugins details = {'requires.txt': set(), 'egg-info': set(), 'nsp.txt': set(), 'shebangs': set(), 'public_vers': set(), 'private_dirs': {'/usr/lib/x86_64-linux-gnu/rhythmbox': {'compile': True, 'ext_no_version': {'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/android/libandroid.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/fmradio/libfmradio.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/rblirc/librblirc.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/iradio/libiradio.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/generic-player/libgeneric-player.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/dbus-media-server/libdbus-media-server.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/notification/libnotification.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/mpris/libmpris.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/mmkeys/libmmkeys.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/ipod/libipod.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/mtpdevice/libmtpdevice.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/daap/libdaap.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/power-manager/libpower-manager.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/audioscrobbler/libaudioscrobbler.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/grilo/libgrilo.so', 'debian/rhythmbox-plugins/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/audiocd/libaudiocd.so'}}}, 'compile': False, 'ext_vers': set(), 'ext_no_version': set()}
D: dh_python3 depends:117: generating dependencies for package rhythmbox-plugins
D: dh_python3 depends:275: D={'python3 (>= 3.8~)', 'python3:any', 'python3 (<< 3.9)'}; R=[]; S=[]; E=[], B=[]; RT=[('/usr/lib/x86_64-linux-gnu/rhythmbox', '-V 3.8')]



More information about the pkg-gnome-maintainers mailing list