Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
6f09e053
Commit
6f09e053
authored
May 02, 2021
by
Ed Reel
Committed by
GitHub
May 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crew dependency algorithm (#5719)
parent
91d807f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
bin/crew
bin/crew
+24
-7
lib/const.rb
lib/const.rb
+1
-1
No files found.
bin/crew
View file @
6f09e053
...
...
@@ -941,20 +941,37 @@ def resolve_dependencies
return if @dependencies.empty?
puts '
The
following
packages
also
need
to
be
installed
:
'
i = 0
last_deps = []
deps = @dependencies
begin_packages = []
end_packages = []
first_packages = ["shared_mime_info"]
last_packages = ["curl", "ghc", "mandb", "gtk3", "gtk4", "sommelier"]
@dependencies.each do |dep|
if last_packages.include?(dep)
@dependencies.delete_at(i)
last_deps.push(dep)
depends = nil
File.open("#{CREW_PACKAGES_PATH}#{dep}.rb") do |f|
f.each_line do |line|
if line =~ /depends_on/
depends = true
break
end
end
end
begin_packages.push dep if first_packages.include? dep
# if a dependency package has no other dependencies, push to the front
begin_packages.push dep unless depends
end_packages.push dep if last_packages.include? dep
end
i = 0
all_packages = begin_packages + end_packages
deps.each do |dep|
if all_packages.include?(dep)
deps.delete_at(i)
end
i += 1
end
@dependencies
.concat last_deps.sort
@dependencies
= (begin_packages + deps + end_packages).uniq
@dependencies.each do |dep|
print dep + '
'
...
...
lib/const.rb
View file @
6f09e053
# Defines common constants used in different parts of crew
CREW_VERSION
=
'1.
8.15
'
CREW_VERSION
=
'1.
9.1
'
ARCH_ACTUAL
=
`uname -m`
.
strip
# This helps with virtualized builds on aarch64 machines
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment