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
fca3ca5b
Commit
fca3ca5b
authored
May 31, 2017
by
Kazushi (Jam) Marukawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change crew to upgrade packages belong to the dependency order
parent
dc95d1c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
crew
crew
+18
-1
No files found.
crew
View file @
fca3ca5b
...
...
@@ -299,8 +299,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
])
...
...
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