Hi, On Tue, 03 Jan 2012, Gianluca Ciccarelli wrote: > >Good idea, what would be even better is to write immediately a > >(non-regression) test-case to ensure that the code you wrote work as > >expected and keeps doing it in the future. > > I'm trying to prepare the test case for my modifications to > dpkg-maintscript-helper, but if I invoke the script with its name in the > test's maintainer scripts, of course it invokes my system's version, > which doesn't integrate the changes, and so the operation I want to test > is not supported (that is, dpkg-maintscript-helper supports <my-op> > returns with error). > > I thought to make a local "hack" by invoking the modified script in the > source code. Is there a smarter way to do it?
You can modify the PATH (environment variable) to point first to the directory with the modified script. But I usually just install the modified version in the official place (either manually or with a test package). sudo cp scripts/dpkg-maintscript-helper.sh /usr/bin/dpkg-maintscript-helper Cheers, -- Raphaël Hertzog ◈ Debian Developer Pre-order a copy of the Debian Administrator's Handbook and help liberate it: http://debian-handbook.info/liberation/ -- To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120103195450.ge29...@rivendell.home.ouaza.com