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
3b4c88ff
Commit
3b4c88ff
authored
11 years ago
by
Natanael Copa
Browse files
Options
Downloads
Patches
Plain Diff
buildrepo: fix clean of old pkgs
- we need check arch for noarch - we need list packages generated from $linguas
parent
cf102231
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
buildrepo.in
+23
-14
23 additions, 14 deletions
buildrepo.in
with
23 additions
and
14 deletions
buildrepo.in
+
23
−
14
View file @
3b4c88ff
...
@@ -31,9 +31,22 @@ usage() {
...
@@ -31,9 +31,22 @@ usage() {
exit
1
exit
1
}
}
is_in
()
{
local
needle
=
"
$1
"
arg
=
shift
for
arg
;
do
[
"
$needle
"
=
"
$arg
"
]
&&
return
0
done
return
1
}
check_arch
()
{
[
"
$1
"
=
"all"
]
||
[
"
$1
"
=
"noarch"
]
||
is_in
"
$CARCH
"
$@
}
listpackages
()
{
listpackages
()
{
local
repo
=
"
$1
"
i
=
pkgname
=
pkgver
=
pkgrel
=
subpackage
=
arch
=
subpkg
=
local
repo
=
"
$1
"
i
=
pkgname
=
pkgver
=
pkgrel
=
subpackage
=
arch
=
subpkg
=
linguas
=
local
lang
=
suffix
=
cd
"
$aportsdir
/
$repo
"
cd
"
$aportsdir
/
$repo
"
for
i
in
*
/APKBUILD
;
do
for
i
in
*
/APKBUILD
;
do
cd
"
$aportsdir
/
$repo
"
/
${
i
%/*
}
||
return
1
cd
"
$aportsdir
/
$repo
"
/
${
i
%/*
}
||
return
1
...
@@ -42,12 +55,18 @@ listpackages() {
...
@@ -42,12 +55,18 @@ listpackages() {
pkgrel
=
pkgrel
=
subpackages
=
subpackages
=
arch
=
arch
=
linguas
=
.
./APKBUILD
.
./APKBUILD
if
!
is_in all
$arch
&&
!
is_in
"
$CARCH
"
$arch
;
then
suffix
=
"
$pkgver
-r
$pkgrel
.apk"
if
!
check_arch
$arch
;
then
continue
continue
fi
fi
for
subpkg
in
$pkgname
$subpackages
;
do
for
subpkg
in
$pkgname
$subpackages
;
do
echo
${
subpkg
%
:
*
}
-
$pkgver
-r
$pkgrel
.apk
echo
${
subpkg
%
:
*
}
-
$suffix
done
for
lang
in
$linguas
;
do
echo
$pkgname
-lang-
$lang
-
$suffix
done
done
done
done
}
}
...
@@ -60,16 +79,6 @@ all_exist() {
...
@@ -60,16 +79,6 @@ all_exist() {
return
0
return
0
}
}
is_in
()
{
local
needle
=
"
$1
"
shift
while
[
$#
-gt
0
]
;
do
[
"
$needle
"
=
"
$1
"
]
&&
return
0
shift
done
return
1
}
list_needbuild
()
{
list_needbuild
()
{
local
repo
=
"
$1
"
i
=
local
repo
=
"
$1
"
i
=
...
@@ -89,7 +98,7 @@ list_needbuild() {
...
@@ -89,7 +98,7 @@ list_needbuild() {
arch
=
arch
=
.
./APKBUILD
.
./APKBUILD
if
!
is_in all
$arch
&&
!
is_in
$CARCH
$arch
;
then
if
!
check_arch
$arch
;
then
continue
continue
fi
fi
...
...
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