Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Jakub Panek
aports
Commits
a10203d0
Commit
a10203d0
authored
11 years ago
by
Jim Pryor
Committed by
Natanael Copa
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
abump: refactor verification of APKBUILD
* includes renaming pkgname, pkgver
parent
78b22a0f
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
abump.in
+14
-9
14 additions, 9 deletions
abump.in
with
14 additions
and
9 deletions
abump.in
+
14
−
9
View file @
a10203d0
...
@@ -18,19 +18,26 @@ fi
...
@@ -18,19 +18,26 @@ fi
# version bump packages
# version bump packages
do_bump
()
{
do_bump
()
{
local
p
rc
=
0
pkg
name
pkg
ver section message
local
p
rc
=
0 name ver section message
local
upgrade
=
"
${
cvelist
:+security
}
upgrade"
local
upgrade
=
"
${
cvelist
:+security
}
upgrade"
local
a
local
a
for
p
;
do
for
p
;
do
pkg
name
=
${
p
%-[0-9]*
}
name
=
${
p
%-[0-9]*
}
pkg
ver
=
${
p
#
${
pkg
name
}
-
}
ver
=
${
p
#
${
name
}
-
}
# calculate APKBUILD's path
# calculate APKBUILD's path
if
[
"
${
pkg
name
#*/
}
"
!=
"
$
pkg
name
"
]
&&
!
[
-d
"
$APORTSDIR
/
${
pkg
name
%/*
}
]; then
if
[
"
${
name
#*/
}
"
!=
"
$name
"
]
&&
!
[
-d
"
$APORTSDIR
/
${
name
%/*
}
]; then
error "
'$p'
should be of form
'foo-1.2.3'
or
'main/foo-1.2.3'
"
error "
'$p'
should be of form
'foo-1.2.3'
or
'main/foo-1.2.3'
"
rc=1; continue
rc=1; continue
fi
fi
a=
$(
aports_buildscript
"
$pkgname
"
||
die
"can't find APKBUILD for
$pkgname
"
)
|| { rc=1; continue; }
a=
$(
aports_buildscript
"
$name
"
||
die
"can't find APKBUILD for
$name
"
)
|| { rc=1; continue; }
# verify APKBUILD
(
. "
$a
" || exit 1
[ "
$pkgname
" = "
$name
" ] || die "
$name
: APKBUILD has different
\$
pkgname
"
type package | grep -q function || die "
$name
: missing package
()
"
) || { rc=1; continue; }
(
(
set -e
set -e
...
@@ -39,7 +46,7 @@ do_bump() {
...
@@ -39,7 +46,7 @@ do_bump() {
section=
${
PWD
%/*
}
section=
${
PWD
%/*
}
section=
${
section
##*/
}
section=
${
section
##*/
}
message="
$section
/
$
pkg
name
:
$upgrade
to
${
pkg
ver
}${
cvelist
}
"
message="
$section
/
$name
:
$upgrade
to
${
ver
}${
cvelist
}
"
if [ -n "
$fixes
" ]; then
if [ -n "
$fixes
" ]; then
message="
$message
message="
$message
...
@@ -48,9 +55,7 @@ fixes #${fixes#\#}
...
@@ -48,9 +55,7 @@ fixes #${fixes#\#}
fi
fi
echo "
$message
"
echo "
$message
"
( . ./APKBUILD; type package | grep -q function ) || die "
package
()
missing
"
sed -i -e "
s/^pkgver
=
.
*
/pkgver
=
$ver
/
"
\
sed -i -e "
s/^pkgver
=
.
*
/pkgver
=
$pkgver
/
"
\
-e "
s/^pkgrel
=
.
*
/pkgrel
=
0/
"
\
-e "
s/^pkgrel
=
.
*
/pkgrel
=
0/
"
\
APKBUILD
APKBUILD
...
...
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