SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-02-27 05:13:01

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Metapackages and recommends

This is a tricky subject. The Debian default is to install packages with recommends regarded as dependencies. Sometimes this will bring in a lot of unwanted packages, so people might use the --no-install-recommends option. It's also possible to change your system settings to make that the default.

It get's more complicated with metapackages. A few years ago when Debian did not install recommends by default, metapackages had hard dependencies for the packages they wanted to bring in. OK, but if you uninstalled one of those, the metapackage got uninstalled too and all its other dependencies would get marked as orphans. Apt-get would offer to uninstall all those "unneeded" packages and sometimes people who took up the offer would lose a big chunk of their system.

Now the CrunchBang metapackages, for example, list all their requirements as recommends not hard dependencies. Under the current Debian default policy they will be installed, but if a user wants to uninstall one of them the metapackage will remain, so everything else will stay. This gives the user more flexibility.

OK the problem for us is: what if we want to install some packages without recommends (eg fileroller, which would otherwise drag in a big chunk of Gnome) but have those packages brought in by a BunsenLabs metapackage?

I can only think of two options:

1) --no-install-recommends by default, hard dependencies in metapackages. Goes back to the earlier lose-half-your-system problem.

2) Install with recommends, metapackage recommends packages. Those packages then drag in their own recommends, bloating out your system.

Is there any way for recommends of metapackages not to bring in their own recommends? Probably not I guess...


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

Help fund CrunchBang, donate to the project!

#2 2015-02-27 06:22:38

zazen23
#! Member
Registered: 2011-07-10
Posts: 79

Re: Metapackages and recommends

Could one use the tools in the equivs package to create a dummy package to fulfill the dependency?

Offline

#3 2015-02-27 06:52:32

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Metapackages and recommends

^yes that's a way out for the user to deal with a potential loss of a metapackage.

However, I'm talking here about how BunsenLabs should set up the system, and whether the metapackages should use depends or recommends.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#4 2015-02-27 06:58:00

Snap
#! Die Hard
Registered: 2013-10-22
Posts: 567

Re: Metapackages and recommends

I try to avoid metas anytime. It takes more time and dedication, but in the end you get what you want by installing packages individually without the dependency hell.

Offline

#5 2015-02-27 07:01:49

AnInkedSoul
#! CrunchBanger
Registered: 2010-06-30
Posts: 232

Re: Metapackages and recommends

Succinctly....I would do multiple packages that use depends only. For example, a bunsen-core package which pulls in the absolute necessities, then do a bunsen-extras for some optional good stuff, then maybe bunsen-bloat for the really bloaty stuff. This way you know exactly what a user will/not get.

Offline

#6 2015-02-27 07:43:18

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Metapackages and recommends

^Thanks, that makes sense. Break up the packages into groups, so that a user who uninstalls something in bunsen-bloat is only in danger of losing the other bloat packages.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#7 2015-03-24 09:41:51

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Metapackages and recommends

"bunsen-base" packages

OK maybe the first meta to put together would be bunsen-base (or bunsen-core?) with only the minimum of packages to get the familiar desktop together, with the expected functionality.

So for example, the pipemenus could be left in because (like all the config files and scripts) they're fairly small and provide an easy path to a more complete system. OTOH maybe the geany plugins could be left for later.

A slightly controversial suggestion: dillo for browser. It's about the fastest minimal browser I know - no javascript, no flash, css preferably turned off - but good enough for a quick google or a download till the user installs their particular favourite.

A suggested apps list:
(all to be installed without recommends)

policykit-1
xorg
dillo
openbox obconf obmenu conky-all tint2 clipit suckless-tools gmrun nitrogen hsetroot
lightdm thunar desktop-base
wireless-tools firmware-linux firmware-iwlwifi firmware-ralink firmware-ipw2x00 firmware-realtek intel-microcode amd64-microcode
e2fsprogs xfsprogs reiserfsprogs reiser4progs jfsutils ntfs-3g fuse gvfs gvfs-fuse fusesmb
geany mirage synaptic lxappearance xfce4-notifyd libnotify-bin gksu zenity arandr xinput xsel xdotool thunar-volman python-xdg ntp curl
fonts-dejavu fonts-droid fonts-freefont-ttf fonts-liberation dmz-cursor-theme gtk2-engines-murrine gtk2-engines-pixbuf gtk2-engines
bunsen-welcome bunsen-pipemenus bunsen-common bunsen-user-setup bunsen-lock bunsen-wmhacks bunsen-configs bunsen-exit bunsen1-theme bunsen1-wallpapers

