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
476918d5
Commit
476918d5
authored
May 09, 2017
by
matt.downey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change method names to conform to ruby style guidelines
parent
8df14b7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
.vscode/temp.sql
.vscode/temp.sql
+0
-0
crew
crew
+10
-10
No files found.
.vscode/temp.sql
0 → 100644
View file @
476918d5
crew
View file @
476918d5
...
...
@@ -45,7 +45,7 @@ abort "Chromebrew should not be run as root." if Process.uid == 0 && @command !=
@device
[
key
]
=
@device
[
key
].
to_sym
rescue
@device
[
key
]
end
def
set
Pkg
(
pkgName
,
silent
=
false
)
def
set
_package
(
pkgName
,
silent
=
false
)
require
CREW_LIB_PATH
+
'packages/'
+
pkgName
@pkg
=
Object
.
const_get
(
pkgName
.
capitalize
)
@pkg
.
name
=
pkgName
...
...
@@ -64,7 +64,7 @@ end
def
search
(
pkgName
,
silent
=
false
)
Find
.
find
(
CREW_LIB_PATH
+
'packages'
)
do
|
filename
|
return
set
Pkg
(
pkgName
,
silent
)
if
filename
==
CREW_LIB_PATH
+
'packages/'
+
pkgName
+
'.rb'
return
set
_package
(
pkgName
,
silent
)
if
filename
==
CREW_LIB_PATH
+
'packages/'
+
pkgName
+
'.rb'
end
abort
"package
#{
pkgName
}
not found :("
end
...
...
@@ -140,7 +140,7 @@ def upgrade
if
currentVersion
!=
@pkg
.
version
puts
"Updating
#{
@pkg
.
name
}
..."
@pkg
.
in_upgrade
=
true
resolve
DependenciesAndI
nstall
resolve
_dependencies_and_i
nstall
@pkg
.
in_upgrade
=
false
else
puts
"
#{
@pkg
.
name
}
is already up to date."
...
...
@@ -159,7 +159,7 @@ def upgrade
toBeUpdated
.
each
do
|
package
|
search
package
@pkg
.
in_upgrade
=
true
resolve
DependenciesAndI
nstall
resolve
_dependencies_and_i
nstall
@pkg
.
in_upgrade
=
false
end
puts
"Packages have been updated."
...
...
@@ -269,7 +269,7 @@ def install_package (pkgdir)
end
end
def
resolve
DependenciesAndI
nstall
def
resolve
_dependencies_and_i
nstall
begin
origin
=
@pkg
.
name
...
...
@@ -296,7 +296,7 @@ def resolveDependencies
# check source packages existance
@source_package
=
0
def
push
Dep
s
def
push
_dependencie
s
if
@pkg
.
binary_url
&&
@pkg
.
binary_url
.
has_key?
(
@device
[
:architecture
])
@check_deps
=
@pkg
.
dependencies
else
...
...
@@ -309,12 +309,12 @@ def resolveDependencies
@pkg
.
dependencies
.
each
do
|
dep
|
search
dep
,
true
push
Dep
s
push
_dependencie
s
end
end
end
push
Dep
s
push
_dependencie
s
# Add buildessential and solve its dependencies if any of dependent
# packages are made from source
...
...
@@ -322,7 +322,7 @@ def resolveDependencies
@dependencies
.
unshift
'buildessential'
search
'buildessential'
,
true
end
push
Dep
s
push
_dependencie
s
return
if
@dependencies
.
empty?
...
...
@@ -535,7 +535,7 @@ when "upgrade"
upgrade
when
"install"
search
@pkgName
resolve
DependenciesAndI
nstall
resolve
_dependencies_and_i
nstall
when
"build"
search
@pkgName
resolve_dependencies_and_build
...
...
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