Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
dbscripts
Commits
b862bca8
Verified
Commit
b862bca8
authored
Jun 14, 2020
by
Eli Schwartz
Committed by
Morten Linderud
Nov 20, 2021
Browse files
wip: add support for debug packages
parent
998155b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
db-functions
View file @
b862bca8
...
...
@@ -249,6 +249,14 @@ getpkgarch() {
echo
"
$_ver
"
}
is_debug_package
()
{
local
pkgfile
=
${
1
}
local
pkgbase
=
"
$(
getpkgbase
"
${
pkgfile
}
"
)
"
local
pkgname
=
"
$(
getpkgname
"
${
pkgfile
}
"
)
"
[[
${
pkgbase
}
-debug
=
${
pkgname
}
]]
}
check_packager
()
{
local
_packager
...
...
@@ -325,7 +333,7 @@ check_pkgvcs() {
read
-ra
vcsnames
<<<
"
${
vcsnames
}
"
[[
"
${
vcsver
}
"
=
"
${
_pkgver
}
"
]]
||
return
1
in_array
"
${
_pkgname
}
"
"
${
vcsnames
[@]
}
"
||
return
1
in_array
"
${
_pkgname
}
"
"
${
vcsnames
[@]
}
"
"
${
_pkgbase
}
-debug"
||
return
1
return
0
}
...
...
@@ -349,6 +357,7 @@ check_splitpkgs() {
# not a split package
((
${#
vcsnames
[@]
}
>
1
))
||
continue
[[
${
_pkgbase
}
-debug
=
${
_pkgname
}
]]
&&
continue
mkdir
-p
"
${
repo
}
/
${
_pkgarch
}
/
${
_pkgbase
}
"
echo
"
${
_pkgname
}
"
>>
"
${
repo
}
/
${
_pkgarch
}
/
${
_pkgbase
}
/staging"
...
...
db-update
View file @
b862bca8
...
...
@@ -82,28 +82,45 @@ for repo in "${repos[@]}"; do
any_pkgs
=(
$(
getpkgfiles
"
${
STAGING
}
/
${
repo
}
/"
*
-any
${
PKGEXTS
}
2>/dev/null
)
)
for
pkgarch
in
"
${
ARCHES
[@]
}
"
;
do
add_pkgs
=()
debug_pkgs
=()
arch_pkgs
=(
$(
getpkgfiles
"
${
STAGING
}
/
${
repo
}
/"
*
"-
${
pkgarch
}
"
${
PKGEXTS
}
2>/dev/null
)
)
for
pkg
in
"
${
arch_pkgs
[@]
}
"
"
${
any_pkgs
[@]
}
"
;
do
pkgfile
=
"
${
pkg
##*/
}
"
if
is_debug_package
"
${
pkg
}
"
;
then
debug_pkgs+
=(
"
${
pkgfile
}
"
)
currentpool
=
${
PKGPOOL
}
-debug
currentrepo
=
${
repo
}
-debug
else
add_pkgs+
=(
"
${
pkgfile
}
"
)
currentpool
=
${
PKGPOOL
}
currentrepo
=
${
repo
}
fi
msg2
'%s (%s)'
"
$pkgfile
"
"
$pkgarch
"
# any packages might have been moved by the previous run
if
[[
-f
${
pkg
}
]]
;
then
mv
"
${
pkg
}
"
"
$FTP_BASE
/
${
PKGPOOL
}
"
mv
"
${
pkg
}
"
"
$FTP_BASE
/
${
currentpool
}
"
fi
ln
-s
"../../../
${
PKGPOOL
}
/
${
pkgfile
}
"
"
$FTP_BASE
/
$repo
/os/
${
pkgarch
}
"
ln
-s
"../../../
${
currentpool
}
/
${
pkgfile
}
"
"
$FTP_BASE
/
$
{
current
repo
}
/os/
${
pkgarch
}
"
# also move signatures
if
[[
-f
${
pkg
}
.sig
]]
;
then
mv
"
${
pkg
}
.sig"
"
$FTP_BASE
/
${
PKGPOOL
}
"
mv
"
${
pkg
}
.sig"
"
$FTP_BASE
/
${
currentpool
}
"
fi
"
$(
dirname
"
$(
readlink
-e
"
${
BASH_SOURCE
[0]
}
"
)
"
)
/db-archive"
"
${
FTP_BASE
}
/
${
PKGPOOL
}
/
${
pkg
##*/
}
"
if
[[
-f
$FTP_BASE
/
${
PKGPOOL
}
/
${
pkgfile
}
.sig
]]
;
then
ln
-s
"../../../
${
PKGPOOL
}
/
${
pkgfile
}
.sig"
"
$FTP_BASE
/
$repo
/os/
${
pkgarch
}
"
if
[[
${
PKGPOOL
}
=
${
currentpool
}
]]
;
then
# do not archive debug info, this is not of historic interest
"
$(
dirname
"
$(
readlink
-e
"
${
BASH_SOURCE
[0]
}
"
)
"
)
/db-archive"
"
${
FTP_BASE
}
/
${
PKGPOOL
}
/
${
pkg
##*/
}
"
fi
if
[[
-f
$FTP_BASE
/
${
currentpool
}
/
${
pkgfile
}
.sig
]]
;
then
ln
-s
"../../../
${
currentpool
}
/
${
pkgfile
}
.sig"
"
$FTP_BASE
/
${
currentrepo
}
/os/
${
pkgarch
}
"
fi
add_pkgs+
=(
"
${
pkgfile
}
"
)
done
if
((
${#
add_pkgs
[@]
}
>=
1
))
;
then
arch_repo_modify add
"
${
repo
}
"
"
${
pkgarch
}
"
"
${
add_pkgs
[@]
}
"
fi
if
((
${#
debug_pkgs
[@]
}
>=
1
))
;
then
arch_repo_modify add
"
${
repo
}
-debug"
"
${
pkgarch
}
"
${
debug_pkgs
[@]
}
fi
done
done
...
...
test/lib/common.bash
View file @
b862bca8
...
...
@@ -121,9 +121,9 @@ eot
mkdir
-p
"
${
TMP
}
/"
{
ftp,tmp,staging,
{
package,source
}
-cleanup
,svn-packages-
{
copy,repo
}}
for
r
in
${
PKGREPOS
[@]
}
;
do
mkdir
-p
"
${
TMP
}
/staging/
${
r
}
"
mkdir
-p
"
${
TMP
}
"
/staging/
${
r
}
{
,-debug
}
for
a
in
${
ARCHES
[@]
}
;
do
mkdir
-p
"
${
TMP
}
/ftp/
${
r
}
/os/
${
a
}
"
mkdir
-p
"
${
TMP
}
"
/ftp/
${
r
}
{
,-debug
}
/os/
${
a
}
done
done
mkdir
-p
"
${
TMP
}
/ftp/
${
PKGPOOL
}
"
...
...
Write
Preview
Supports
Markdown
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