-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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-app-package-manager: rename from luci-app-opkg and add APK support #7341
Conversation
Fix passing wrong option on opkg update/install. While starting to introduce support for APK in the opkg module, it was notice that --force-removal-of-dependent-packages was always passed even with update and install command. This was probably a leftover/oversight of old one. To fix this, limit this option only on remove and also update the acl.d to support single call to update or install. Fixes: 9b25031 ("luci-app-opkg: rework backend operations") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Does this mean all rpc calls or otherwise to |
Why |
standard naming convention ig. |
all rpc calls -> none OPKG is enough sensible to wrap it in helper script and we already minimize it to just opkg-call script hence it's all handled there, we don't call opkg directly. But would love some comments by jow confirming this. |
yes can be an idea but for sure the name needs to be changed to something more generic. |
+1 for a clear name that is also understandable by newcomers.
|
|
Or |
Add APK as detectable feature so that generic luci-app-pkg can detect OPKG or APK package manager. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Full names tend to serve better than ambiguous acronyms and abbreviations for first-timers. I like luci-app-package-manager |
246635b
to
e0c6c17
Compare
Rename luci-app-opkg to luci-app-package-manager and add APK support for it. The idea is to adapt APK to mimik OPKG output to require minimal changes to the luci app. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Actually this went pretty fast... Should be finished... Maybe the po file needs some bit of touchup... |
build/i18n-sync.sh applications/luci-app-package-manager |
Closed by bcd13b9 |
@@ -1133,7 +1146,7 @@ return view.extend({ | |||
E('h2', {}, _('Software')), | |||
|
|||
E('div', { 'class': 'cbi-map-descr' }, [ | |||
E('span', _('Install additional software and upgrade existing packages with opkg.')), | |||
E('span', _('Install additional software and upgrade existing packages with %s.').format(L.hasSystemFeature('apk') ? 'apk' : 'opkg')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to replace the opkg
in the existing translation keys to not lost them.
But I would rather simplify the sentence to Install additional software and upgrade existing packages
E('button', { 'class': 'btn cbi-button-action', 'click': handleUpload, 'disabled': isReadonlyView }, [ _('Upload Package…') ]), ' ', | ||
E('button', { 'class': 'btn cbi-button-neutral', 'click': handleConfig }, [ _('Configure opkg…') ]) | ||
E('button', { 'class': 'btn cbi-button-neutral', 'click': handleConfig }, [ _('Configure %s').format(L.hasSystemFeature('apk') ? 'apk' : 'opkg') ]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the APK also has a plain text config file?
For the opkg we have a window OPKG Configuration
with many options that shouldn't be same with APT.
Maybe this can be also simplified to just Configure…
@@ -0,0 +1,387 @@ | |||
msgid "" | |||
msgstr "Content-Type: text/plain; charset=UTF-8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(just a wish) It would be great to have a separate commit with the file rename and then with changing of keys to easily see the diff
|
||
#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:878 | ||
msgid "" | ||
"Below is a listing of the various configuration files used by <em>ipkg</em>. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So ipkg or opkg?
|
||
json_init | ||
json_add_int code $code | ||
[ -n "$stdout" ] && json_add_string stdout "$stdout" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can simplify this and always add the field even if empty i.e. just json_add_string stdout "$stdout"
fi | ||
;; | ||
install|update|remove) | ||
( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so big subshell, maybe it's possible to extract a function here?
I added some minor comments, you may ignore them since it's merged |
@stokito thanks for the comments I will take care of fixing them |
Yo @Ansuel can this get cherry-picked to 23 or is there stuff it requires from master? |
not at all... 23 doesn't even have working apk. Why should we backport? |
Ah, maybe I can just take the useful fix from #7340 to 23? |
@systemcrash yep that was why it was in a dedicated commit :D |
Rename luci-app-opkg to luci-app-ipkg and add APK support for it.
The idea is to adapt APK to mimic OPKG output to require minimal changes
to the luci app.
Signed-off-by: Christian Marangi ansuelsmth@gmail.com
@jow- @aparcar @hauke
TODO:
What works:
Depends on:
openwrt/openwrt#16759