Univention Bugzilla – Bug 43660
New lib needs to install packages via apt-get
Last modified: 2018-03-14 14:38:47 CET
We experienced issues with running apt-get in a subprocess. It seems apt-get dislikes that all File descriptors were closed. Also, the Manager allows dry-run. +++ This bug was initially created as a clone of Bug #40064 +++ Currently, the UMC App Center installs, updates, uninstalls non-docker Apps with the old Application class. It should instead use the new App class. Some work still has to go into these functions, but it would be far better to use them. No double bug fixing when a dysfunctional routine is implemented in both classes. Support of docker features like a preinst script without additional implementation effort. Startup speed increases as the App cache only needs to be loaded once. The following things do not work at the moment: Dry run - there is no package list to get before installing an app. Connection to other hosts is currently done via "ssh univention-app ...". This may be a problem for non 4.1 systems. univention-app installs directly via apt-get, not with the PackageManager class. This should not make a difference, yet it needs to be tested thoroughly.
(In reply to Dirk Wiesenthal from comment #0) > We experienced issues with running apt-get in a subprocess. It seems apt-get > dislikes that all File descriptors were closed. What file descriptors? > Also, the Manager allows dry-run. What does this have to do with this bug? Manager means univention.appcenter.Manager?
(In reply to Florian Best from comment #1) > (In reply to Dirk Wiesenthal from comment #0) > > We experienced issues with running apt-get in a subprocess. It seems apt-get > > dislikes that all File descriptors were closed. > What file descriptors? I would assume "all". We currently have a lot of error messages if stderr is closed and apt-get/dpkg calls programms in (pre|post)(inst|rm).
(In reply to Florian Best from comment #1) > What does this have to do with this bug? Manager means > univention.appcenter.Manager? PackageManager. See Bug #43661
Which file descriptors are you talking about? You make subprocess.call(['apt-foo']) in univention-app ? and in univention-app you make sthg. like sys.stderr.close() ? Why can't you call subprocess.call with close_fds=True?
*** Bug 44031 has been marked as a duplicate of this bug. ***
This was fixed along with Bug#40064.
Sorry, i have to ask again. I was under the impression that python-apt is somewhat unstable and behaves slightly different to apt-get. So i thought we want to go for apt-get in the new appcenter. What is the motivation for using python-apt?
python-apt gives us more control over the packages. We have finer grained access to packages, output, and so on. But yes, it is error prone to some extend. Also, we try really hard to re-implement apt-get. So there is a good point in using apt-get in the first place. This has been done with the last commits.
As of now, we lost some information for the progress bar.
FAIL - do we need a changelog entry? OK - apt-get
You are probably right. I added a paragraph.
OK
UCS 4.3 has been released: https://docs.software-univention.de/release-notes-4.3-0-en.html https://docs.software-univention.de/release-notes-4.3-0-de.html If this error occurs again, please use "Clone This Bug".