Bug 43660 - New lib needs to install packages via apt-get
New lib needs to install packages via apt-get
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 4.1
Other All
: P5 normal (vote)
: UCS 4.3
Assigned To: Dirk Wiesenthal
Felix Botner
: interim-2
: 44031 (view as bug list)
Depends on: 40064 41039 41823 42580
Blocks: 43661
  Show dependency treegraph
 
Reported: 2017-02-27 18:31 CET by Dirk Wiesenthal
Modified: 2018-03-14 14:38 CET (History)
6 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2017-02-27 18:31:06 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.
Comment 1 Florian Best univentionstaff 2017-03-02 15:46:35 CET
(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?
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2017-03-02 16:13:43 CET
(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).
Comment 3 Dirk Wiesenthal univentionstaff 2017-03-02 16:15:04 CET
(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
Comment 4 Florian Best univentionstaff 2017-03-02 16:17:34 CET
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?
Comment 5 Dirk Wiesenthal univentionstaff 2017-04-05 13:57:08 CEST
*** Bug 44031 has been marked as a duplicate of this bug. ***
Comment 6 Dirk Wiesenthal univentionstaff 2018-02-09 12:53:05 CET
This was fixed along with Bug#40064.
Comment 7 Felix Botner univentionstaff 2018-02-13 12:14:18 CET
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?
Comment 8 Dirk Wiesenthal univentionstaff 2018-02-20 14:54:25 CET
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.
Comment 9 Dirk Wiesenthal univentionstaff 2018-02-20 14:54:46 CET
As of now, we lost some information for the progress bar.
Comment 10 Felix Botner univentionstaff 2018-02-21 09:50:27 CET
FAIL - do we need a changelog entry?
OK - apt-get
Comment 11 Dirk Wiesenthal univentionstaff 2018-02-21 12:07:09 CET
You are probably right. I added a paragraph.
Comment 12 Felix Botner univentionstaff 2018-02-22 11:38:09 CET
OK
Comment 13 Stefan Gohmann univentionstaff 2018-03-14 14:38:47 CET
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".