You are not logged in.

#1 2011-09-20 22:27:51

fast_rizwaan
Member
Registered: 2010-04-01
Posts: 65

AIF - how to enable custom target packages in interactive procedure?

Hi,

I'm trying to make a custom arch installation iso with aif. I want to include xorg, gnome, etc. on it and [x] enable all dependencies by default for package installation.

For example, I created a core.db.tar.gz with a single package xterm at /src/core/pkg

How can I get the xterm package be selected at package selection?

Please see the screenshot, I want

[x] xterm
     instead of
[ ] xterm

aifpackageselection.png

Please help me with [x] enabling target packages by default in "aif -p interactive" (interactive) procedure. I want my custom iso to be similar to official arch installer.


I tried putting this

TARGET_GROUPS='base gnome'
TARGET_PACKAGES_EXCLUDE='reiserfsprogs'
TARGET_PACKAGES='openssh e2fsprogs cryptsetup lvm2 xfsprogs xterm xorg-xinit nouveau-dri xf86-video-nouveau'

into

/usr/lib/aif/core/procedures/interactive

which did not help.

thanks.

Offline

#2 2011-09-21 01:54:09

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: AIF - how to enable custom target packages in interactive procedure?

Moderator:  Technically, that image exceeds our policy as to dimensions.  I don't enforce that.  The image size is only 26KB.  That is half of our byte limit, the limit that I enforce.  Carry on, but beware that your experience with other moderators might vary.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2011-09-21 18:45:16

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: AIF - how to enable custom target packages in interactive procedure?

if you would have looked at the interactive procedure, you could have easily seen that it calls interactive_select_packages() defined in libs/lib-ui-interactive.sh to construct the package selection dialogs.
if you would look at that function, you would see how it builds the dialog.  Currently it's a bit rigid in that it only preselects what's in a choosen group and what's in $needed_pkgs, for now you could hack that quick and dirty, although it seems useful to have a list of packages that can be defined to always be selected by default.  I suggest you file a feature request for that (and preferably with a patch), it can be as simple as a preselected_pkgs variable.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#4 2011-09-21 22:48:21

fast_rizwaan
Member
Registered: 2010-04-01
Posts: 65

Re: AIF - how to enable custom target packages in interactive procedure?

Thanks Dieter,

I can manually enable groups xorg, gnome, xorg-drivers, etc. putting these lines in "/usr/lib/aif/core/libs/lib-ui-interactive.sh"

for package groups:

local grouplist=(gnome ^ ON)
local grouplist=(xorg ^ ON)
local grouplist=(xorg-drivers ^ ON)

above "ask_option no "Choose bootloader""

or put a loop like this before ask_option no "Choose bootloader" under select_packages() section

custom_grouplist_on="gnome xorg xorg-drivers"
  for i in $custom_grouplist_on; do
      local grouplist+=(${i} ^ ON)
  done

for individual packages:

custom_needed_pkgs="xorg-xinit xterm"
	for i in $custom_needed_pkgs; do
	   needed_pkgs+=(${i})
	done

just below "needed_pkgs+=("${needed_pkgs_fs[@]}")" and above "while read pkgname pkgver pkggroup pkgdesc; do"


except base, I'll go with needed_pkgs without groups, to (giving individual package names saves a lot of space in installation.)

I'm not an expert in scripting. So, I'll request a feature.

Offline

Board footer

Powered by FluxBB