Univention Bugzilla – Bug 30279
PackageManager: order of packages influences installation
Last modified: 2015-05-19 15:49:24 CEST
We just realized that the order of packages to be installed influence the final outcome. The following script cannot install the given packages: > #!/usr/bin/python > > from univention.lib.package_manager import PackageManager > > def info_handler(s): print 'INFO:', s > def error_handler(s): print 'ERROR:', s > def step_handler(s): print 'STEP:', s > > package_manager = PackageManager(info_handler=info_handler, error_handler=error_handler, step_handler=step_handler, lock=False, always_noninteractive=True) > with package_manager.locked(reset_status=True, set_finished=True): > with package_manager.no_umc_restart(exclude_apache=True): > success = package_manager.install('ucs-school-slave', 'univention-samba', 'univention-samba-slave-pdc') Its output is: > INFO: ucs-school-slave: Failed to install > ERROR: ucs-school-slave: Failed to install > INFO: univention-samba: Failed to install > ERROR: univention-samba: Failed to install > INFO: univention-samba-slave-pdc: Failed to install > ERROR: univention-samba-slave-pdc: Failed to install ucs-school-slave has a dependency on univention-samba4 | univention-samba. Listing it as first packages seems to mark univention-samba4 for the installation. In turn, this conflicts with univention-samba. Setting ucs-school-slave at the end of the list resolves this issue. Nevertheless, it would be good to adjust the behaviour to be independent of the package order.
*** Bug 29636 has been marked as a duplicate of this bug. ***
Use apt.cache.ProblemResolver manually. I was not able to be fully compatible with apt-get install, but I think I am close enough. Fixed in: univention-lib 2.0.23-1.121.201303121440 package_manager.install('ucs-school-slave', 'univention-samba', 'univention-samba-slave-pdc') should now correctly install these packages and not samba4, ordering does not matter anymore. One exception: In this specific situation, one package is installed that would not have been installed with the "correct order": python-sqlite2. I guess this is because it is to be installed during ucs-school-slave -> univention-samba4 and cannot be identified as garbage during univention-samba: There is a OR-dependency on pykota thus it is not autoremovable, although another package in the OR-dependency list is already installed. Not perfect, but fixing this would be too much effort I would say.
(In reply to comment #2) > Use apt.cache.ProblemResolver manually. I was not able to be fully compatible > with apt-get install, but I think I am close enough. > > Fixed in: > univention-lib 2.0.23-1.121.201303121440 > > package_manager.install('ucs-school-slave', 'univention-samba', > 'univention-samba-slave-pdc') > should now correctly install these packages and not samba4, ordering does not > matter anymore. One exception: In this specific situation, one package is > installed that would not have been installed with the "correct order": > python-sqlite2. I guess this is because it is to be installed during > ucs-school-slave -> univention-samba4 and cannot be identified as garbage > during univention-samba: There is a OR-dependency on pykota thus it is not > autoremovable, although another package in the OR-dependency list is already > installed. Not perfect, but fixing this would be too much effort I would say. OK, the order of the packages does not matter anymore. The python-pysqlite2 package was not installed on my system. (In reply to comment #1) > *** Bug 29636 has been marked as a duplicate of this bug. *** The uninstallation szenario from Bug 29636 was successfully. Changelog OK
UCS 3.1-1 has been released: http://download.univention.de/doc/release-notes-3.1-1_en.pdf http://download.univention.de/doc/release-notes-3.1-1.pdf If this error occurs again, please use "Clone This Bug".