* (operations/build.py): Check and fail if necessary for abandoned files before creating the

*.pisi packages.
This commit is contained in:
Ozan Çağlayan
2009-08-04 13:43:33 +00:00
parent d34d845431
commit 5b79b0a9a8
2 changed files with 15 additions and 11 deletions
+3 -1
View File
@@ -1,6 +1,8 @@
2009-08-04 Ozan Çağlayan <ozan@pardus.org.tr> 2009-08-04 Ozan Çağlayan <ozan@pardus.org.tr>
* (operations/build.py): Really fix the abandoned file checking when * (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ı <fatih@pardus.org.tr> 2009-08-03 Fatih Aşıcı <fatih@pardus.org.tr>
* Make it possible to specify doc directory's name via destDir * Make it possible to specify doc directory's name via destDir
+12 -10
View File
@@ -920,6 +920,16 @@ class Builder:
ctx.ui.info(_("Generating %s,") % ctx.const.metadata_xml) ctx.ui.info(_("Generating %s,") % ctx.const.metadata_xml)
self.gen_metadata_xml(package) 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 # build number
if ctx.config.options.ignore_build_no or not ctx.config.values.build.buildno: if ctx.config.options.ignore_build_no or not ctx.config.values.build.buildno:
build_no = old_build_no = None build_no = old_build_no = None
@@ -995,14 +1005,9 @@ class Builder:
self.set_state("buildpackages") self.set_state("buildpackages")
ctx.ui.info(_("Done.")) 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 ctx.get_option('debug'):
if abandoned_files: if not 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:
ctx.ui.info(_('All of the files under the install dir (%s) has been collected by package(s)') ctx.ui.info(_('All of the files under the install dir (%s) has been collected by package(s)')
% (install_dir)) % (install_dir))
@@ -1020,9 +1025,6 @@ class Builder:
os.environ.clear() os.environ.clear()
os.environ.update(ctx.config.environ) os.environ.update(ctx.config.environ)
if abandoned_files:
raise AbandonedFilesException
return self.new_packages, self.old_packages return self.new_packages, self.old_packages