Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Oskar Roesler
ros-aur-helpers
Commits
45603667
Verified
Commit
45603667
authored
Dec 06, 2020
by
Oskar Roesler
Browse files
Make tool finally rosdistro-independent
parent
c7835417
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
aurci/general.py
aurci/general.py
+2
-3
aurci/parser.py
aurci/parser.py
+8
-4
aurci/update.py
aurci/update.py
+3
-0
No files found.
aurci/general.py
View file @
45603667
...
...
@@ -45,10 +45,9 @@ class Routines:
if
os
.
path
.
isfile
(
file
):
sed
.
rmlinematch
(
self
.
package
,
file
)
@
staticmethod
def
build_metainfo_dict
():
def
build_metainfo_dict
(
self
):
rosdistro_url
=
\
f
'https://raw.githubusercontent.com/ros/rosdistro/master/
{
get_ros_distro
}
/distribution.yaml'
f
'https://raw.githubusercontent.com/ros/rosdistro/master/
{
self
.
get_ros_distro
()
}
/distribution.yaml'
rosdistro
=
yaml
.
load
(
requests
.
get
(
rosdistro_url
,
allow_redirects
=
True
).
content
,
Loader
=
yaml
.
BaseLoader
)[
'repositories'
]
ros_dict
=
{}
...
...
aurci/parser.py
View file @
45603667
...
...
@@ -31,14 +31,18 @@ def main(argv):
args
=
parser
.
parse_args
(
argv
)
def
retry_with_rosdistro_name
():
name
=
"ros-{0}-{1}"
.
format
(
Routines
().
get_ros_distro
(),
args
.
package
)
if
os
.
path
.
exists
(
os
.
path
.
join
(
Routines
.
CACHE_ROOT
,
"packages/"
,
name
)):
routines
=
Routines
()
name
=
"ros-{0}-{1}"
.
format
(
routines
.
get_ros_distro
(),
args
.
package
)
if
os
.
path
.
exists
(
os
.
path
.
join
(
routines
.
cache_path
,
'packages'
,
name
)):
try
:
commands
(
args
.
command
,
name
,
args
.
verbose
,
args
.
quiet
)
except
KeyError
:
print
(
f
"Error:
{
args
.
package
}
could not be found in ROS Metainfo dict while running
{
args
.
command
}
"
)
print
(
f
"Error:
{
args
.
package
}
could not be found in ROS Metainfo dict while running
{
args
.
command
}
"
,
file
=
sys
.
stderr
)
except
FileNotFoundError
:
print
(
f
"Error:
{
args
.
package
}
folder could not be found while running
{
args
.
command
}
"
)
print
(
f
"Error:
{
args
.
package
}
folder could not be found while running
{
args
.
command
}
"
,
file
=
sys
.
stderr
)
else
:
print
(
f
"Error:
{
args
.
package
}
is not on disk. Try to clone it."
,
file
=
sys
.
stderr
)
try
:
commands
(
args
.
command
,
args
.
package
,
args
.
verbose
,
args
.
quiet
)
...
...
aurci/update.py
View file @
45603667
...
...
@@ -8,6 +8,9 @@ import xml.etree.ElementTree as ET
class
Update
(
Routines
):
#Singleton to not reload for every package
#metainfo_dict = None
# packages that are missing information or are special cases
skip
=
[
'fcl'
,
'libviso2'
,
'viso2_ros'
,
'opencv3'
,
'roscpp_git'
,
'message_filters_git'
,
'ivcon'
,
'stage'
,
'nodelet_tutorial_math'
,
'common_tutorials'
,
...
...
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