Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmbootstrap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Reidel
pmbootstrap
Commits
61a9bdc8
Unverified
Commit
61a9bdc8
authored
6 months ago
by
Oliver Smith
Browse files
Options
Downloads
Patches
Plain Diff
pmb.helpers.pmaports.get_repo: drop must_exist (MR 2405)
The function is never called with must_exist=False, so drop it.
parent
b25fa5a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pmb/helpers/pmaports.py
+3
-10
3 additions, 10 deletions
pmb/helpers/pmaports.py
with
3 additions
and
10 deletions
pmb/helpers/pmaports.py
+
3
−
10
View file @
61a9bdc8
...
...
@@ -271,22 +271,15 @@ def find_providers(provide):
return
sorted
(
providers
.
items
(),
reverse
=
True
,
key
=
lambda
p
:
p
[
1
].
get
(
"
provider_priority
"
,
0
))
# FIXME (#2324): split into an _optional variant or drop must_exist
def
get_repo
(
pkgname
,
must_exist
=
True
)
->
str
|
None
:
def
get_repo
(
pkgname
)
->
str
|
None
:
"""
Get the repository folder of an aport.
:pkgname: package name
:must_exist: raise an exception when it can
'
t be found
:returns: a string like
"
main
"
,
"
device
"
,
"
cross
"
, ...
or None when the aport could not be found
"""
aport
:
Path
|
None
if
must_exist
:
aport
=
find
(
pkgname
)
else
:
aport
=
find_optional
(
pkgname
)
if
not
aport
:
return
None
aport
:
Path
aport
=
find
(
pkgname
)
return
aport
.
parent
.
name
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment