diff --git a/ChangeLog b/ChangeLog index 6c238121..d46d4bf2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2009-08-04 Ozan Çağlayan * (operations/build.py): Really fix the abandoned file checking when - the path in pspec.xml and the actual path of a missed file intersects. + the path in pspec.xml and the actual path of a missed file intersects, + * (operations/build.py): Check and fail if necessary for abandoned files before creating the + *.pisi packages. 2009-08-03 Fatih Aşıcı * Make it possible to specify doc directory's name via destDir diff --git a/pisi/operations/build.py b/pisi/operations/build.py index 9ce8f3ca..adf9bedb 100644 --- a/pisi/operations/build.py +++ b/pisi/operations/build.py @@ -920,6 +920,16 @@ class Builder: ctx.ui.info(_("Generating %s,") % ctx.const.metadata_xml) self.gen_metadata_xml(package) + abandoned_files = self.get_abandoned_files() + if ctx.get_option('debug'): + if abandoned_files: + # Fail + ctx.ui.error(_('There are abandoned files under the install dir (%s):') % (install_dir)) + for f in abandoned_files: + ctx.ui.info(' - %s' % (f)) + + raise AbandonedFilesException + # build number if ctx.config.options.ignore_build_no or not ctx.config.values.build.buildno: build_no = old_build_no = None @@ -995,14 +1005,9 @@ class Builder: self.set_state("buildpackages") ctx.ui.info(_("Done.")) - abandoned_files = self.get_abandoned_files() - #show the files those are not collected from the install dir + # Show the files those are not collected from the install dir if ctx.get_option('debug'): - if abandoned_files: - ctx.ui.error(_('There are abandoned files under the install dir (%s):') % (install_dir)) - for f in abandoned_files: - ctx.ui.info(' - %s' % (f)) - else: + if not abandoned_files: ctx.ui.info(_('All of the files under the install dir (%s) has been collected by package(s)') % (install_dir)) @@ -1020,9 +1025,6 @@ class Builder: os.environ.clear() os.environ.update(ctx.config.environ) - if abandoned_files: - raise AbandonedFilesException - return self.new_packages, self.old_packages