Author Topic: [suggestion] add a type of dir field to the dir lines of cards.conf  (Read 4659 times)

dufresnep

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
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
« Last Edit: Fri Oct 25 06:57:12 2019 by dufresnep »

dufresnep

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
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
« Last Edit: Fri Oct 25 06:56:30 2019 by dufresnep »

Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 706
  • Karma: +13/-0
  • Gender: Male
    • NuTyX distribution
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
« Last Edit: Fri Oct 25 11:02:50 2019 by Thierry »

dufresnep

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
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
« Last Edit: Fri Oct 25 19:19:18 2019 by dufresnep »

Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 706
  • Karma: +13/-0
  • Gender: Male
    • NuTyX distribution
 >:( >:( >:(  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

Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 706
  • Karma: +13/-0
  • Gender: Male
    • NuTyX distribution
Man Fixed