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
e97dd649
Commit
e97dd649
authored
Jun 09, 2021
by
satmandu
Committed by
GitHub
Jun 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix package upgrade order (#5853)
* Fix package upgrade order * more dependency logic cleanup
parent
13b74e15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
+26
-15
bin/crew
bin/crew
+22
-14
lib/const.rb
lib/const.rb
+4
-1
No files found.
bin/crew
View file @
e97dd649
...
...
@@ -589,6 +589,20 @@ def upgrade
end
end
#
Adjust
package
install
ordering
for
upgrades
.
CREW_FIRST_PACKAGES
.
each
do
|
pkg
|
#
Add
package
to
beginning
.
toBeUpdated
.
insert
(
0
,
toBeUpdated
.
delete
(
pkg
))
if
toBeUpdated
.
include
?
pkg
end
CREW_LAST_PACKAGES
.
each
do
|
pkg
|
if
toBeUpdated
.
include
?
pkg
#
Add
package
to
beginning
.
toBeUpdated
.
insert
(
0
,
toBeUpdated
.
delete
(
pkg
))
#
Now
rotate
first
package
to
last
package
.
toBeUpdated
=
toBeUpdated
.
rotate
(
1
)
end
end
unless
toBeUpdated
.
empty
?
puts
'Updating packages...'
toBeUpdated
.
each
do
|
package
|
...
...
@@ -1050,10 +1064,10 @@ def resolve_dependencies
puts
'The following packages also need to be installed: '
deps
=
@
dependencies
begin_packages
=
[]
end_packages
=
[]
first_packages
=
%
w
[
curl
git
pixz
shared_mime_info
]
last_packages
=
%
w
[
ghc
mandb
gtk3
gtk4
sommelier
]
#
populate
arrays
with
common
elements
begin_packages
=
deps
&
CREW_FIRST_PACKAGES
end_packages
=
deps
&
CREW_LAST_PACKAGES
@
dependencies
.
each
do
|
dep
|
depends
=
nil
File
.
open
(
"#{CREW_PACKAGES_PATH}#{dep}.rb"
)
do
|
f
|
...
...
@@ -1065,19 +1079,13 @@ def resolve_dependencies
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
#
Remove
elements
in
another
array
deps
-=
begin_packages
deps
-=
end_packages
@
dependencies
=
(
begin_packages
+
deps
+
end_packages
).
uniq
@
dependencies
.
each
do
|
dep
|
...
...
lib/const.rb
View file @
e97dd649
# Defines common constants used in different parts of crew
CREW_VERSION
=
'1.11.
0
'
CREW_VERSION
=
'1.11.
1
'
ARCH_ACTUAL
=
`uname -m`
.
strip
# This helps with virtualized builds on aarch64 machines
...
...
@@ -102,3 +102,6 @@ CREW_CMAKE_LIBSUFFIX_OPTIONS = "#{CREW_CMAKE_OPTIONS} -DLIB_SUFFIX=#{CREW_LIB_SU
PY3_SETUP_BUILD_OPTIONS
=
"--executable=
#{
CREW_PREFIX
}
/bin/python3"
PY2_SETUP_BUILD_OPTIONS
=
"--executable=
#{
CREW_PREFIX
}
/bin/python2"
PY_SETUP_INSTALL_OPTIONS
=
"--root=
#{
CREW_DEST_DIR
}
--prefix=
#{
CREW_PREFIX
}
-O2 --compile --single-version-externally-managed"
CREW_FIRST_PACKAGES
=
%w[curl git pixz shared_mime_info]
CREW_LAST_PACKAGES
=
%w[ghc mandb gtk3 gtk4 sommelier]
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