Commit 09012516 authored by Mattia Rizzolo's avatar Mattia Rizzolo

reproducible: rename the inconsistent 'not for us' and 'not_for_us' to NFU

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 01ac367e
......@@ -59,15 +59,14 @@ def get_status_icon(status):
'FTBR': 'weather-showers-scattered.png',
'404': 'weather-severe-alert.png',
'depwait': 'weather-snow.png',
'not for us': 'weather-few-clouds-night.png',
'not_for_us': 'weather-few-clouds-night.png',
'NFU': 'weather-few-clouds-night.png',
'untested': 'weather-clear-night.png',
'blacklisted': 'error.png'}
spokenstatus = status
if status == 'unreproducible':
status = 'FTBR'
elif status == 'not for us':
status = 'not_for_us'
elif status in ('not for us', 'not_for_us'):
status = 'NFU'
try:
return (status, table[status], spokenstatus)
except KeyError:
......
......@@ -156,7 +156,7 @@ update_db_and_html() {
query_db "INSERT INTO results (package_id, version, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPKGID', '$VERSION', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB')" || \
query_db "INSERT INTO results (package_id, version, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPKGID', '$VERSION', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB')"
fi
if [ ! -z "$DURATION" ] ; then # this happens when not 404 and not_for_us
if [ ! -z "$DURATION" ] ; then # this happens when not 404 and NFU
query_db "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPACKAGE', '$VERSION', '$SUITE', '$ARCH', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB')" || \
query_db "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPACKAGE', '$VERSION', '$SUITE', '$ARCH', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB')"
fi
......@@ -226,12 +226,12 @@ handle_depwait() {
if [ -n "$NOTIFY" ] ; then NOTIFY="depwait" ; fi
}
handle_not_for_us() {
handle_NFU() {
# a list of valid architecture for this package should be passed to this function
log_info "Package ${SRCPACKAGE} (${VERSION}) shall only be build on \"$(echo "$@" | xargs echo )\" and thus was skipped."
DURATION=0
update_rbuildlog
update_db_and_html "not for us"
update_db_and_html "NFU"
if [ $SAVE_ARTIFACTS -eq 1 ] ; then SAVE_ARTIFACTS=0 ; fi
if [ ! -z "$NOTIFY" ] ; then NOTIFY="failure" ; fi
exit 0 # RBUILDLOG and SAVE_ARTIFACTS and NOTIFY are used in cleanup_all called at exit
......@@ -580,7 +580,7 @@ check_suitability() {
fi
done
if ! $SUITABLE ; then handle_not_for_us $ARCHITECTURES ; fi
if ! $SUITABLE ; then handle_NFU $ARCHITECTURES ; fi
}
first_build() {
......
......@@ -140,7 +140,7 @@ set_icon() {
case "$1" in
reproducible) ICON=weather-clear.png
;;
unreproducible|FTBR) ICON=weather-showers-scattered.png
FTBR) ICON=weather-showers-scattered.png
STATE_TARGET_NAME="FTBR"
;;
FTBFS) ICON=weather-storm.png
......@@ -149,8 +149,8 @@ set_icon() {
;;
404) ICON=weather-severe-alert.png
;;
not_for_us|"not for us") ICON=weather-few-clouds-night.png
STATE_TARGET_NAME="not_for_us"
NFU|not_for_us|"not for us") ICON=weather-few-clouds-night.png
STATE_TARGET_NAME="NFU"
;;
blacklisted) ICON=error.png
;;
......
......@@ -634,6 +634,11 @@ schema_updates = {
"ALTER TABLE schedule DROP COLUMN message",
"ALTER TABLE stats_build DROP COLUMN schedule_message",
],
34: [ # rename status "not for us" to "NFU"
"UPDATE results SET status='NFU' WHERE status='not for us'",
"UPDATE stats_build SET status='NFU' WHERE status='not for us'",
"INSERT INTO rb_schema (version, date) VALUES (34, CURRENT_TIMESTAMP)",
],
}
......
......@@ -110,7 +110,7 @@ def lack_buildinfo():
query = '''SELECT s.name, r.version, s.suite, s.architecture
FROM sources AS s JOIN results AS r ON r.package_id=s.id
WHERE r.status NOT IN
('blacklisted', 'not for us', 'FTBFS', 'depwait', '404', '')
('blacklisted', 'NFU', 'FTBFS', 'depwait', '404', '')
ORDER BY s.name ASC, s.suite DESC, s.architecture ASC'''
results = query_db(query)
for pkg, version, suite, arch in results:
......
......@@ -195,7 +195,7 @@ gather_suite_arch_stats() {
COUNT_BAD=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'unreproducible'")
COUNT_UGLY=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'FTBFS'")
COUNT_SOURCELESS=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = '404'")
COUNT_NOTFORUS=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'not for us'")
COUNT_NOTFORUS=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'NFU'")
COUNT_BLACKLISTED=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'blacklisted'")
COUNT_DEPWAIT=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'depwait'")
COUNT_OTHER=$(( $COUNT_SOURCELESS+$COUNT_NOTFORUS+$COUNT_BLACKLISTED+$COUNT_DEPWAIT ))
......
......@@ -281,7 +281,7 @@ queries = {
"not_for_us_all":
select_sources.where(
and_(
results.c.status == 'not for us',
results.c.status == 'NFU',
)
).order_by(
......@@ -388,7 +388,7 @@ pages = {
'title': 'Packages in {suite}/{arch} which should not be build on "{arch}"',
'body': [
{
'icon_status': 'not_for_us',
'icon_status': 'NFU',
'query': 'not_for_us_all',
'text': Template('$tot ($percent%) packages which should not be build in $suite/$arch:')
}
......@@ -420,7 +420,7 @@ pages = {
'text': Template('$tot packages ($percent%) failed to build from source in total $suite/$arch:')
},
{
'icon_status': 'not_for_us',
'icon_status': 'NFU',
'icon_link': '/index_not_for_us.html',
'query': 'not_for_us_all',
'text': Template('$tot ($percent%) packages which should not be build in $suite/$arch:')
......@@ -563,8 +563,8 @@ pages = {
'text': Template('$tot ($percent%) source packages failed to satisfy their build-dependencies, ordered by build date:')
},
{
'icon_status': 'not_for_us',
'db_status': 'not for us',
'icon_status': 'NFU',
'db_status': 'NFU',
'icon_link': '/index_not_for_us.html',
'query': 'notes',
'nosuite': True,
......
......@@ -314,7 +314,7 @@ def gen_html_issue(issue, suite):
)
try:
arch = 'amd64'
for status in ['unreproducible', 'FTBFS', 'not for us', 'blacklisted', 'reproducible', 'depwait']:
for status in ['unreproducible', 'FTBFS', 'NFU', 'blacklisted', 'reproducible', 'depwait']:
pkgs = query_db(sql.where(sources.c.name.in_(issues_count[issue]))\
.params({'suite': suite, 'arch': arch, 'status': status}))
pkgs = [p[0] for p in pkgs]
......
......@@ -158,7 +158,7 @@ def gen_suitearch_details(package, version, suite, arch, status, spokenstatus,
context['buildinfo_uri'] = build.buildinfo.url
default_view = default_view if default_view else build.buildinfo.url
elif not args.ignore_missing_files and status not in \
('untested', 'blacklisted', 'FTBFS', 'not_for_us', 'depwait', '404'):
('untested', 'blacklisted', 'FTBFS', 'NFU', 'depwait', '404'):
log.critical('buildinfo not detected at ' + build.buildinfo.path)
# Get rbuild, build2 and build diffs context
......
......@@ -244,7 +244,7 @@ def create_pkgset_page_and_graphs(suite, arch, stats, pkgset_name):
for (status, cutename, description) in status_cutename_descriptions:
icon_html = ''
if status == 'rest':
for s in ['depwait', 'blacklisted', 'not_for_us', '404']:
for s in ['depwait', 'blacklisted', 'NFU', '404']:
s, icon, spokenstatus = get_status_icon(s)
icon_html += gen_status_link_icon(s, None, icon, suite, arch)
else:
......
......@@ -34,7 +34,7 @@ log.info('Creating json dump of current reproducible status')
# filter_query is defined in reproducible_common.py and excludes some FTBFS issues
query = "SELECT s.name, r.version, s.suite, s.architecture, r.status, r.build_date " + \
"FROM results AS r JOIN sources AS s ON r.package_id = s.id "+ \
"WHERE status != '' AND status NOT IN ('not for us', '404', 'blacklisted' ) AND (( status != 'FTBFS' ) OR " \
"WHERE status != '' AND status NOT IN ('NFU', '404', 'blacklisted' ) AND (( status != 'FTBFS' ) OR " \
" ( status = 'FTBFS' and r.package_id NOT IN (SELECT n.package_id FROM NOTES AS n WHERE " + filter_query + " )))"
result = sorted(query_db(query))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment