Package: rinse Version: 1.7-1 Severity: wishlist Dear Colleagues,
please find attached a patch for rinse 1.7 which adds two new commandline arguments. --before-post-install-command --after-post-install-command Those commands were a wish of Michael Goetze. What are they doing: --before-post-install and --after-post-install are taking as value an executable script which runs before and after the chroot of an RPM based distro is created. To make some things more "scriptable" Michael wanted to have a possibility to just pass a script to rinse. With these two new commands this is possible now. I'm sending this patch without a debdiff, so you can include it in your upstream repository. this patch is against rinse 1.7 and runs at my place without any problems. Kind regards, \sh -- Stephan '\sh' Adig SysAdmin / Ubuntu Developer xmpp: s...@sourcecode.de
--- rinse 2009-04-21 18:38:40.000000000 +0000 +++ ../../../rinse-1.7/bin/rinse 2011-02-08 14:58:28.668421878 +0000 @@ -23,14 +23,18 @@ Customization Options: - --add-pkg-list Additional packages to download and install + --add-pkg-list Additional packages to download and install - --after-post-install Additionally run the specified script after - the post install script. - --before-post-install Additionally run the specified script before - the post install script. - --post-install Run the given post-install script instead of the - default files in /usr/lib/rinse/$distro + --after-post-install Additionally run the specified script after + the post install script. + --after-post-install-command Additionally run the specified command after + the post install script. + --before-post-install Additionally run the specified script before + the post install script. + --before-post-install-command Additionally run the specified command before + the post install script. + --post-install Run the given post-install script instead of the + default files in /usr/lib/rinse/$distro Misc Options: @@ -410,7 +414,9 @@ "print-uris", \$CONFIG{ 'print-uris' }, "post-install=s", \$CONFIG{ 'post-install' }, "before-post-install=s", \$CONFIG{ 'before-post-install' }, + "before-post-install-command=s", \$CONFIG{ 'before-post-install-command' }, "after-post-install=s", \$CONFIG{ 'after-post-install' }, + "after-post-install-command=s", \$CONFIG{ 'after-post-install-command' }, "add-pkg-list=s", \$CONFIG{ 'add-pkg-list' }, # Help options @@ -430,6 +436,18 @@ print("rinse release $RELEASE\n"); exit; } + + if ( defined $CONFIG{ 'before-post-install' } && defined $CONFIG{ 'before-post-install-command' } ) + { + print("--before-post-install and --before-post-install-command can't be defined together.\n"); + exit; + } + + if ( defined $CONFIG{ 'after-post-install' } && defined $CONFIG{ 'after-post-install-command' } ) + { + print("--after-post-install and --after-post-install-command can't be defined together.\n"); + exit; + } } @@ -1187,6 +1205,11 @@ system( $CONFIG{ 'before-post-install' }, $prefix ); } + if (defined $CONFIG{ 'before-post-install-command' } ) + { + print "Running custom commandline: $CONFIG{'before-post-install-command'}\n"; + system( $CONFIG{ 'before-post-install-command' } ); + } # # Did we get a custom file to execute? @@ -1236,6 +1259,12 @@ system( $CONFIG{ 'after-post-install' }, $prefix ); } + if ( defined $CONFIG{ 'after-post-install-command' } ) + { + print "Running custom command: $CONFIG{'after-post-install-command'}\n"; + system( $CONFIG{ 'after-post-install-command' } ); + } + }
signature.asc
Description: This is a digitally signed message part