Skip to content

Commit eea1292

Browse files
committed
feat: [#180665528] upgrade conan and use https://center.conan.io instead of conan.bintray.com
Due to conan.bintry.com being deprecated, needed to upgrade conan to be compatible with the new conan center and use center.conan.io instead. Also update some code logic and tests due to conan changes. Signed-off-by: Jason Smith <[email protected]>
1 parent 3f9fa83 commit eea1292

File tree

7 files changed

+38
-38
lines changed

7 files changed

+38
-38
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ RUN apt-get install -y python-dev && \
137137
--ignore-installed requests --ignore-installed chardet \
138138
--ignore-installed urllib3 \
139139
--upgrade setuptools && \
140-
pip install --no-cache-dir -Iv conan==1.11.2 && \
140+
pip install --no-cache-dir -Iv conan==1.43.0 && \
141141
conan config install https://github.com/conan-io/conanclientcert.git
142142

143143

features/features/package_managers/conan_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
specify 'are shown in reports for a project' do
99
LicenseFinder::TestingDSL::ConanProject.create
1010
conan_developer.run_license_finder
11-
expect(conan_developer).to be_seeing_line 'range-v3, 0.3.0, MIT'
11+
expect(conan_developer).to be_seeing_line 'range-v3, 0.10.0, MIT'
1212
end
1313
end

features/fixtures/conanfile.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[requires]
2-
range-v3/0.3.0@ericniebler/stable
2+
range-v3/0.10.0
33

44
[generators]
55
txt

lib/license_finder/package_managers/conan.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ def current_packages
1818

1919
deps = info_parser.parse(info_output)
2020
deps.map do |dep|
21-
name, version = dep['name'].split('@').first.split('/')
21+
name, version = dep['name'].split('/')
2222
url = dep['URL']
2323
license_file_path = Dir.glob("#{project_path}/licenses/#{name}/**/LICENSE*").first
24-
ConanPackage.new(name, version, File.open(license_file_path).read, url) unless name == 'PROJECT'
24+
ConanPackage.new(name, version, File.open(license_file_path).read, url) unless name == 'conanfile.txt'
2525
end.compact
2626
end
2727
end

spec/fixtures/config/conan.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROJECT
1+
conanfile.txt
22
ID: 4c3dfe99a9c2d5003148e0054b9bacf58ac69f66
33
BuildID: None
44
Requires:
@@ -8,42 +8,42 @@ PROJECT
88
OpenSSL/1.0.2l@conan/stable
99
ID: 0197c20e330042c026560da838f5b4c4bf094b8a
1010
BuildID: None
11-
Remote: conan-center=https://conan.bintray.com
11+
Remote: conan-center=https://center.conan.io
1212
URL: http://github.com/lasote/conan-openssl
1313
License: The current OpenSSL licence is an 'Apache style' license: https://www.openssl.org/source/license.html
1414
Updates: Version not checked
1515
Creation date: 2017-08-21 10:28:57
1616
Required by:
1717
Poco/1.7.9@pocoproject/stable
18-
PROJECT
18+
conanfile.txt
1919
Requires:
2020
zlib/1.2.11@conan/stable
2121
Poco/1.7.9@pocoproject/stable
2222
ID: 33fe7ea34efc04fb6d81fabd9e34f51da57f9e09
2323
BuildID: None
24-
Remote: conan-center=https://conan.bintray.com
24+
Remote: conan-center=https://center.conan.io
2525
URL: http://github.com/lasote/conan-poco
2626
License: The Boost Software License 1.0
2727
Updates: Version not checked
2828
Creation date: 2017-09-20 16:51:10
2929
Required by:
30-
PROJECT
30+
conanfile.txt
3131
Requires:
3232
OpenSSL/1.0.2l@conan/stable
3333
range-v3/0.3.0@ericniebler/stable
3434
ID: 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
3535
BuildID: None
36-
Remote: conan-center=https://conan.bintray.com
36+
Remote: conan-center=https://center.conan.io
3737
URL: https://github.com/ericniebler/range-v3
3838
License: Boost Software License - Version 1.0 - August 17th, 2003
3939
Updates: Version not checked
4040
Creation date: 2017-06-30 13:20:56
4141
Required by:
42-
PROJECT
42+
conanfile.txt
4343
zlib/1.2.11@conan/stable
4444
ID: 09512ff863f37e98ed748eadd9c6df3e4ea424a8
4545
BuildID: None
46-
Remote: conan-center=https://conan.bintray.com
46+
Remote: conan-center=https://center.conan.io
4747
URL: http://github.com/lasote/conan-zlib
4848
License: http://www.zlib.net/zlib_license.html
4949
Updates: Version not checked

spec/lib/license_finder/package_managers/conan_info_parser_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module LicenseFinder
88
let(:parsed_config) do
99
[
1010
{
11-
'name' => 'PROJECT',
11+
'name' => 'conanfile.txt',
1212
'ID' => '4c3dfe99a9c2d5003148e0054b9bacf58ac69f66',
1313
'BuildID' => 'None',
1414
'Requires' => ['Poco/1.7.9@pocoproject/stable', 'OpenSSL/1.0.2l@conan/stable', 'range-v3/0.3.0@ericniebler/stable']
@@ -17,42 +17,42 @@ module LicenseFinder
1717
'name' => 'OpenSSL/1.0.2l@conan/stable',
1818
'ID' => '0197c20e330042c026560da838f5b4c4bf094b8a',
1919
'BuildID' => 'None',
20-
'Remote' => 'conan-center=https://conan.bintray.com',
20+
'Remote' => 'conan-center=https://center.conan.io',
2121
'URL' => 'http://github.com/lasote/conan-openssl',
2222
'License' => 'The current OpenSSL licence is an \'Apache style\' license: https://www.openssl.org/source/license.html',
2323
'Updates' => 'Version not checked',
2424
'Creation date' => '2017-08-21 10:28:57',
25-
'Required by' => ['Poco/1.7.9@pocoproject/stable', 'PROJECT'],
25+
'Required by' => ['Poco/1.7.9@pocoproject/stable', 'conanfile.txt'],
2626
'Requires' => ['zlib/1.2.11@conan/stable']
2727
},
2828
{
2929
'name' => 'Poco/1.7.9@pocoproject/stable',
3030
'ID' => '33fe7ea34efc04fb6d81fabd9e34f51da57f9e09',
3131
'BuildID' => 'None',
32-
'Remote' => 'conan-center=https://conan.bintray.com',
32+
'Remote' => 'conan-center=https://center.conan.io',
3333
'URL' => 'http://github.com/lasote/conan-poco',
3434
'License' => 'The Boost Software License 1.0',
3535
'Updates' => 'Version not checked',
3636
'Creation date' => '2017-09-20 16:51:10',
37-
'Required by' => ['PROJECT'],
37+
'Required by' => ['conanfile.txt'],
3838
'Requires' => ['OpenSSL/1.0.2l@conan/stable']
3939
},
4040
{
4141
'name' => 'range-v3/0.3.0@ericniebler/stable',
4242
'ID' => '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9',
4343
'BuildID' => 'None',
44-
'Remote' => 'conan-center=https://conan.bintray.com',
44+
'Remote' => 'conan-center=https://center.conan.io',
4545
'URL' => 'https://github.com/ericniebler/range-v3',
4646
'License' => 'Boost Software License - Version 1.0 - August 17th, 2003',
4747
'Updates' => 'Version not checked',
4848
'Creation date' => '2017-06-30 13:20:56',
49-
'Required by' => ['PROJECT']
49+
'Required by' => ['conanfile.txt']
5050
},
5151
{
5252
'name' => 'zlib/1.2.11@conan/stable',
5353
'ID' => '09512ff863f37e98ed748eadd9c6df3e4ea424a8',
5454
'BuildID' => 'None',
55-
'Remote' => 'conan-center=https://conan.bintray.com',
55+
'Remote' => 'conan-center=https://center.conan.io',
5656
'URL' => 'http://github.com/lasote/conan-zlib',
5757
'License' => 'http://www.zlib.net/zlib_license.html',
5858
'Updates' => 'Version not checked',

spec/lib/license_finder/package_managers/conan_spec.rb

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module LicenseFinder
1111
describe '#current_packages' do
1212
let(:content) do
1313
'[requires]
14-
Poco/1.7.8p3@pocoproject/stable
14+
Poco/1.7.8p3
1515
1616
[generators]
1717
cmake
@@ -21,48 +21,48 @@ module LicenseFinder
2121
end
2222

2323
let(:conaninfo) do
24-
'PROJECT
24+
'conanfile.txt
2525
ID: 4c3dfe99a9c2d5003148e0054b9bacf58ac69f66
2626
BuildID: None
2727
Requires:
28-
Poco/1.7.9@pocoproject/stable
29-
OpenSSL/1.0.2l@conan/stable
30-
range-v3/0.3.0@ericniebler/stable
31-
OpenSSL/1.0.2l@conan/stable
28+
Poco/1.7.9
29+
OpenSSL/1.0.2l
30+
range-v3/0.3.0
31+
OpenSSL/1.0.2l
3232
ID: 0197c20e330042c026560da838f5b4c4bf094b8a
3333
BuildID: None
34-
Remote: conan-center=https://conan.bintray.com
34+
Remote: conan-center=https://center.conan.io
3535
URL: http://github.com/lasote/conan-openssl
3636
License: The current OpenSSL licence is an \'Apache style\' license: https://www.openssl.org/source/license.html
3737
Updates: Version not checked
3838
Creation date: 2017-08-21 10:28:57
3939
Required by:
40-
Poco/1.7.9@pocoproject/stable
41-
PROJECT
40+
Poco/1.7.9
41+
conanfile.txt
4242
Requires:
43-
zlib/1.2.11@conan/stable
44-
Poco/1.7.8p3@pocoproject/stable
43+
zlib/1.2.11
44+
Poco/1.7.8p3
4545
ID: 33fe7ea34efc04fb6d81fabd9e34f51da57f9e09
4646
BuildID: None
47-
Remote: conan-center=https://conan.bintray.com
47+
Remote: conan-center=https://center.conan.io
4848
URL: http://github.com/lasote/conan-poco
4949
License: The Boost Software License 1.0
5050
Updates: Version not checked
5151
Creation date: 2017-09-20 16:51:10
5252
Required by:
53-
PROJECT
53+
conanfile.txt
5454
Requires:
55-
OpenSSL/1.0.2l@conan/stable
56-
zlib/1.2.11@conan/stable
55+
OpenSSL/1.0.2l
56+
zlib/1.2.11
5757
ID: 09512ff863f37e98ed748eadd9c6df3e4ea424a8
5858
BuildID: None
59-
Remote: conan-center=https://conan.bintray.com
59+
Remote: conan-center=https://center.conan.io
6060
URL: http://github.com/lasote/conan-zlib
6161
License: http://www.zlib.net/zlib_license.html
6262
Updates: Version not checked
6363
Creation date: 2017-09-25 14:42:53
6464
Required by:
65-
OpenSSL/1.0.2l@conan/stable'
65+
OpenSSL/1.0.2l'
6666
end
6767

6868
before do

0 commit comments

Comments
 (0)