Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lxdist-build
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
linuxsupport
lxdist-build
Merge requests
!44
update generaterepolist to not be dependent on log files
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
update generaterepolist to not be dependent on log files
generaterepolistm2
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Ben Morrice
requested to merge
generaterepolistm2
into
master
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
This commit changes the logic of
generaterepolist
. Instead of using log files as the source simply check for *rpm in the testing directories.
This approach simplifies the code, and ensures that no packages are 'missed'
SLC6 support has also been dropped with this commit
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
19a40aac
1 commit,
4 years ago
1 file
+
15
−
31
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
bin/generaterepolist
+
15
−
31
Options
#!/bin/bash
days
=
7
includetesting
=
false
repos
=()
usage
()
{
cat
<<
EOF
usage:
$0
-d [distribution]
usage:
$0
This script parses the log files of previous testing runs to determine which repos should be synced on the production (Thursday) run.
This script determines which repos should be updated/synced on the production
(Thursday) run.
Only CC7 is supported
OPTIONS:
-
d dist
dis
tribution: slc6 cc7
-
h
dis
play this help
-t include 'testing' repos
EOF
}
while
getopts
"ht
d:
"
option
while
getopts
"ht"
option
2>/dev/null
do
case
$option
in
h
)
@@ -28,36 +29,19 @@ do
t
)
includetesting
=
true
;;
d
)
dist
=
$OPTARG
;;
esac
done
if
[
-z
$dist
]
;
then
usage
exit
1
fi
files
=
`
find /mnt/data2/home/build/packages/logs/build2test
-mtime
-
$days
!
-size
0
-type
f
-exec
basename
{}
\;
|
cut
-d
.
-f1
,2
`
for
file
in
$files
basedir
=
/mnt/data1/dist/cern/centos/7/
sourcerepos
=
`
ls
-1d
$basedir
/
*
testing | xargs
-n1
basename
|grep
-v
cr-testing
`
for
repo
in
$sourcerepos
do
repo
=
`
echo
$file
|
cut
-d
.
-f2
`
# check repo is not a date
date
-d
"
$repo
"
>
/dev/null 2>&1
if
[
$?
-eq
1
]
;
then
if
[[
$file
==
*
"
${
dist
}
"
*
]]
;
then
repos+
=(
$repo
)
if
[
"
$includetesting
"
=
true
]
;
then
if
[
$dist
!=
"slc6"
]
;
then
repos+
=(
"
$repo
-testing"
)
else
repos+
=(
"testing"
)
fi
fi
if
[[
`
find
$basedir
/
$repo
/
-name
*
rpm
-not
-path
"*.~tmp~/*"
|wc
-l
`
-gt
0
]]
;
then
repos+
=(
"
${
repo
::-8
}
"
)
if
[
"
$includetesting
"
=
true
]
;
then
repos+
=(
"
$repo
"
)
fi
fi
done
# remove duplicates
unique_repos
=(
$(
echo
"
${
repos
[@]
}
"
|
tr
' '
'\n'
|
sort
-u
|
tr
'\n'
' '
)
)
echo
REPOLIST
=
\"
${
unique_repos
[@]
}
\"
echo
REPOLIST
=
\"
${
repos
[@]
}
\"
Loading