Re: develop_begin_command - can't change directory
Cal Webster <[email protected]>
| Newsgroups | gmane.comp.version-control.aegis.user |
|---|---|
| Message-ID | <1337023799.28237.28.camel@kc130ssa> |
Hi Jerry, Thanks for your comments but I'm not sure our definition of normal is the same. Maybe you are assuming as I did that the project source is already in the development dir when "begin_develop_command" is run. Are you saying that there should be no project files at all in a new change? As my last "aeb" illustrated, the only file listed when "begin_develop_command" was run was aegis.log. Not even the aegis.conf file was listed. It was not until after the shell prompt returned that I could list any project files. Then, of course, the hostcomp/ directory was there. Our development directories are setup to present symlinks for all source files in the development dir. It's also configured to put copies of derived files in the development directory only at the beginning. When a developer complained about expected objects not being built after modifying a dependent header file I found the auto-generated .d files contained paths to the last integrations (delta) directory. Thus the need to clear and regenerate them. Because the the nature of auto-generated dependency files using GCC, a separate pass must be made to initially generate the .d files. Once they are in place any modification to any source file will trigger regeneration of associated .d file, rebuilding the dependent objects, and re-linking them to dependent executables and libraries. I do not want that separate step (make dep) to rely on the developer. All the developer should need to do is modify his source and type "make". On Mon, 2012-05-14 at 18:54 +0000, Pendergraft, Jerry wrote: > These errors all seem to indicate the "hostcomp" directory is not > present, which in a normal new aegis change it would have no reason to > be. Recall that aegis changes are "sparse" and that no files or > directories exist unless/until you aecp or aenf something. > If there is a controlled file in your project you could define the > begin_development command to include: > aegis -cp hostcomp/some_file ; .... > > Even if you have your project set up to make your change fully > populated, I am guessing that does not take place until after the > develop_begin_command has been run. > > But one might wonder why you want to clean the .d file as you are > doing, why not simply have your makefile that generates them "force" > rebuilding even if they are present? > > ________________________________________ > From: [email protected] > [[email protected]] on behalf > of Cal Webster [[email protected]] > Sent: Friday, May 11, 2012 4:37 PM > To: Aegis Mailing List > Cc: Travis Clark > Subject: [Aegis] develop_begin_command - can't change directory > > ## Aegis Version: > rpm -q > ------ > aegis-4.24.4-rc1.i686 > ------ > > ## Host OS: > > uname -r > ----------------------- > 2.6.32-220.7.1.el6.i686 > ----------------------- > > cat /etc/redhat-release > ----------------------- > CentOS release 6.2 (Final) > ----------------------- > > ## Synopsis: The "develop_begin_command" function throws an error when > attempting to change the working directory. This appears to be a bug > in > Aegis. > > ## Problem Description: Regardless of how I construct or call the > commands, "cd" can't find any directories. By comparison, the > "build_command" function has no problems with this. According to the > description in aepconf (5) this should work. > > Excerpt from aepconf man page: > ------------------------------ > develop_begin_command = string; > This field contains a command to be executed whenever a 'aegis > -Develop_Begin' command is successful. If this field is > absent, nothing is done. Used by the aedb(1) command. All of > the substitutions described by aesub(5) are available. > > Executed as: the developer. Current directory: the development > directory of the change. Exit status: ignored. > ------------------------------ > > I need to remove all *.d (auto-dependency) derived files and rebuild > them as soon as development begins. Our projects are managed by > segregating subsystems in subdirectories of the main project so we > have > to change directory to do anything. The derived auto-dependency files > contain paths to the integration directory so they poison the > dependency > mappings. I've changed our Makefiles so the *.d files are removed at > the > end of aeb but they still need to be re-generated at aedb. > > ## Results: > > Variations I've tried: > > ==================================================== > develop_begin_command = "cd hostcomp/ ; rm *.d ; make dep"; > ==================================================== > aedb -p av8b94.17 -c 3 > ----------------------- > aegis: project "av8b94.17": change 3: development directory > "/home/cwebster/aegis/av8b94.17.C003" > aegis: logging to "/home/cwebster/aegis/av8b94.17.C003/aegis.log" > aegis: cd /home/cwebster/aegis/av8b94.17.C003 > aegis: cd hostcomp/ ; rm *.d ; make dep > /bin/sh: line 0: cd: hostcomp/: No such file or directory > aegis: warning: command "cd hostcomp/ ; rm *.d ; make dep" exit status > 1 > aegis: project "av8b94.17": change 3: merging files from all baselines > into > working directory according to directory style > aegis: project "av8b94.17": change 3: user "cwebster" has begun > development > ==================================================== > develop_begin_command = "pwd ; cd ${Change > development_directory}/hostcomp ; rm *.d ; make dep"; > ==================================================== > aedb -p av8b94.17 -c 4 > ----------------------- > aegis: project "av8b94.17": change 4: development directory > "/home/cwebster/aegis/av8b94.17.C004" > aegis: logging to "/home/cwebster/aegis/av8b94.17.C004/aegis.log" > aegis: cd /home/cwebster/aegis/av8b94.17.C004 > aegis: pwd ; cd /home/cwebster/aegis/av8b94.17.C004/hostcomp ; rm > *.d ; > make > dep > /home/cwebster/aegis/av8b94.17.C004 > /bin/sh: line 0: cd: /home/cwebster/aegis/av8b94.17.C004/hostcomp: No > such file or directory > aegis: warning: command "pwd ; > cd /home/cwebster/aegis/av8b94.17.C004/hostcomp > ; rm *.d ; make dep" exit status 1 > aegis: project "av8b94.17": change 4: merging files from all baselines > into > working directory according to directory style > aegis: project "av8b94.17": change 4: user "cwebster" has begun > development > ----------------------- > ==================================================== > develop_begin_command = "/usr/local/bin/fixdeps.sh"; > ==================================================== > aedb -p av8b94.17 -c 5 > ----------------------- > aegis: project "av8b94.17": change 5: development directory > "/home/cwebster/aegis/av8b94.17.C005" > aegis: logging to "/home/cwebster/aegis/av8b94.17.C005/aegis.log" > aegis: cd /home/cwebster/aegis/av8b94.17.C005 > aegis: /usr/local/bin/fixdeps.sh > /usr/local/bin/fixdeps.sh: line 2: cd: hostcomp: No such file or > directory > rm: cannot remove `*.d': No such file or directory > make: *** No rule to make target `dep'. Stop. > aegis: warning: command "/usr/local/bin/fixdeps.sh" exit status 2 > aegis: project "av8b94.17": change 5: merging files from all baselines > into > working directory according to directory style > aegis: project "av8b94.17": change 5: user "cwebster" has begun > development > ----------------------- > ==================================================== > > In the last attempt I created a shell script to use instead of bare > commands. > > /usr/local/bin/fixdeps.sh > ------------------------- > #!/bin/sh > cd hostcomp > rm *.d > make dep > ------------------------- > > > ## Both of these aegis.conf entries start the same way. One works but > the other doesn't. > > build_command = "cd hostcomp/ ; STATE=${state} make dep ; STATE= > ${state} > make aegis_build"; > develop_begin_command = "cd hostcomp/ ; rm *.d ; make dep"; > > Thank you! > > Cal Webster > > _______________________________________________ > Aegis-users mailing list > [email protected] > http://lists.auug.org.au/listinfo/aegis-users > > This communication, including any attachments, may contain information > that is proprietary, privileged, confidential or legally exempt from > disclosure. If you are not a named addressee, you are hereby notified > that you are not authorized to read, print, retain a copy of or > disseminate any portion of this communication without the consent of > the sender and that doing so may be unlawful. If you have received > this communication in error, please immediately notify the sender via > return e-mail and delete it from your system. > _______________________________________________ > Aegis-users mailing list > [email protected] > http://lists.auug.org.au/listinfo/aegis-users