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
f7b92122
Commit
f7b92122
authored
Jun 25, 2017
by
Damian Montero
Committed by
GitHub
Jun 25, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #791 from jam7/correct-dependency-problems
Correct dependency problems
parents
4132f727
23b90749
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
crew
crew
+19
-2
No files found.
crew
View file @
f7b92122
...
...
@@ -302,8 +302,25 @@ def upgrade
puts
"#{@pkg.name} is already up to date."
.
lightgreen
end
else
toBeUpdated
=
[]
#
Make
a
installed
packages
list
belong
to
the
dependency
order
dependencies
=
[]
@
device
[:
installed_packages
].
each
do
|
package
|
#
skip
package
if
it
is
dependent
other
packages
previously
checked
next
if
dependencies
.
include
?
package
[:
name
]
#
add
package
itself
dependencies
=
[
package
[:
name
]
].
concat
(
dependencies
)
#
expand
depencencies
and
add
it
to
the
dependencies
list
search
package
[:
name
],
true
exp_dep
=
expand_dependencies
dependencies
=
exp_dep
.
concat
(
dependencies
)
end
dependencies
.
uniq
!
#
Check
version
number
of
installed
package
and
make
a
target
list
toBeUpdated
=
[]
dependencies
.
each
do
|
dep
|
package
=
@
device
[:
installed_packages
].
find
{|
pkg
|
pkg
[:
name
]
==
dep
}
next
unless
package
search
package
[:
name
],
true
if
package
[:
version
]
!= @pkg.version
toBeUpdated
.
push
(
package
[:
name
])
...
...
@@ -451,7 +468,7 @@ def expand_dependencies
def
push_dependencies
if
@
pkg
.
is_binary
?(@
device
[:
architecture
])
||
(
!@pkg.in_upgrade && @device[:installed_packages].any? { |pkg| pkg[:name] == @pkg.name })
(
!@pkg.in_upgrade &&
!@pkg.build_from_source &&
@device[:installed_packages].any? { |pkg| pkg[:name] == @pkg.name })
#
retrieve
name
of
dependencies
that
doesn
't contain :build tag
check_deps = @pkg.dependencies.select {|k, v| !v.include?(:build)}.map {|k, v| k}
elsif @pkg.is_fake?
...
...
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