Could some of these be left out of the "base" package list?

Last edited by johnraff (2015-03-24 09:43:06)


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#8 2015-03-24 12:53:53

spacex
ew
From: Norway
Registered: 2015-01-17
Posts: 385
Website

Re: Metapackages and recommends

It depends what kind of users you want to target. The less people know, the more they need to have the recommends enabled.


Regards,
spacex/ew
http://tweaklinux.org

Offline

#9 2015-03-24 15:48:54

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: Metapackages and recommends

Quoted from the Debian Live Manual:

If you find the installation of recommended packages bloats your image too much, provided you are prepared to deal with the consequences discussed below, you may disable that default option of APT with:

$ lb config --apt-recommends false

The most important consequence of turning off recommends is that live-boot and live-config themselves recommend some packages that provide important functionality used by most Live configurations, such as user-setup which live-config recommends and is used to create the live user. In all but the most exceptional circumstances you need to add back at least some of these recommends to your package lists or else your image will not work as expected, if at all. Look at the recommended packages for each of the live-* packages included in your build and if you are not certain you can omit them, add them back into your package lists.

The more general consequence is that if you don't install recommended packages for any given package, that is, "packages that would be found together with this one in all but unusual installations" (Debian Policy Manual, section 7.2), some packages that users of your Live system actually need may be omitted. Therefore, we suggest you review the difference turning off recommends makes to your packages list (see the binary.packages file generated by lb build) and re-include in your list any missing packages that you still want installed. Alternatively, if you find you only want a small number of recommended packages left out, leave recommends enabled and set a negative APT pin priority on selected packages to prevent them from being installed, as explained in APT pinning.

8.4.4 Passing options to apt or aptitude

If there is not a lb config option to alter APT's behaviour in the way you need, use --apt-options or --aptitude-options to pass any options through to your configured APT tool. See the man pages for apt and aptitude for details. Note that both options have default values that you will need to retain in addition to any overrides you may provide. So, for example, suppose you have included something from snapshot.debian.org for testing purposes and want to specify Acquire::Check-Valid-Until=false to make APT happy with the stale Release file, you would do so as per the following example, appending the new option after the default value --yes:

$ lb config --apt-options "--yes -oAcquire::Check-Valid-Until=false"

Please check the man pages to fully understand these options and when to use them. This is an example only and should not be construed as advice to configure your image this way. This option would not be appropriate for, say, a final release of a live image.

For more complicated APT configurations involving apt.conf options you might want to create a config/apt/apt.conf file instead. See also the other apt-* options for a few convenient shortcuts for frequently needed options.

8.4.5 APT pinning

