Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] add checks for obsolete settings #1702

Merged
merged 1 commit into from Apr 28, 2019
Merged

[WIP] add checks for obsolete settings #1702

merged 1 commit into from Apr 28, 2019

Conversation

ghost
Copy link

@ghost ghost commented Apr 13, 2019

This might fix #1698

When running make V=s GLUON_RELEASE="master" GLUON_TARGET="ar71xx-tiny" GLUON_DEVICES="tp-link-tl-wr840n-v2" (site conf of Freifunk Hamburg and Gluon master) the following output is printed eight times:

site.conf obsolete: opkg.lede is obsolete and could be removed, check the release notes and documentation please

I am not sure if print() is a good choice or if something like io.stderr:write() should be used
e.g. io.stderr:write(src .. ' obsolete: ' .. string.format(...) .. '\n') (but it is visible with V=s, only)

Also not sure if a generic text is fine or if it should be possible to describe what is wrong, add a link to the documentation/release notes, ... what do you think?

scripts/check_site.lua Outdated Show resolved Hide resolved
@mweinelt mweinelt added 0. type: enhancement The changeset is an enhancement 2. status: waiting-on-author Waiting on some action from the author 3. topic: build This is about the build system 2. status: waiting-on-review Awaiting review from the assignee but also interested parties. and removed 2. status: waiting-on-author Waiting on some action from the author labels Apr 13, 2019
@mweinelt
Copy link
Contributor

mweinelt commented Apr 13, 2019

Being visible only when V=s is passed is probably not good enough.

@ghost
Copy link
Author

ghost commented Apr 16, 2019

@mweinelt where should it be visible? e.g. an error of the site config is visible via V=s only isn't it?

@neocturne
Copy link
Member

neocturne commented Apr 16, 2019

One option would be to make obsolete settings a hard failure.

We currently don't have a good way to make warnings visible without V=s (or BUILD_LOG=1 for logging into files)... but I assume such a facility could be added to OpenWrt.

@rotanid
Copy link
Member

rotanid commented Apr 16, 2019

hard failure should be OK as its easily fixable and clearly highlights something has to be done.

@ghost
Copy link
Author

ghost commented Apr 21, 2019

running

make -j 1 V=s GLUON_BRANCH=${GLUON_BRANCH} GLUON_TARGET=ar71xx-tiny GLUON_RELEASE=${GLUON_RELEASE}

with a probability setting will fail with

*** site.conf error: autoupdater.branches.stable.probability is obsolete Use GLUON_PRIORITY in site.mk instead.
postinst script ./usr/lib/opkg/info/gluon-autoupdater.postinst has failed with exit code 1

or with a opkg.lede setting will fail with

*** site.conf error: opkg.lede is obsolete Use opkg.openwrt instead.
postinst script ./usr/lib/opkg/info/gluon-core.postinst has failed with exit code 1

or a different obsolete setting '...' without a custom message will fail with

*** site.conf error: ... is obsolete and must be migrated or removed, check the release notes and documentation please

@neocturne
Copy link
Member

Implementation looks ok. I think the following formatting/wording would look better:

*** site.conf error: ... is obsolete and must be migrated or removed. Please check the release notes and documentation for details.
*** site.conf error: autoupdater.branches.stable.probability is obsolete. Use GLUON_PRIORITY in site.mk instead.

@ghost
Copy link
Author

ghost commented Apr 21, 2019

@NeoRaider i reworded the message somehow. Not sure if it is okay like it is now: 38a10d5

Should that be documented somewhere? Are there docs for check_site available?

@rotanid rotanid requested a review from neocturne April 21, 2019 23:38
scripts/check_site.lua Outdated Show resolved Hide resolved
gluon-autoupdater: add site check for obsolete setting probability
gluon-core: add site check for obsolete setting lede
@neocturne neocturne merged commit fe521db into freifunk-gluon:master Apr 28, 2019
@rotanid rotanid removed the 2. status: waiting-on-review Awaiting review from the assignee but also interested parties. label Apr 30, 2019
blocktrron pushed a commit to blocktrron/gluon that referenced this pull request May 13, 2019
@ghost ghost deleted the obsolete branch June 16, 2019 15:53
blocktrron pushed a commit to blocktrron/gluon that referenced this pull request Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. type: enhancement The changeset is an enhancement 3. topic: build This is about the build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check site config for obsolete settings
4 participants