0 | |
This patch reverts the changes for cargo 0.49 and allows building with the
|
1 | |
rust-cargo 0.43 package that is in Debian, it should be removed when cargo
|
2 | |
0.49 is packaged.
|
3 | |
|
4 | |
Index: debcargo/src/crates.rs
|
5 | |
===================================================================
|
6 | |
--- debcargo.orig/src/crates.rs
|
7 | |
+++ debcargo/src/crates.rs
|
8 | |
@@ -3,6 +3,7 @@ use cargo::{
|
9 | |
core::manifest::ManifestMetadata,
|
10 | |
core::registry::PackageRegistry,
|
11 | |
core::source::MaybePackage,
|
12 | |
+ core::InternedString,
|
13 | |
core::{
|
14 | |
Dependency, EitherManifest, FeatureValue, Manifest, Package, PackageId, Registry, Source,
|
15 | |
SourceId, Summary, Target, TargetKind, Workspace,
|
16 | |
@@ -10,7 +11,7 @@ use cargo::{
|
17 | |
ops,
|
18 | |
ops::PackageOpts,
|
19 | |
sources::registry::RegistrySource,
|
20 | |
- util::{interning::InternedString, toml::read_manifest, FileLock},
|
21 | |
+ util::{toml::read_manifest, FileLock},
|
22 | |
Config,
|
23 | |
};
|
24 | |
use filetime::{set_file_times, FileTime};
|
25 | |
@@ -115,7 +116,7 @@ impl CrateInfo {
|
26 | |
all_features: true,
|
27 | |
no_default_features: false,
|
28 | |
jobs: None,
|
29 | |
- targets: Vec::new(),
|
30 | |
+ target: None,
|
31 | |
features: Vec::new(),
|
32 | |
};
|
33 | |
|
34 | |
@@ -565,10 +566,9 @@ impl CrateInfo {
|
35 | |
|
36 | |
// Ensure that Cargo.toml is in standard form, e.g. does not contain
|
37 | |
// path dependencies, so can be built standalone (see #4030).
|
38 | |
- let toml_path = path.join("Cargo.toml");
|
39 | |
- let ws = Workspace::new(&toml_path.canonicalize()?, &self.config)?;
|
40 | |
- let registry_toml = self.package().to_registry_toml(&ws)?;
|
41 | |
+ let registry_toml = self.package().to_registry_toml(&self.config)?;
|
42 | |
let mut actual_toml = String::new();
|
43 | |
+ let toml_path = path.join("Cargo.toml");
|
44 | |
fs::File::open(&toml_path)?.read_to_string(&mut actual_toml)?;
|
45 | |
|
46 | |
if !actual_toml.contains("AUTOMATICALLY GENERATED BY CARGO") {
|
47 | |
Index: debcargo/Cargo.toml
|
48 | |
===================================================================
|
49 | |
--- debcargo.orig/Cargo.toml
|
50 | |
+++ debcargo/Cargo.toml
|
51 | |
@@ -25,7 +25,7 @@ version = "0.12"
|
52 | |
version = "1.0"
|
53 | |
|
54 | |
[dependencies.cargo]
|
55 | |
-version = "0.49"
|
56 | |
+version = "0.43"
|
57 | |
|
58 | |
[dependencies.chrono]
|
59 | |
version = "0.4"
|