For background, please first read the apt_preferences(5) man page. APT pinning can be configured either for build time, or else for run time. For the former, create config/archives/*.pref, config/archives/*.pref.chroot, and config/apt/preferences. For the latter, create config/includes.chroot/etc/apt/preferences.

Let's say you are building a wheezy live system but need all the live packages that end up in the binary image to be installed from sid at build time. You need to add sid to your APT sources and pin the live packages from it higher, but all other packages from it lower, than the default priority. Thus, only the packages you want are installed from sid at build time and all others are taken from the target system distribution, wheezy. The following will accomplish this:

$ echo "deb http://mirror/debian/ sid main" > config/archives/sid.list.chroot
$ cat >> config/archives/sid.pref.chroot << EOF
Package: live-*
Pin: release n=sid
Pin-Priority: 600

Package: *
Pin: release n=sid
Pin-Priority: 1
EOF

Negative pin priorities will prevent a package from being installed, as in the case where you do not want a package that is recommended by another package. Suppose you are building an LXDE image using task-lxde-desktop in config/package-lists/desktop.list.chroot, but don't want the user prompted to store wifi passwords in the keyring. This metapackage depends on lxde-core, which recommends gksu, which in turn recommends gnome-keyring. So you want to omit the recommended gnome-keyring package. This can be done by adding the following stanza to config/apt/preferences:

Package: gnome-keyring
Pin: version *
Pin-Priority: -1

In terms of how to accomplish it, you could potentially script your package list at build time. This way, you can use meta packages or not, whichever works the best.

Offline

#10 2015-03-24 18:19:39

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Metapackages and recommends

How about the Live Install - installs with recommends.

but once done ... in it's clean up operation before it reboots into the system asking you to remove the cd, a script resets:

apt-recommends false

... but then what do I know.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#11 2015-03-24 18:27:42

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: Metapackages and recommends

I think I have those dependencies sorted out for Live Build. I am not 100% sure yet as my last attempt at an install didn't work out. It would not let me setup any .ext filesystems. However, I noticed that Live Build does pull in something like partman-EFI. There is a chance it was seeing that EFI setup and trying to force me to install it that way. I went back to my debian netinstall image with EFI support and things went smoothly.
I am going to attempt to install to my external USB tonight and see if it works. If it does, then I found some info on Kali Linux's forums that should also help me support the dependencies needed to do a Live Build with EFI support. (No Secure boot support yet, as that will not be something your average user is going to want to put themselves through. )

Last edited by tknomanzr (2015-03-24 18:27:56)

Offline

#12 2015-03-24 18:32:08

spacex
ew
From: Norway
Registered: 2015-01-17
Posts: 385
Website

Re: Metapackages and recommends

Sector11 wrote:

How about the Live Install - installs with recommends.

but once done ... in it's clean up operation before it reboots into the system asking you to remove the cd, a script resets:

apt-recommends false

... but then what do I know.

You know plenty smile

I've experimented with live-builds, and if you do them without installing the recommends, you will have to manually add quite a few packages to your package-lists. Because some of the recommends are actually needed. In fact, live-build itself needs some of the recommends. And the finished build will lack functionality in certain apps and areas if the recommends isn't installed.

It's a very bad idea to leave it to the users to find out which recommends they actually need to pull in post-install. If you do that, then it's not suited for anyone below semi-advanced...


Regards,
spacex/ew
http://tweaklinux.org

Offline

#13 2015-03-24 21:25:39

cpoakes
#! CrunchBanger
From: Tucson, Arizona
Registered: 2012-05-19
Posts: 202

Re: Metapackages and recommends

I like the core + extras + bloat concept, but there are things in the proposed core list that constitute "standard"  but non-essential applications.  For example, I would remove dillo, nitrogen and geany but that would remove the metapackage and introduce the orphan problem for bunsen-base/core.

To clarify, I have no problem establishing these as the BL default applications.  I just have other preferences.  When I install iceweasel, gvim, and a custom wallpaper script then dillo, geany, and nitrogen become bloat.  Maybe there should be a "bunsen-standard" or "bunsen-recommends" package in addition to the core list.  In my mind, "core" would be focused on the WM and OS, and "standard/recommends" focused on the user applications.  Standard might include:

dillo
fileroller
geany
mirage
terminator
thunar

I acknowlege there is a line to be drawn: some applications are arguably core to the WM/desktop like lxappearance or nitrogen.  And while I personally consider nitrogen superfluous, I can tolerate keeping it around to prevent problems removing the metapackage and creating orphans.  However, it is more than reasonable for a user to make replacements such as pcmanfm for thunar, roxterm for terminator, viewnior for mirage, leafpad for geany, xarchiver for fileroller...   Removing thunar after adding pcmanfm should not bork a system by removing the bunsen-core metapackage.

While BL is NOT BL without something like openbox or tint2, I argue BL is still BL without thunar, geany, or even arguably lightdm (being an mdm fan myself).


programming and administering unix since 1976 (BSD, System III, Xenix, System V, Linux)

Offline

#14 2015-03-24 22:51:07

nicholasalipaz
#! Member
Registered: 2015-02-05
Posts: 72

Re: Metapackages and recommends

I completely agree with cpoakes point of view.  I wouldn't want dillo, mirage and geany in the core/base for sure.  The other three packages are debatable for me, but I would be fine if they were not in base too.  I wouldn't consider those to be  "core" or "base" functionality for the system.

As another option, I really like how you can define a command line editor for the system and change it at a later date using

sudo update-alternatives --config editor

.  Is there any possibility of doing something similar for bl?

$ sudo update-alternatives --config editor

There are 5 alternatives which provide `editor’. 
Selection Alternative
———————————————–
1 /usr/bin/vim
2 /bin/ed
*+ 3 /bin/nano
4 /usr/bin/vim.basic
5 /usr/bin/vim.tiny 
Press enter to keep the default[*], or type selection number:

Perhaps our meta package could allow choosing the different applications from a recommended list of 2-5 during install and then keeping the system from getting borked whenever removing one, or perhaps even prompting users to use

bl-reconfigure

whenever removing/replacing such applications.  Just an idea.

Offline

#15 2015-03-24 23:18:09

Ozitraveller
#! Junkie
From: Less is More!
Registered: 2011-04-26
Posts: 289
Website

Re: Metapackages and recommends

Sector11 wrote:

How about the Live Install - installs with recommends.

but once done ... in it's clean up operation before it reboots into the system asking you to remove the cd, a script resets:

apt-recommends false

... but then what do I know.

You will need to be careful here as you well end up with package bloat and a large iso.

Offline

#16 2015-03-24 23:58:57

spacex
ew
From: Norway
Registered: 2015-01-17
Posts: 385
Website

Re: Metapackages and recommends

Ozitraveller wrote:
Sector11 wrote:

How about the Live Install - installs with recommends.

but once done ... in it's clean up operation before it reboots into the system asking you to remove the cd, a script resets:

apt-recommends false

... but then what do I know.

You will need to be careful here as you well end up with package bloat and a large iso.

Yes, if they build the hybrid iso with all the recommends, they will end up with a ISO close to 1GB. But does it really matter once you have passed the cd-limit? Even if you do the live-build without the recommends, you will be above the cd-limit. Unless you skip apps like gimp, vlc, abiword, gnumeric, evince etc.... Some of them has to go to get below 700 MB.


Regards,
spacex/ew
http://tweaklinux.org

Offline

#17 2015-03-25 00:26:08

Ozitraveller
#! Junkie
From: Less is More!
Registered: 2011-04-26
Posts: 289
Website

Re: Metapackages and recommends

spacex wrote:
Ozitraveller wrote:
Sector11 wrote:

How about the Live Install - installs with recommends.

but once done ... in it's clean up operation before it reboots into the system asking you to remove the cd, a script resets:

apt-recommends false

... but then what do I know.

You will need to be careful here as you well end up with package bloat and a large iso.

Yes, if they build the hybrid iso with all the recommends, they will end up with a ISO close to 1GB. But does it really matter once you have passed the cd-limit? Even if you do the live-build without the recommends, you will be above the cd-limit. Unless you skip apps like gimp, vlc, abiword, gnumeric, evince etc.... Some of them has to go to get below 700 MB.

Yes that is the question. What size should the final image be? I know there are many post about waldorf image size. Also "apt-recommends" is not the only things that will impact the final image size using live-build.

Offline

#18 2015-03-25 00:43:43

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Metapackages and recommends

nicholasalipaz wrote:

I wouldn't want dillo, mirage and geany in the core/base for sure.

Understood. The problem is that the base has to have some browser, image viewer and text editor - they're essential functionalities. Dillo is a 3MB install on Jessie, about the smallest around I'd guess. Mirage is not so big either. Geany is a little bigger and could perhaps be replaced by Leafpad or Mousepad in the base. My thinking was that even if a user installed something else later it would be no big deal to keep little apps like those on their system. Crunchbang came with quite large default apps, but the way they were brought in as recommends made them easier to remove. Maybe that option for BunsenLabs needs rethinking? Maybe we should be installing recommends by default? The down side of that is when an unsuspecting user installs something from a big DE like Gnome or KDE, pulls in some session manager and makes a mess of their simple Openbox desktop. neutral

As another option, I really like how you can define a command line editor for the system and change it at a later date using

sudo update-alternatives --config editor

.  Is there any possibility of doing something similar for bl?

Unfortunately there's no x-text-editor alternative like the cli alternative. There is gnome-text-editor but not all editors add themselves to that - geany for example. Likewise there's no mechanism for image viewers. All we could do might be to set environment variables like _BUNSEN_TEXT_EDITOR in the user's shell which could be used by scripts and menus. Users could edit those variables in .xsessionrc easily enough if they changed their choice of apps.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#19 2015-03-25 00:45:15

Ozitraveller
#! Junkie
From: Less is More!
Registered: 2011-04-26
Posts: 289
Website

Re: Metapackages and recommends

tknomanzr wrote:

I think I have those dependencies sorted out for Live Build. I am not 100% sure yet as my last attempt at an install didn't work out. It would not let me setup any .ext filesystems. However, I noticed that Live Build does pull in something like partman-EFI. There is a chance it was seeing that EFI setup and trying to force me to install it that way. I went back to my debian netinstall image with EFI support and things went smoothly.
I am going to attempt to install to my external USB tonight and see if it works. If it does, then I found some info on Kali Linux's forums that should also help me support the dependencies needed to do a Live Build with EFI support. (No Secure boot support yet, as that will not be something your average user is going to want to put themselves through. )

I saw this a few days ago, hope it  helps.
Re: Bug? No ext support when installing Jessie Live

Offline

#20 2015-03-25 00:52:00

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Metapackages and recommends

I forgot to put in a terminal emulator. With X you'd get xterm anyway of course. Some people are quite fond of Terminator, and others (self included) like the much smaller rxvt-unicode (urxvt). Terminator brings in a lot of dependencies and is quite slow to open a new window, but urxvt might be a bit too minimal for new users. I was wondering if xfce4-terminal might be a reasonable choice for default? It has tabs and a number of other features, should feel at home with some other xfce apps around, but is still fast and quite a small install.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#21 2015-03-25 01:12:04

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Metapackages and recommends

I'm all for keeping the size down, just on principle.

Big applications like Gimp can easily be added post-install, and the main reason for including them on an iso is for use in a live session AFAICS.

There have already been suggestions for a BunsenLabs lite (although I don't think you can get an element lighter than hydrogen! BunsenLabs Proton maybe?)


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#22 2015-03-25 01:15:30

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Metapackages and recommends

I think a Bunsen-base install would be something like bunsenlite though the user would probably want to add some apps on top.

Then bunsen-standard and bunsen-full could add progressively more of the kind of packages that went in CrunchBang. (Or possibly just one "standard" metapackage?)

Last edited by johnraff (2015-03-25 01:16:21)


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#23 2015-03-25 02:08:24

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: Metapackages and recommends

Ozitraveller wrote:
tknomanzr wrote:

I think I have those dependencies sorted out for Live Build. I am not 100% sure yet as my last attempt at an install didn't work out. It would not let me setup any .ext filesystems. However, I noticed that Live Build does pull in something like partman-EFI. There is a chance it was seeing that EFI setup and trying to force me to install it that way. I went back to my debian netinstall image with EFI support and things went smoothly.
I am going to attempt to install to my external USB tonight and see if it works. If it does, then I found some info on Kali Linux's forums that should also help me support the dependencies needed to do a Live Build with EFI support. (No Secure boot support yet, as that will not be something your average user is going to want to put themselves through. )

I saw this a few days ago, hope it  helps.
Re: Bug? No ext support when installing Jessie Live

Yeah. Don't want to derail the thread but am working on this now.

Offline

#24 2015-03-25 02:09:39

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: Metapackages and recommends

johnraff wrote:

I forgot to put in a terminal emulator. With X you'd get xterm anyway of course. Some people are quite fond of Terminator, and others (self included) like the much smaller rxvt-unicode (urxvt). Terminator brings in a lot of dependencies and is quite slow to open a new window, but urxvt might be a bit too minimal for new users. I was wondering if xfce4-terminal might be a reasonable choice for default? It has tabs and a number of other features, should feel at home with some other xfce apps around, but is still fast and quite a small install.

I really like sakura though it does have to pull in vte dependencies.

Edit:
I wanted to add to your last post also @johnraff. If you go with a lite version, it only really needs a web browser, editor, terminal emulator, and file manager. You will be able to build that into a cd size. The last build I did was at 742mb. It should just barely fit.

Last edited by tknomanzr (2015-03-25 02:12:20)

Offline

Help fund CrunchBang, donate to the project!

#25 2015-03-25 03:04:22

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Metapackages and recommends

Sakura was another one I was thinking about. It seems even lighter than xfce4-terminal. The tab bar is very wide though, at least in the current bunsen1 theme.

Anyone else have preference between these two (or possibly lxterminal)? Any other mid-sized terminals, light but with tabs, openable urls and copy/paste?


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo