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

Luci opkg/packages: Limit version string display to 26 chars #463

Merged
merged 1 commit into from Sep 2, 2015

Conversation

hnyman
Copy link
Contributor

@hnyman hnyman commented Sep 1, 2015

Many packages currently include a git commit hash in version string.
That makes version strings very long and the version column takes much space
when listing available/installed packages in Luci.

Longest version string is 58 characters (micropython).
85 packages have at least 50 chars and 150 packages at least 40 chars.

Adjust Luci to display max. 26 characters (= luci's own version string).

Longer version strings are cut to: "first 21c" + ".." + "last 3c"

The last 3 chars are used to preserve the possible PKG_REVISION string.
E.g. 'opkg' has only hash+PKG_REVISION, so using only start of the string
might not be optimal.

Examples:

1.3.10-20150302-f2a889564b3a215902622b040a1247af38cb8203-1
1.3.10-20150302-f2a88..3-1

0.1-20150302-654c7d288603f7dae09eb09b57fb67b38c7ac6c3-1
0.1-20150302-654c7d28..3-1

9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7
9c97d5ecd795709c8584e..d-7

Many packages currently include a git commit hash in version string.
That makes versions string very long and the version column takes much space
when listing available/installed packages in Luci.

Longest version string is 58 characters (micropython).
85 packages have at least 50 chars and 150 packages at least 40 chars.

Adjust Luci to display max. 26 characters (= luci's own version string).

Longer version strings are cut to: "first 21c" + ".." + "last 3c"

The last 3 chars are used to preserve the possible PKG_REVISION string.
E.g. 'opkg' has only hash+PKG_REVISION, so using only start of the string
might not be optimal.

Examples:

1.3.10-20150302-f2a889564b3a215902622b040a1247af38cb8203-1
1.3.10-20150302-f2a88..3-1

0.1-20150302-654c7d288603f7dae09eb09b57fb67b38c7ac6c3-1
0.1-20150302-654c7d28..3-1

9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7
9c97d5ecd795709c8584e..d-7

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
@jow-
Copy link
Contributor

jow- commented Sep 1, 2015

Looks good to me. Maybe consider using the … character ("…") for the omission instead of two dots.

hnyman added a commit that referenced this pull request Sep 2, 2015
Luci opkg/packages: Limit version string display to 26 chars
@hnyman hnyman merged commit b96d223 into openwrt:master Sep 2, 2015
@hnyman
Copy link
Contributor Author

hnyman commented Sep 2, 2015

I prefer to avoid the special characters, as they may break things for somebody, so I merged this in the original format.

@hnyman hnyman deleted the max-len-version branch September 2, 2015 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants