Source

vpackager / src / vpackager / bot.py

Diff from to

src/vpackager/bot.py

             return shutil.copy2(srcuri, workdir)
         return
 
+    def process_doinst(self, doinstURI, workdir):
+        if doinstURI in ("", None):
+            return
+        if doinstURI.startswith('/'):
+            return shutil.copy2(doinstURI,
+                                os.path.join(workdir, 'doinst.sh'))
+        else:
+            self.print_to_log(
+                "\n +++ Downloading post-install script %s\n"% doinstURI)
+            os.chdir(workdir)
+            return urllib.urlretrieve(doinstURI, 'doinst.sh')
+
     def process_description(self, descuri, workdir):
         """ Copy or download the package description to the right place"""
         if not descuri:
             self.process_source(job_info['srcURI'], workdir)
             # Process the package description
             self.process_description(job_info['descURI'], workdir)
+            # Process the specified post-install script
+            self.process_doinst(job_info['doinstURI'], workdir)
             # Process any patches added to the build
             self.process_patches(job_info['patches'], workdir)
             # cd back to the original workdir (just in case)