PPM2
- rg66
- Posts: 1158
- Joined: Mon 23 Jul 2012, 05:53
- Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!
Well, I got it to work how I wanted.
Any idea how to gettext "<default>'`cat /usr/local/petget/last_mode`'</default>" everything I've tried has failed.
Edit: /usr/local/petget/last_mode would say: Auto mode, as an example.
Any idea how to gettext "<default>'`cat /usr/local/petget/last_mode`'</default>" everything I've tried has failed.
Edit: /usr/local/petget/last_mode would say: Auto mode, as an example.
Last edited by rg66 on Wed 18 Mar 2015, 11:34, edited 1 time in total.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]
[url=http://smokey01.com/rg66/]X-series repo[/url]
I probably miss something but there is no text to gettext here. Just a command and a file name.rg66 wrote:Well, I got it to work how I wanted.
Any idea how to gettext "<default>'`cat /usr/local/petget/last_mode`'</default>" everything I've tried has failed.
Maybe you want to post the entire approach here or maybe in a gettext thread to understand what exactly you are trying to gettext (the content of the last_mode file?)
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
- rg66
- Posts: 1158
- Joined: Mon 23 Jul 2012, 05:53
- Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!
Ok, here's what I'm talking about
<comboboxtext width-request="150" space-expand="false" space-fill="false">
<variable>INSTALL_MODE</variable>
<default>'`cat /usr/local/petget/last_mode`'</default>
<item>'$(gettext 'Auto install')'</item>
<item>'$(gettext 'Step by step installation (classic mode)')'</item>
<item>'$(gettext 'Download packages (no install)')'</item>
<item>'$(gettext 'Download all (packages and dependencies)')'</item>
<action>change_mode</action>
</comboboxtext>
/usr/local/petget/last_mode would read "Auto install" (without quotes) as an example, which I assume would need to be gettexted.
<comboboxtext width-request="150" space-expand="false" space-fill="false">
<variable>INSTALL_MODE</variable>
<default>'`cat /usr/local/petget/last_mode`'</default>
<item>'$(gettext 'Auto install')'</item>
<item>'$(gettext 'Step by step installation (classic mode)')'</item>
<item>'$(gettext 'Download packages (no install)')'</item>
<item>'$(gettext 'Download all (packages and dependencies)')'</item>
<action>change_mode</action>
</comboboxtext>
/usr/local/petget/last_mode would read "Auto install" (without quotes) as an example, which I assume would need to be gettexted.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]
[url=http://smokey01.com/rg66/]X-series repo[/url]
Not in puppy right now but did you try
?
You may want to try the gtkdialog thread if this fails.
Code: Select all
<default>'$(gettext "$(cat /usr/local/petget/last_mode)")'</default>
You may want to try the gtkdialog thread if this fails.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
- rg66
- Posts: 1158
- Joined: Mon 23 Jul 2012, 05:53
- Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!
That works, thanks. Probably the only thing I didn't try.mavrothal wrote:Not in puppy right now but did you try?Code: Select all
<default>'$(gettext "$(cat /usr/local/petget/last_mode)")'</default>
You may want to try the gtkdialog thread if this fails.
I've uploaded patches for pkg_chooser.sh and configure.sh if anyone wants them. I'll assume that ui_Classic is no longer needed after.
Edit: New patches below
Last edited by rg66 on Thu 19 Mar 2015, 08:23, edited 1 time in total.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]
[url=http://smokey01.com/rg66/]X-series repo[/url]
Nice.rg66 wrote:That works, thanks. Probably the only thing I didn't try.mavrothal wrote:Not in puppy right now but did you try?Code: Select all
<default>'$(gettext "$(cat /usr/local/petget/last_mode)")'</default>
You may want to try the gtkdialog thread if this fails.
I've uploaded patches for pkg_chooser.sh and configure.sh if anyone wants them. I'll assume that ui_Classic is no longer needed after.
You may also want to change line 93 of pkg_chooser.sh as it currently defaults to install_pets_quietly and will enforce size recalculation every time if you are in a different mode (and probably other issues), to read last_mode and set the flag accordingly.
Also you may want to keep the variable in /var/local/petget with the rest of PPM variables/options
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
- rg66
- Posts: 1158
- Joined: Mon 23 Jul 2012, 05:53
- Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!
Ok, I changed path to /var/local/petget but am not too sure what to do with line 93. I'm assuming that line is for Auto install so changed it to:mavrothal wrote:Nice.
You may also want to change line 93 of pkg_chooser.sh as it currently defaults to install_pets_quietly and will enforce size recalculation every time if you are in a different mode (and probably other issues), to read last_mode and set the flag accordingly.
Also you may want to keep the variable in /var/local/petget with the rest of PPM variables/options
Code: Select all
[ "`cat /var/local/petget/last_mode`" = "Auto install" ] && touch /tmp/install_pets_quietly
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]
[url=http://smokey01.com/rg66/]X-series repo[/url]
Nice work Mav (and Ziggy)!
Works pretty good in slacko64.
I did make a patch, if interested, to partly address Mochimoppel's issue.
Historically, petget basically worked unattended for installation of packages when X was not running, albeit with a bug concerning the display not running! (Which incidentally was safe to ignore).
This patch adds a 'developer' flag to /var/local/petget, well it doesn't add the flag, a dev adds it her/his self (which, if accepted, should merely be documented in the html docs I suppose).
I'd just like to see thoughts for or against, additions/subtractions (if any) also..
Mochimoppel, you may have ideas for more?
Works pretty good in slacko64.
I did make a patch, if interested, to partly address Mochimoppel's issue.
Historically, petget basically worked unattended for installation of packages when X was not running, albeit with a bug concerning the display not running! (Which incidentally was safe to ignore).
This patch adds a 'developer' flag to /var/local/petget, well it doesn't add the flag, a dev adds it her/his self (which, if accepted, should merely be documented in the html docs I suppose).
I'd just like to see thoughts for or against, additions/subtractions (if any) also..
Mochimoppel, you may have ideas for more?
- Attachments
-
- petget-developer.patch.gz
- (1.04 KiB) Downloaded 231 times
Puppy Linux Blog - contact me for access
Glad to see you back Mick
Regarding the patch is less messy to change
Code: Select all
[ ! "$DISPLAY" ] && touch /tmp/install_quietly
Code: Select all
[ -f /var/local/petget/developer ] && touch /tmp/install_quietly
However, as I explained before, providing the infrastructure for an "under the radar" (visible or not but without user confirmation) installation in a system that runs by default as root and never asks for a password to change any system file is a major liability.
The simplest social hacking could take over the system (not to mention anything on server-side) ...
I could (barely) live with it, if the flag was deleted by petget and resetting would demand every time a password, that should be different than the default "woofwoof". But then this would block scripted use of petget (which is actually the idea).
As ASRI éducation said earlier, for a developer is fairly easy to script quite package installation... Is a good first step for the "developer's mode"
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
- rg66
- Posts: 1158
- Joined: Mon 23 Jul 2012, 05:53
- Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!
I've changed line 93 to this:
That should put the /tmp file there for each mode on default.
Code: Select all
LAST_MODE="`cat /var/local/petget/last_mode`"
[ "$LAST_MODE" = "Auto install" ] && touch /tmp/install_pets_quietly
[ "$LAST_MODE" = "Download packages (no install)" ] && touch /tmp/download_only_pet_quietly
[ "$LAST_MODE" = "Download all (packages and dependencies)" ] && touch /tmp/download_pets_quietly
[ "$LAST_MODE" = "Step by step installation (classic mode)" ] && touch /tmp/install_classic
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]
[url=http://smokey01.com/rg66/]X-series repo[/url]
That should do it.rg66 wrote:I've changed line 93 to this:
That should put the /tmp file there for each mode on default.Code: Select all
LAST_MODE="`cat /var/local/petget/last_mode`" [ "$LAST_MODE" = "Auto install" ] && touch /tmp/install_pets_quietly [ "$LAST_MODE" = "Download packages (no install)" ] && touch /tmp/download_only_pet_quietly [ "$LAST_MODE" = "Download all (packages and dependencies)" ] && touch /tmp/download_pets_quietly [ "$LAST_MODE" = "Step by step installation (classic mode)" ] && touch /tmp/install_classic
You may want to post a revised patch
BTW, I spend too much time on PPM already and do not intend to make any changes other than bug fixes.
But I really have no issue if other woof-CE members or puppy builders want to change PPM to suit their needs/preferences.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
- rg66
- Posts: 1158
- Joined: Mon 23 Jul 2012, 05:53
- Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!
Patches are below if anyone else prefers these mods.mavrothal wrote:That should do it.
You may want to post a revised patch
BTW, I spend too much time on PPM already and do not intend to make any changes other than bug fixes.
But I really have no issue if other woof-CE members or puppy builders want to change PPM to suit their needs/preferences.
I did this for personal preference only and in no way intended or expected the changes to be added to PPM2. Thanks for your help, I really appreciate it.
- Attachments
-
- pkg_chooser_last_mode.patch.gz
- Change PPM2 install mode to default to last used
- (1.05 KiB) Downloaded 271 times
-
- configure_last_mode.patch.gz
- Remove "Use traditional, non-auto, user interface" from options
- (435 Bytes) Downloaded 206 times
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]
[url=http://smokey01.com/rg66/]X-series repo[/url]
I can not reproduce this.john009 wrote:I selected "Do not show the terminal with ppm actions" and after clicking update nothing happened ,so I closed it and restarted ppm again and saw that all the repos(ubuntu) have been deselected ;and can't seem to reselect the repo's???.help please...
Selected configure.
Went to options tab.
clicked do not show terminal actions
went to update tab
clicked update now
the yellow terminal came up asking to update the repos
closed the terminal (no updates)
Clicked "OK" on the configure window.
PPM restarted with everything OK.
Did you do something different?
Please be as precise as possible so we may figure out if there is any issue.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
I can not reproduce this.
Selected configure.
Went to options tab.
clicked do not show terminal actions
went to update tab
clicked update now
the yellow terminal came up asking to update the repos
closed the terminal (no updates)
Clicked "OK" on the configure window.
PPM restarted with everything OK.
1-5-same..
6th step-no yellow terminal,nothing happened...,waited for some time,closed ppm and restarted ppm..
repo's were deselected..could not reselect them and no updates..
These are the steps I did ,didn't do anything else ..
As I described above, I can not reproduce it.john009 wrote:I can not reproduce this.
Selected configure.
Went to options tab.
clicked do not show terminal actions
went to update tab
clicked update now
the yellow terminal came up asking to update the repos
closed the terminal (no updates)
Clicked "OK" on the configure window.
PPM restarted with everything OK.
1-5-same..
6th step-no yellow terminal,nothing happened...,waited for some time,closed ppm and restarted ppm..
repo's were deselected..could not reselect them and no updates..
These are the steps I did ,didn't do anything else ..
As a matter of fact the "do not show terminal activity" option and the yellow update terminal, are totally unrelated. The update process itself is performed by the 0setup script that was never changed in PPM2.
You can just run
Code: Select all
rxvt -bg yellow -title "download databases" -e /usr/local/petget/0setup
To make the databases disappear you have to start the update process (by opening the "yellow" terminal and pressing enter) and then interrupt it before it finishes. Any chance that the terminal open behind some other window or minimized or something and you missed it?
Is it happening again if you repeat the process? ie the "yellow" terminal never appears?
Anyway, if the Packages-puppy-* files are missing from /root/.packages you can copy the files from the main sfs (/initrd/pup_ro2/root/.packages) and try the update again.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
Just came across this, looks nice but 5 faults for you to start with.
Working with 5.5.1. and todays d/l. ppm_auto.2.pet
Open to full screen:
1- go up to the 'Packages to Install' - it's marked out with two horizontal lines - pass over these with the mouse and the lines disapear, even though you've done nothing.
2- Description doesn't / won't extend to the right, although the size for 'Repository' is now enormous and a number of items under Description extend beyond it's field boundary.
3- When opening it shows for the first repository of your 'ticked set', not the last one you left it on when last closing PPM2.
4- When restarting after closing it reopens as a small window, even if you closed it as a full window.
5- When installing it, it says it's being installed to Utility, not Setup where PPM lives. Confusing to new users and those new to adding packages.
Sorry, but going back to the old one, i'll check back later though when you have things sorted out
} ain't bugs fun
Working with 5.5.1. and todays d/l. ppm_auto.2.pet
Open to full screen:
1- go up to the 'Packages to Install' - it's marked out with two horizontal lines - pass over these with the mouse and the lines disapear, even though you've done nothing.
2- Description doesn't / won't extend to the right, although the size for 'Repository' is now enormous and a number of items under Description extend beyond it's field boundary.
3- When opening it shows for the first repository of your 'ticked set', not the last one you left it on when last closing PPM2.
4- When restarting after closing it reopens as a small window, even if you closed it as a full window.
5- When installing it, it says it's being installed to Utility, not Setup where PPM lives. Confusing to new users and those new to adding packages.
Sorry, but going back to the old one, i'll check back later though when you have things sorted out
} ain't bugs fun
Thanks for testing, particularly in such an old build.scsijon wrote:Working with 5.5.1.
Is 5.5.1 what?
I do not remember having seen that. And I can not reproduce it. Maybe is puppy/hardware specific. Also is not clear to me what "two horizontal lines" means. Maybe a screeny will help.scsijon wrote:1- go up to the 'Packages to Install' - it's marked out with two horizontal lines - pass over these with the mouse and the lines disapear, even though you've done nothing.
Sorry. I'm the "visual" type A screeny would be again helpful here but I can not see any truncation of the description field (if that's what you mean). If you suggest that the description window should auto-resize at the expense (up to a limit) of the repository window, that is a design limitation. The 2 windows have a fixed width ratio. Not sure if gtkdialog can do what you suggest though, and I'm certainly sure that I can not. Have you seen that in any other gtkdialog app? We welcome pointers or better yet, patches (or bug Zigbert )scsijon wrote:2- Description doesn't / won't extend to the right, although the size for 'Repository' is now enormous and a number of items under Description extend beyond it's field boundary.
This is not what I see. Besides, if you open the configure window, change the "ticked" repositories and press OK, PPM will automatically restart and have the new set, which remains through restarts till further change. Isn't it what you get? If you change the repos and close the window without pressing OK, will (correctly) be considered as a cancelled operation and will be discarded.scsijon wrote:3- When opening it shows for the first repository of your 'ticked set', not the last one you left it on when last closing PPM2.
PPM design (original or new) does not include an "rc" file, where current UI variables could be written. So it always opens to the configured settings. "Full screen" is not a configurable option at this point.scsijon wrote:4- When restarting after closing it reopens as a small window, even if you closed it as a full window.
Maybe PPM3 should use an "rc" file.
PPM in general assigns things to "Utilities if there is not a *.desktop entry to specify otherwise. The PPM2 pet does not have a desktop entry since this file is not changed from the original. Maybe I'll add one. But I wouldn't wary about that as PPM suppose to be built-in and not an installable package. It is already in woof-CE.scsijon wrote:5- When installing it, it says it's being installed to Utility, not Setup where PPM lives. Confusing to new users and those new to adding packages.
This may take a really long time... But which of the above is a feature that the old one has?scsijon wrote:Sorry, but going back to the old one, i'll check back later though when you have things sorted out
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==