Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debian-cd does not add packages mentioned in Recommends and Suggests tags #19

Closed
serhepopovych opened this issue Jan 3, 2020 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@serhepopovych
Copy link
Owner

It is discovered that on Debian 9 (Stretch) and Debian 10 (Buster) not all packages present in target ISO images making installed system package set differ whenever access to network repository available or not.

In first case system installed with packages mentioned in Recommends and Suggests tags of package control file. In later, when no network available, system installed with limited functionality
missing number of packages as they not available on installation media ISO image.

Symptoms like ones described for Debian Edu project here. There is branch for fix candidate in debian-cd, however it neither applies correctly for the current debian-cd master nor looks as correct for me.

Further investigation shows that problem does not affect earlier Debian releases (7 and 8). However using debian-cd from 9/10 does not make issue reproducible on these releases.

Need more in-depth look at sort_deps from debian-cd as this is origin of issue according to contents of packages and packages.amd64 files that created by tools/sort_deps and does not
contain recommended packages.

@serhepopovych serhepopovych added the bug Something isn't working label Jan 3, 2020
@serhepopovych serhepopovych added this to the first-release milestone Jan 3, 2020
@serhepopovych serhepopovych self-assigned this Jan 3, 2020
@serhepopovych
Copy link
Owner Author

serhepopovych commented Jan 8, 2020

In general problem is solved in private repository of debian-cd. However implementation raises additional problems like too deep recursion of add_missing() helper in tools/sort_deps for which
perl complains with warning.

This is caused by sub optimal dependency resolution process where same package passed in
$list to add_missing() multiple times.

Helper variable used to track packages ($pkgin) from upper calls of add_missing() does not help
much.

Furthermore $list is array and therefore is_in_dep_list() has O(n) complexity, together with deep
recursion making performance even worse. Making it hash isn't trivial. It is very likely that $parents
must be turned into hash, mirroring contents of $list for O(1) lookups.

Take note that hash should be with package name as key and array as value holding multiple package descriptions as "Version" and "CmpOp" might differ.

@serhepopovych
Copy link
Owner Author

Improving performance of add_missing() with hash tables for $parents as described in comment 1
is far beyond of this ticket. Now even with perl complains about too deep recursion original problem
is fixed. However it is possible that one day we might be hit by perl recursion problem. Let's keep it for future (upstream)? work.

@serhepopovych
Copy link
Owner Author

Deep recursion problem now solved. There is no need in more complex hash indirection.

Main contributors to deep recursion problem was add_recommends() and add_suggests()
subroutines that run add_missing() recursively for every package already present in the list.

Rather than only package whose Recommens and Suggests processed.

Pushed directly to master with commit 1bb7890 ("simple-cdd-meta/debian: Update debian-cd submodule to include sort_deps fixes").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant