1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
use {thiserror::Error, tugger_file_manifest::FileManifestError};
#[derive(Debug, Error)]
pub enum DebianError {
#[error("file manifest error: {0}")]
FileManifestError(#[from] FileManifestError),
#[cfg(feature = "http")]
#[error("URL error: {0:?}")]
Url(#[from] url::ParseError),
#[error("hex parsing error: {0:?}")]
Hex(#[from] hex::FromHexError),
#[error("PGP error: {0:?}")]
Pgp(#[from] pgp::errors::Error),
#[error("date parsing error: {0:?}")]
DateParse(#[from] mailparse::MailParseError),
#[cfg(feature = "http")]
#[error("HTTP error: {0:?}")]
Reqwest(#[from] reqwest::Error),
#[error("I/O error: {0:?}")]
Io(#[from] std::io::Error),
#[error("integer parsing error: {0:?}")]
ParseInt(#[from] std::num::ParseIntError),
#[error("control file parse error: {0}")]
ControlParseError(String),
#[error("Control file lacks a paragraph")]
ControlFileNoParagraph,
#[error("Control file not found")]
ControlFileNotFound,
#[error("cannot convert to simple field value since value contains line breaks")]
ControlSimpleValueNoMultiline,
#[error("required control paragraph field not found: {0}")]
ControlRequiredFieldMissing(String),
#[error("control field {0} can not be parsed as an integer: {0:?}")]
ControlFieldIntParse(String, std::num::ParseIntError),
#[error("unknown entry in binary package archive: {0}")]
DebUnknownBinaryPackageEntry(String),
#[error("unknown compression in deb archive file: {0}")]
DebUnknownCompression(String),
#[error("release file does not contain supported checksum flavor")]
RepositoryReadReleaseNoKnownChecksum,
#[error("could not find Contents indices entry in Release file")]
RepositoryReadContentsIndicesEntryNotFound,
#[error("could not find packages indices entry in Release file")]
RepositoryReadPackagesIndicesEntryNotFound,
#[error("could not determine content digest of binary package")]
RepositoryReadCouldNotDeterminePackageDigest,
#[error("No packages indices for checksum {0}")]
RepositoryNoPackagesIndices(&'static str),
#[error("repository I/O error on path {0}: {1:?}")]
RepositoryIoPath(String, std::io::Error),
#[error("attempting to add package to undefined component: {0}")]
RepositoryBuildUnknownComponent(String),
#[error("attempting to add package to undefined architecture: {0}")]
RepositoryBuildUnknownArchitecture(String),
#[error("pool layout cannot be changed after content is indexed")]
RepositoryBuildPoolLayoutImmutable,
#[error(".deb not available: {0}")]
RepositoryBuildDebNotAvailable(&'static str),
#[error("expected 1 paragraph in control file; got {0}")]
ReleaseControlParagraphMismatch(usize),
#[error("digest missing from index entry")]
ReleaseMissingDigest,
#[error("size missing from index entry")]
ReleaseMissingSize,
#[error("path missing from index entry")]
ReleaseMissingPath,
#[error("index entry path unexpectedly has spaces: {0}")]
ReleasePathWithSpaces(String),
#[error("No PGP signatures found")]
ReleaseNoSignatures,
#[error("No PGP signatures found from the specified key")]
ReleaseNoSignaturesByKey,
#[error("failed to parse dependency expression: {0}")]
DependencyParse(String),
#[error("unknown binary dependency field: {0}")]
UnknownBinaryDependencyField(String),
#[error("the epoch component has non-digit characters: {0}")]
EpochNonNumeric(String),
#[error("upstream_version component has illegal character: {0}")]
UpstreamVersionIllegalChar(String),
#[error("debian_revision component has illegal character: {0}")]
DebianRevisionIllegalChar(String),
#[error("{0}")]
Other(String),
}
pub type Result<T> = std::result::Result<T, DebianError>;