[Pkg-bazaar-commits] ./bzr-builddeb/trunk r210: * Don't silently skip unkown types when extracting a tarball, error
James Westby
jw+debian at jameswestby.net
Thu May 15 13:29:37 UTC 2008
------------------------------------------------------------
revno: 210
committer: James Westby <jw+debian at jameswestby.net>
branch nick: trunk
timestamp: Fri 2008-01-25 18:15:53 +0000
message:
* Don't silently skip unkown types when extracting a tarball, error
instead.
modified:
debian/changelog
errors.py
import_dsc.py
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog 2008-01-25 17:27:29 +0000
+++ b/debian/changelog 2008-01-25 18:15:53 +0000
@@ -19,8 +19,10 @@
dsc to avoid errors on strange tarballs.
* Treat hardlinks in tarballs as a copy of the file. This at least
gets the data, and is representable in bzr.
+ * Don't silently skip unkown types when extracting a tarball, error
+ instead.
- -- James Westby <jw+debian at jameswestby.net> Fri, 25 Jan 2008 16:48:56 +0000
+ -- James Westby <jw+debian at jameswestby.net> Fri, 25 Jan 2008 18:14:55 +0000
bzr-builddeb (0.92) unstable; urgency=low
=== modified file 'errors.py'
--- a/errors.py 2007-10-29 18:00:52 +0000
+++ b/errors.py 2008-01-25 18:15:53 +0000
@@ -79,4 +79,10 @@
class OnlyImportSingleDsc(BzrError):
_fmt = """You are only allowed to import one version in incremental mode."""
+class UnknownType(BzrError):
+ _fmt = """Cannot extract "%(path)s" from archive as it is an unknown type."""
+
+ def __init__(self, path):
+ self.path = path
+
# vim: ts=2 sts=2 sw=2
=== modified file 'import_dsc.py'
--- a/import_dsc.py 2008-01-25 18:04:31 +0000
+++ b/import_dsc.py 2008-01-25 18:15:53 +0000
@@ -53,7 +53,7 @@
add_implied_parents,
)
-from errors import ImportError, OnlyImportSingleDsc
+from errors import ImportError, OnlyImportSingleDsc, UnknownType
from merge_upstream import make_upstream_tag, upstream_tag_to_version
# TODO: support explicit upstream branch.
@@ -167,9 +167,7 @@
elif member.issym():
tt.create_symlink(member.linkname, trans_id)
else:
- warning('skipping creation of "%s" as it is an unsupported type' \
- % relative_path)
- continue
+ raise UnknownType(relative_path)
if tt.tree_file_id(trans_id) is None:
if (file_ids_from is not None and
file_ids_from.has_filename(relative_path)):
More information about the Pkg-bazaar-commits
mailing list