Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jenkins.debian.net
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian QA
jenkins.debian.net
Commits
5c2b989a
Commit
5c2b989a
authored
7 years ago
by
Holger Levsen
Browse files
Options
Downloads
Patches
Plain Diff
reproducible Arch Linux: prefer manually triggered packages over new packages
Signed-off-by:
Holger Levsen
<
holger@layer-acht.org
>
parent
c9d94126
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/reproducible_build_archlinux_pkg.sh
+21
-7
21 additions, 7 deletions
bin/reproducible_build_archlinux_pkg.sh
with
21 additions
and
7 deletions
bin/reproducible_build_archlinux_pkg.sh
+
21
−
7
View file @
5c2b989a
...
...
@@ -89,16 +89,12 @@ choose_package() {
local
REPO
local
PKG
for
REPO
in
$(
echo
$ARCHLINUX_REPOS
|
sed
-s
"s# #
\n
#g"
|
sort
-R
| xargs
echo
)
;
do
# try to find packages which have been triggered
for
PKG
in
$(
cat
${
ARCHLINUX_PKGS
}
_
$REPO
|
cut
-d
' '
-f1
|
sort
-R
| xargs
echo
)
;
do
#
build package if it has never build or at least $MIN_AGE days ago
if
[
!
-d
$BASE
/archlinux/
$REPO
/
$PKG
]
||
[
-f
$BASE
/archlinux/
$REPO
/
$PKG
/pkg.needs_build
]
;
then
#
if triggered...
if
[
-f
$BASE
/archlinux/
$REPO
/
$PKG
/pkg.needs_build
]
;
then
REPOSITORY
=
$REPO
SRCPACKAGE
=
$PKG
echo
"
$(
date
-u
)
- building package
$PKG
from '
$REPOSITORY
' now..."
# very simple locking…
mkdir
-p
$BASE
/archlinux/
$REPOSITORY
/
$PKG
touch
$BASE
/archlinux/
$REPOSITORY
/
$PKG
[
!
-f
$BASE
/archlinux/
$REPO
/
$PKG
/pkg.needs_build
]
||
rm
$BASE
/archlinux/
$REPO
/
$PKG
/pkg.needs_build
# break out of the loop (and then out of the next loop too...)
break
fi
...
...
@@ -107,6 +103,20 @@ choose_package() {
if
[
!
-z
"
$SRCPACKAGE
"
]
;
then
break
fi
# trz to find packages which never been built before
for
PKG
in
$(
cat
${
ARCHLINUX_PKGS
}
_
$REPO
|
cut
-d
' '
-f1
|
sort
-R
| xargs
echo
)
;
do
# if new...
if
[
!
-d
$BASE
/archlinux/
$REPO
/
$PKG
]
;
then
REPOSITORY
=
$REPO
SRCPACKAGE
=
$PKG
# break out of the loop (and then out of the next loop too...)
break
fi
done
# again, if we broke out of the previous loop we have choosen a package
if
[
!
-z
"
$SRCPACKAGE
"
]
;
then
break
fi
done
if
[
-z
$SRCPACKAGE
]
;
then
echo
"
$(
date
-u
)
- no package found to be build, sleeping 6h."
...
...
@@ -117,6 +127,10 @@ choose_package() {
echo
"
$(
date
-u
)
- exiting cleanly now."
exit
0
fi
echo
"
$(
date
-u
)
- building package
$SRCPACKAGE
from '
$REPOSITORY
' now..."
# very simple locking…
mkdir
-p
$BASE
/archlinux/
$REPOSITORY
/
$SRCPACKAGE
[
!
-f
$BASE
/archlinux/
$REPO
/
$SRCPACKAGE
/pkg.needs_build
]
||
rm
$BASE
/archlinux/
$REPO
/
$SRCPACKAGE
/pkg.needs_build
}
first_build
()
{
...
...
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