zopencommunity / meta

Meta repository to tie together the various underlying zopen repositories
https://zopen.community
Apache License 2.0
40 stars 30 forks source link

zopen-config --knv and --eknv enhancement #869

Open lbdyck opened 1 month ago

lbdyck commented 1 month ago

Two suggestions here

  1. create a zopen --knv and zopen --eknv options to better expose these options
  2. check the export path to remove any duplicate paths before adding and then make it generic by not appending the full existing path but instead use the environment variable thus: export PATH=/xx/zopen/usr/local/bin:$PATH
IgorTodorovskiIBM commented 1 month ago

Agree that it's not obvious that you need to add an option to the zopen-config. We may need to introduce a zopen env (or similar) subcommand. Perhaps also one to regenerate the zopen-config file it case it gets corrupted.

lbdyck commented 1 month ago

Try running it after the zopen-config has been run and you will find that it prepends the zopen variables to the existing variables which already contain said values. Thus the need to clean it up of duplicates (or potentially obsolete) values.

IgorTodorovskiIBM commented 1 month ago

Try running it after the zopen-config has been run and you will find that it prepends the zopen variables to the existing variables which already contain said values. Thus the need to clean it up of duplicates (or potentially obsolete) values.

Yeah, I'm seeing a few bugs (paths duplicated):

export ACLOCAL_PATH=/home/itodoro/zopen/usr/local/zopen/pkgconfig/pkgconfig/share/aclocal:/home/itodoro/zopen/usr/local/zopen/libtool/libtool/share/aclocal:/home/itodoro/zopen/usr/local/zopen/pkgconfig/pkgconfig/share/aclocal:/home/itodoro/zopen/usr/local/zopen/libtool/libtool/share/aclocal:/home/itodoro/zopen/usr/local/zopen/pkgconfig/pkgconfig/share/aclocal:/home/itodoro/zopen/usr/local/zopen/libtool/libtool/share/aclocal:/home/itodoro/zopen/usr/local/zopen/pkgconfig/pkgconfig/share/aclocal:/home/itodoro/zopen/usr/local/zopen/libtool/libtool/share/aclocal

Also, -eknv still exports the environment variable in the current session, so the second time you run, the output is much smaller.

lbdyck commented 1 month ago

I did a swag using rexx and it removes all zopen paths from existing env variables and then creates (export) new variables with the zopen path followed by the $xxx variable to catch everything else. It works but it is in rexx so wouldn't fit into the zopen-config code.