Author: schoenfeld
Date: 2008-09-21 16:54:16 +0000 (Sun, 21 Sep 2008)
New Revision: 1637

Modified:
   trunk/debian/changelog
   trunk/scripts/mk-build-deps.pl
Log:
* Some changelog reformatting
* mk-build-deps:
  + Add an option --remove to specify that package files should be deleted
    after installing it.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-09-21 16:43:46 UTC (rev 1636)
+++ trunk/debian/changelog      2008-09-21 16:54:16 UTC (rev 1637)
@@ -6,10 +6,13 @@
     section to /etc/devscripts.conf instead.
 
   [ Patrick Schoenfeld ]
-  * mk-build-deps: Implement --install switch which installs a generated
-    package and its depends afterwards.
-  * mk-build-deps: Add an option --tool to specify which tool to use
-    when installing the packages (default: apt-get)
+  * mk-build-deps:
+    + Implement --install switch which installs a generated package and its
+      depends afterwards.
+    + Add an option --tool to specify which tool to use when installing the
+      packages (default: apt-get)
+    + Add an option --remove to specify that package files should be deleted
+      after installing it.
 
  -- Patrick Schoenfeld <[EMAIL PROTECTED]>  Sun, 21 Sep 2008 18:43:33 +0200
 

Modified: trunk/scripts/mk-build-deps.pl
===================================================================
--- trunk/scripts/mk-build-deps.pl      2008-09-21 16:43:46 UTC (rev 1636)
+++ trunk/scripts/mk-build-deps.pl      2008-09-21 16:54:16 UTC (rev 1637)
@@ -50,6 +50,11 @@
 When installing the generated package use the specified tool.
 (default: apt-get)
 
+=item B<-r>, B<--remove>
+
+Remove the package file after installing it. Ignored if used without
+the install switch.
+
 =item B<-h>, B<--help>
 
 Show a summary of options.
@@ -78,6 +83,7 @@
 
 my $progname = basename($0);
 my $opt_install;
+my $opt_remove;
 my ($opt_help, $opt_version);
 my $control;
 my $install_tool='apt-get';
@@ -87,6 +93,7 @@
 GetOptions("help|h" => \$opt_help,
            "version|v" => \$opt_version,
           "install|i" => \$opt_install,
+          "remove|r" => \$opt_remove,
           "tool|t=s" => \$install_tool,
            )
     or die "Usage: $progname <control file | package name> [...]\nRun 
$progname --help for more details\n";
@@ -171,6 +178,12 @@
 
     system 'dpkg', '--unpack', @deb_files;
     system $install_tool, '-f', 'install';
+
+    if ($opt_remove) {
+       foreach my $file (@deb_files) {
+           unlink $file;
+       }
+    }
 }
 
 sub help {



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to