Additional packages are installed with a minimal installation when creating a custom installation with Cubic

Bug #1943054 reported by michaelwaterman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cubic
Fix Released
High
Cubic PPA

Bug Description

I'm making my first steps in automating the installation of Ubuntu. Found the Cubic package being recommended and I'm trying it out at the moment.

One thing I noticed on one of the first runs was that there is a difference in output. Let me explain:

I always choose the minimum installation for Ubuntu and creating a custom ISO with Cubic adds around 40+ extra packages, most visible is Thunderbird, even though I did a next, next, finish in Cubic and changed nothing. After installing the additional packages are just there.

My Steps are:
Create a new project with Cubic (Ubuntu 20.04.3 LTS)
Next, Next, finish (no changes are applied) -> create installation media
Do a minimal installation of Ubuntu

The end result is that there are roughly 40+ packages extra installed than using the original Ubuntu installation ISO.

I believe it is a bug.

Expected result
The Cubic generated ISO should install the exact same packages as the default Ubuntu ISO file.

If you need additional info, just ask.

Revision history for this message
michaelwaterman (michaelwaterman) wrote :
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Thanks for the detailed information.
Which Ubuntu (version) ISO are you customizing?

Changed in cubic:
assignee: nobody → Cubic PPA (cubic-wizard)
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Never mind. I see it is 20.04.3 LTS.

Revision history for this message
michaelwaterman (michaelwaterman) wrote :

I've also tried it with 20.04.1 (Still had the ISO laying around), same result. Let me know if you need something tested.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Confirmed on Ubuntu 20.4.3 and Ubuntu 21.04 using Cubic 2021.06-52-release.

Changed in cubic:
importance: Undecided → High
status: New → Confirmed
Cubic PPA (cubic-wizard)
Changed in cubic:
status: Confirmed → In Progress
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

--------------
ANALYSIS
--------------

There are two sets of packages that must be removed after Ubiquity completes an installation.

#1. Packages to remove after a Typical installation.
These packages includes software that is needed in the Live Environment, but is not needed in the installed system.

#2. Packages to remove after a Minimal installation.
These packages includes "extra" default software such as Rhythmbox (music application), Thunderbird (e-mail client), Totem (video player), etc.

When Ubiquity finishes, it (is supposed to) ALWAYS removes the packages in set #1. For Thunderbird, for example, these packages are various language packs (thunderbird-locale-de, thunderbird-locale-en, thunderbird-locale-en-gb, thunderbird-locale-en-us, etc.).

Set #2 does not redundantly list the packages from set #1. In the case of Thunderbird, set #2 only contains two packages: thunderbird and thunderbird-gnome-support.

Continuing with the Thunderbird example, to completely remove thunderbird, all of the related packages from set #1 and set #2 must be removed:

        $ sudo apt -s autoremove --purge thunderbird
        The following packages will be REMOVED:
          libmessaging-menu0* thunderbird* thunderbird-gnome-support*
          thunderbird-locale-de* thunderbird-locale-en* thunderbird-locale-en-gb*
          thunderbird-locale-en-us* thunderbird-locale-es* thunderbird-locale-es-ar*
          thunderbird-locale-es-es* thunderbird-locale-fr* thunderbird-locale-it*
          thunderbird-locale-pt* thunderbird-locale-pt-br* thunderbird-locale-pt-pt*
          thunderbird-locale-ru* thunderbird-locale-zh-cn* thunderbird-locale-zh-hans*
          thunderbird-locale-zh-hant* thunderbird-locale-zh-tw*

Now this shouldn't be an issue, since the Minimal install option is supposed to remove all packages in set #1 *and* in set #2.

Initial testing, however, seems to show that the packages from set #1 are not removed when a Minimal install is selected.

This is not a problem for the original ISO, because, the impacted packages are also *duplicated* in set #2. In the case of Thunderbird, not only are thunderbird and thunderbird-gnome-support packages marked for removal, but so are the related language packs (thunderbird-locale-de, thunderbird-locale-en, thunderbird-locale-en-gb, thunderbird-locale-en-us, etc.).

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

--------------
CONCLUSION
--------------

This issue was not present in older ISOs. I do not know when this changed, but testing shows that Ubuntu 20.04 and 21.04 ISOs are affected.

This could have been a change in the way that Ubiquity works, or it could be a bug in Ubiquity. The fact that the related Thunderbird language packs are listed twice (both in set #1 and in set #2) implies that the Ubuntu developers are aware of this and expect the ISO to work this way.

Revision history for this message
Cubic PPA (cubic-wizard) wrote (last edit ):

--------------
OPTION 1
--------------

In Cubic, automatically identify related packages (for a Minimal install) and flag them for uninstallation.

I suspect that the Ubuntu developers specifically identified packages that needed to be listed twice, and *manually* included them in set #2. Other affected packages are not listed in either set; for example for Rhythmbox, related packages python3-mako and python3-makrupsafe are simply not flagged for removal in either set #1 (Typical install) or set #2 (Minimal install).

Therefore, it would be difficult to automatically identify related packages and flag them for uninstallation during a Minimal install, especially since this seems to have been a manual process for the original ISO.

Another drawback of this approach is that for each package, we would have to query which packages are related, to mark them for removal. This would be time consuming, may require Internet access, and could potentially mark very important packages for removal, resulting in a non-functioning ISO.

--------------
OPTION 2
--------------

Cubic should duplicate all of the packages in set #1 (Typical install) into set #2 (minimal Install). Although this may be redundant, it will ensure that all of the packages flagged for removal during a Typical install will also be removed during a Minimal install.

There should be no issue during installation with this approach, and it should remedy the original bug.

A challenge with this option will be displaying the package count on the Prepare page. It will be difficult to determine if set #2 is from the original unmodified ISO, or it is from a Cubic generate ISO that contains all of the packages from set #1. We will probably have to check to see if all items from set #1 are in set #2 before displaying the count. If they are, we will display the count of all packages in set #2. If they are not, we will display the sum of the packages in set #1 and set #2.

Revision history for this message
michaelwaterman (michaelwaterman) wrote :

Is there anything that I can do to assist?

As for option 1. I tried manually flagging the packages for uninstall (Using the Cubic select for removal option in the UI) and that simply didn't do anything. Packages where still installed.

Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

Michael,

I appreciate the offer!
I am almost done with the coding.
I would appreciate very much if you could test once I release the fix.

Revision history for this message
michaelwaterman (michaelwaterman) wrote :

Absolutely no problem, glad to help out. Just let me know when it’s ready.

Cubic PPA (cubic-wizard)
Changed in cubic:
status: In Progress → Fix Committed
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Fix released in Cubic version 2021.09-53.

Please test and let me know if there are any issues.

Changed in cubic:
status: Fix Committed → Fix Released
Revision history for this message
michaelwaterman (michaelwaterman) wrote :

Hello there,

Thanks for the quick fix! I've tested it this morning and it seems to be okay now. There's still a package difference. The original (minimum) install has 6 packages more than the custom install created with Cubic, but it's just related to the absence of some language packages, but as far I can see, everything simply works as expected.

Thanks again and have a good day!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.