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
postmarketOS
pmbootstrap
Merge requests
!2416
newapkbuild: globbing and Path fixes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Imported
newapkbuild: globbing and Path fixes
newapkbuild-fixes
into
master
Overview
1
Commits
1
Pipelines
2
Changes
1
Merged
Imported
Administrator
requested to merge
newapkbuild-fixes
into
master
6 months ago
Overview
1
Commits
1
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
c3016e02
1 commit,
5 months ago
1 file
+
5
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
pmb/build/newapkbuild.py
+
5
−
5
Options
@@ -23,7 +23,7 @@ def newapkbuild(folder, args_passed, force=False):
# Run newapkbuild
pmb
.
chroot
.
user
([
"
newapkbuild
"
]
+
args_passed
,
working_dir
=
build
)
glob_result
=
list
(
build_outside
.
glob
(
"
/
*/APKBUILD
"
))
glob_result
=
list
(
build_outside
.
glob
(
"
*/APKBUILD
"
))
if
not
len
(
glob_result
):
return
@@ -33,22 +33,22 @@ def newapkbuild(folder, args_passed, force=False):
target
=
pkgrepo_default_path
()
/
folder
/
pkgname
# Move /home/pmos/build/$pkgname/* to /home/pmos/build/*
for
path
in
build_outside
.
glob
(
"
/
*/*
"
):
for
path
in
build_outside
.
glob
(
"
*/*
"
):
path_inside
=
build
/
pkgname
/
os
.
path
.
basename
(
path
)
pmb
.
chroot
.
user
([
"
mv
"
,
path_inside
,
build
])
pmb
.
chroot
.
user
([
"
rmdir
"
,
build
/
pkgname
])
# Overwrite confirmation
if
os
.
path
.
exists
(
target
):
logging
.
warning
(
"
WARNING: Folder already exists:
"
+
target
)
logging
.
warning
(
f
"
WARNING: Folder already exists:
{
target
}
"
)
question
=
"
Continue and delete its contents?
"
if
not
force
and
not
pmb
.
helpers
.
cli
.
confirm
(
question
):
raise
RuntimeError
(
"
Aborted.
"
)
pmb
.
helpers
.
run
.
user
([
"
rm
"
,
"
-r
"
,
target
])
# Copy the aport (without the extracted src folder)
logging
.
info
(
"
Create
"
+
target
)
logging
.
info
(
f
"
Create
{
target
}
"
)
pmb
.
helpers
.
run
.
user
([
"
mkdir
"
,
"
-p
"
,
target
])
for
path
in
build_outside
.
glob
(
"
/
*
"
):
for
path
in
build_outside
.
glob
(
"
*
"
):
if
not
path
.
is_dir
():
pmb
.
helpers
.
run
.
user
([
"
cp
"
,
path
,
target
])
Loading