Finally the new version is ready for testing... The script has been improved by a complete rewrite of the subroutines for updating and lot's of minor changes in the other subroutines. I have attached the new ebuild, which also contains minor changes. Maybe you can move version 1.7.2 to stable and this one in testing. Thanks, and best wishes for the new year! Stephan van Boven몔
Created attachment 75955 [details] cfg-update-1.8.0.ebuild The new update for version 1.8.0 Happy New Year !
Hi, I see this version automatically modifies /root again, while the previous version set the alias in /etc/profile. Sorry to ask again, but could you please make it not do that? Alternatively, if you prefer, I could modify the ebuild to not automatically set the alias, and have it print instructions on how to enable it. Thanks, and happy New Year to you too.
Sorry, didn't think about that. The previous ebuild added the alias to /etc/profile, this one removes the old alias and now put's it in /root/.bash_profile You can take that out of the ebuild and put a ewarn message in it's place. I'll update the installation instructions in the forums to include this. Thanks for notifying me.
The ebuild is missing: insinto /etc doins cfg-update.conf
Some issues I ran into: - the cfg-update commands that are run after installation show error messages if PORT_LOGDIR is not set. Can this safely be ignored if it'll be set later? If so, I'll change the ebuild to hide all output. - cfg-update --on doesn't work (tells the user to run --fix) if /root/.bash_profile doesn't exist, but does work if it exists as an empty file, even if the other files --fix would create don't exist. Is that intentional? - on the first run, "Building checksum index... [...] (takes a few seconds)" takes a few minutes in UTF-8 locales; it'd be great if you could run cat/grep/awk with LC_ALL=C - Any objections if I change the default diff from xxdiff to sdiff in the configuration file? That one's sure to be installed, xxdiff isn't. For the rest, nice work, I don't see any serious problems -- at least, not right now :) -- so it looks okay for me to add, thanks.
Please wait with adding 1.8.0 to portage! I need to change some small things in the cfg-update script. 1. it has a cosmetic flaw during indexing. (simple to fix) 2. if stage3 is not enabled or skipped because the tool doesn't support 3-way merging, the files in the stage3 queue are not moved to the stage4 queue. This means that those files never get picked up by the script. 3. the UTF-8 locales issue. 4. add a message with instructions in case xxdiff is not found. > - cfg-update --on doesn't work (tells the > user to run --fix) if /root/.bash_profile > doesn't exist, but does work if it exists > as an empty file, even if the other files > --fix would create don't exist. Is that > intentional? Yes, I just check if .bash_profile exists, and force the user to run --fix to get a properly set up root account which can start tools from the commandline when su'ed to root. > - on the first run, "Building checksum > index... [...] (takes a few seconds)" > takes a few minutes in UTF-8 locales; > it'd be great if you could run cat/grep/awk > with LC_ALL=C I don't understand this UTF-8 locales thing. Do I simply need to put system("set LC_ALL=C"); in the script before running the cat command? > - Any objections if I change the default > diff from xxdiff to sdiff in the config > file? That one's sure to be installed, > xxdiff isn't. Hmm... I can improve the textmessage when xxdiff is not found. But I want to keep it as the default tool though! I'll add a similar textmessage like the one cfg-update gives when being started from a virtual terminal (no GUI available). If xxdiff doesn't exist users will be instructed to change the tool to sdiff or another tool in /etc/cfg-update.conf OK!? Do you want me to submit a fixed 1.8.0 or a new 1.8.0-r1 tarball and ebuild if I have fixed the above stuff?
> Please wait with adding 1.8.0 to portage! > I need to change some small things in the cfg-update script. Alright. > Yes, I just check if .bash_profile exists, and force the user to run --fix to > get a properly set up root account which can start tools from the commandline > when su'ed to root. Okay. > I don't understand this UTF-8 locales thing. Do I simply need to put > system("set LC_ALL=C"); in the script before running the cat command? There are several ways to do it, but one is to add local $ENV{LC_ALL}='C'; to set LC_ALL for all executed programs in current scope. (You could set it globally, but you shouldn't, because the user's locale should not be ignored by the *diff utilities.) To clarify: perl -e 'system "locale"; { local $ENV{LC_ALL}="C"; system "locale" } system "locale"' will only override LC_ALL for the middle call, but would for the last two if "local" wasn't there. > Hmm... I can improve the textmessage when xxdiff is not found. But I want to > keep it as the default tool though! I'll add a similar textmessage like the one > cfg-update gives when being started from a virtual terminal (no GUI available). > If xxdiff doesn't exist users will be instructed to change the tool to sdiff or > another tool in /etc/cfg-update.conf > OK!? That's fine with me. > Do you want me to submit a fixed 1.8.0 or a new 1.8.0-r1 tarball and ebuild if > I have fixed the above stuff? If it's only a few changes, you can just attach a patch here if you want, and I'll make the ebuild use your original 1.8.0 plus that patch. If you want a new tarball, that's okay too, but it'd be best if you use a new filename for that. Also, do you want the revised version to be available in portage as 1.8.0, or as 1.8.0-r1 so that users who installed it already via an overlay will be told to upgrade?
Created attachment 76109 [details] cfg-update-1.8.0-r1.ebuild updated the ebuild so it installs /etc/cfg-update.conf
1. cosmetic bug during indexing is fixed. 2. if stage3 is disabled or tool doesn't support 3-way merges files in stage3 queue are now pushed to stage4 queue. 3. added local $ENV{LC_ALL}="C"; infront of all cat/grep/awk commands and checked if tools use the global locales, tested and OK. 4. added text message with instructions when xxdiff (default tool) is not found. 5. added text message with instructions if PORT_LOGDIR not specified/found. 6. removed the forced exit if PORT_LOGDIR not specified/found. 7. found and fixed issue when portage logging is not enabled, writes "portage log not found" to top of checksum-index. 8. found and fixed issue if PORT_LOGDIR is commented out in /etc/make.conf it now respects that. 9. fixed (undocumented) diff_two_files and diff_three_files subroutines, they didn't call lauch_tool correctly. 10. renamed the 2nd submitted ebuild to: cfg-update-1.8.0-r1 11. created and uploaded a new tarball: cfg-update-1.8.0-r1.tar.gz I have never uploaded an -r1 version because I couldn't get that to work last year... Harold, please check if that works with the following line in the ebuild: SRC_URI="http://people.zeelandnet.nl/xentric/${P}.tar.gz"
Thanks, a slightly modified 1.8.0-r1 ebuild is in the tree.