Official NuTyX forums

Help => Cards: The Package Manager => Topic started by: dufresnep on Fri Oct 25 06:43:06 2019

Title: [suggestion] add a type of dir field to the dir lines of cards.conf
Post by: dufresnep on Fri Oct 25 06:43:06 2019
I think part of the problem why cards depcreate packageName results in segmentation faults if cards.conf contains lines like
dir var/lib/pkg/depot/collectionName
is that cards get confused between ports directories and binary packages directories.

The solution would be simple, add a type field to the dir lines.

I think most /etc/cards.conf files should looks like:
#url apply only to dir of type binary packages
url http://download.nutyx.org

dir b /var/lib/pkg/depot/base
dir b /var/lib/pkg/depot/cli
dir b /var/lib/pkg/depot/cli-extra
dir b /var/lib/pkg/depot/gui
dir b /var/lib/pkg/depot/gui-extra
dir b /var/lib/pkg/depot/desktops

dir p /usr/ports/base
dir p /usr/ports/cli
dir p /usr/ports/cli-extra
dir p /usr/ports/gui
dir p /usr/ports/gui-extra
dir p /usr/ports/desktops
dir p /usr/ports/personal
Title: Re: [suggestion] add a type of dir field to the dir lines of cards.conf
Post by: dufresnep on Fri Oct 25 06:51:51 2019
hum...
maybe it could be summarize to:
url b http://download.nutyx.org
basedir p /usr/ports
basedir b /var/lib/pkg/depot
collections b base,cli,cli-extra,gui,gui-extra,desktops
collections p base,cli,cli-extra,gui,gui-extra,desktops,personal
Title: Re: [suggestion] add a type of dir field to the dir lines of cards.conf
Post by: Thierry on Fri Oct 25 11:01:11 2019
I have nothing against improving my baby cards tool, but I suggest you to (re)read the man of cards.conf first:

Code: [Select]
man cards.conf
Then we can discuss again
Title: Re: [suggestion] add a type of dir field to the dir lines of cards.conf
Post by: dufresnep on Fri Oct 25 17:46:13 2019
Oh, yeah...

So mistake #1: the format is: key value
so that adding a field between the key and the value is not fine

Mistake #2: there is already a proposed key for port directory: prtdir ... hum I thought it was portdir, I prefer portdir, so I will keep portdir

Mistake #3: order is important, personal directory should come first to be used first, before the others

Mistake #4: it is not depot it's repo It is really depot in 11.2.

So the first suggestion should look more like:

What should probably be a current /etc/cards.conf file (although not working for now):
Code: [Select]
url http://download.nutyx.org

dir /var/lib/pkg/depot/desktops
#keep gui-extra before gui, in case a package with same name, but more functionality than in gui, is in gui-extra
dir /var/lib/pkg/depot/gui-extra
dir /var/lib/pkg/depot/gui
dir /var/lib/pkg/depot/cli-extra
dir /var/lib/pkg/depot/cli
dir /var/lib/pkg/depot/base

#keep personal first, because if you have same port also in other collections, you want yours to be used
portdir /usr/ports/personal
portdir /usr/ports/desktops
portdir /usr/ports/gui-extra
portdir /usr/ports/gui
portdir /usr/ports/cli-extra
portdir /usr/ports/cli
portdir /usr/ports/base

logdir /var/log/pkgbuild

group man
group devel
Title: Re: [suggestion] add a type of dir field to the dir lines of cards.conf
Post by: Thierry on Sat Oct 26 07:59:01 2019
 >:( >:( >:(  It's still wrong in the man. I will need to double check that.

So forget about prtdir. The only way needed for cards to know if it's a binary collection or a ports collection is by checking if they is an "url attached" to it or not. You mixt both but then you need to build via scenario E or via the build-collection tool
Title: [FIX]Re: [suggestion] add a type of dir field to the dir lines of cards.conf
Post by: Thierry on Fri Nov 01 07:10:53 2019
Man Fixed