Page 10 of 11

Some PPM versioning problems

Posted: Mon 27 Aug 2012, 12:44
by npierce
Forum member elroy seems to have run into a bug in the Puppy Package Manager:
elroy wrote:I have a problem with a .pet I’ve created. It requires a version of java that’s greater than or equal to a said version; upon install (while downloading - trying to locate missing deps) it insists on downloading an earlier version.
(See How to make my .pet download the correct Java version?)

Note that he seems to have two problems:

A. PPM offers to install a version that does not meet the specification.
B. PPM doesn't offer to install a version that does meet the specification.

When I have tried this it offers to install both. So I do not know if problem B is a bug or something else. The remainder of this post concerns itself only with problem A.

Looking into this, I have found a few problems with the version checking code in dependencies.sh. Although I am running Racy 5.2.2, I'm reporting it here (in the 5.3 thread) because I've tried the current suite of petget scripts from Woof2 and the same problems arise.

1. The major problem seems to be that, although findmissingpkgs.sh creates the /tmp/petget_missingpkgs_patterns_with_versioning file, which contains the versioning requirements of the missing dependency packages, dependencies.sh never reads it.

2. The format of the entries in the /tmp/petget_missingpkgs_patterns_with_versioning file differs from what the code in dependencies.sh expects. The format in the file looks like this:

Code: Select all

|udev|eq167-patched_t2-w5|
But the format expected by the code in dependencies.sh looks like this:

Code: Select all

|udev&eq167-patched_t2-w5|
3. Repositories often have multiple versions of a package. Before the versioning code was added, a single grep could find all versions in a repo's database. But with the added need to check versioning, a loop is needed to individually compare the versions of each dependency package with the requirements of the package being installed. (Without the loop strange things happen: like comparing the required version string with a string that is a concatenation of the multiple versions in the repo, separated by newline characters.)


Looking over the code, I have come up with a few ideas on how to deal with these problems. There are certainly other, perhaps better, ways, but I'll submit these ideas as suggestions.

I am attaching a revised dependencies.sh (based on the version that I grabbed from Woof2 fossil. I'm also attaching a diff file, but it is short, so I'll paste it here as well. I've split it up into three pieces and have added notes that I hope will explain my not too twisted logic. :)

Code: Select all

--- old/dependencies.sh	2012-08-25 17:49:22.955287915 -0400
+++ new/dependencies.sh	2012-08-25 21:39:16.027231096 -0400
@@ -129,9 +129,10 @@
 rm -f /tmp/petget_missing_dbentries* 2>/dev/null
 #for depPATTERN in `cat /tmp/petget_missingpkgs_patterns` #ex depPATTERN=|kdelibs| ex2: |kdelibs&gt2.3.6|
 #111107 01micko: fix for '||' messing things up...
-for depPATTERN in `grep '[a-zA-Z]' /tmp/petget_missingpkgs_patterns` #ex depPATTERN=|kdelibs| ex2: |kdelibs&gt2.3.6|. 120221 jemimah
+for depPATTERN in `grep '[a-zA-Z]' /tmp/petget_missingpkgs_patterns_with_versioning` #ex depPATTERN=|kdelibs| ex2: |kdelibs&gt2.3.6|. 120221 jemimah
 do
 
+ depPATTERN="`echo -n "$depPATTERN" | sed -e 's%|%\&%g' -e 's%^\&%|%' -e 's%\&$%|%'`"
  #110722 separate out any versioning... (see also findmissingpkgs.sh)
  xdepPATTERN="`echo -n "$depPATTERN" | sed -e 's%&.*%|%'`" #ex: changes |kdelibs&gt2.3.6| to |kdelibs|
  depVERSIONING="`echo -n "$depPATTERN" | grep -o '&.*' | tr -d '|'`" #ex: &gt2.3.6
One line was modified to read file with versioning requirements.

One line added to convert the format into what dependencies.sh expects.

Code: Select all

@@ -148,8 +149,12 @@
  do
   DBFILE="`basename $ONEREPODB`" #ex: Packages-slackware-12.2-official
   #find database entry(s) for this package...
-  DB_ENTRY="`cat $ONEREPODB | grep "$depPATTERN"`"
-  if [ "$DB_ENTRY" != "" ];then
+  FOUND_IN_DB=""
+  DB_ENTRIES="`cat $ONEREPODB | grep "$xdepPATTERN"`"
+  while [ -n "$DB_ENTRIES" ] ;
+  do
+   DB_ENTRY="`echo -n "$DB_ENTRIES" | head -n 1`"
+   DB_ENTRIES="`echo -n "$DB_ENTRIES" | tail -n +2`"
    DB_version="`echo -n "$DB_ENTRY" | cut -f 3 -d '|'`"
    if [ "$depVERSIONING" ];then #110722
     #110822 support chained operators...
The grep is now used to initialize a new variable, $DB_ENTRIES, which can have multiple entries, instead of $DB_ENTRY. The latter is now set to the individual entries as the while loop (that replaced the if block) progresses.

Another new variable, $FOUND_IN_DB, keeps track of whether or not a good package was found in this repo's database.

Code: Select all

@@ -164,7 +169,7 @@
     done
     if [ "$condFLG" = "good" ];then
      echo "$DB_ENTRY" >> /tmp/petget_missing_dbentries-${DBFILE}-2
-     break
+     FOUND_IN_DB="good"
     fi
     #if vercmp ${DB_version} ${VERTEST_OP} ${VERTEST_VAL};then
     # echo "$DB_ENTRY" >> /tmp/petget_missing_dbentries-${DBFILE}-2
@@ -172,8 +177,11 @@
     #fi
    else
     echo "$DB_ENTRY" >> /tmp/petget_missing_dbentries-${DBFILE}-2
-    break
+    FOUND_IN_DB="good"
    fi
+  done # DB_ENTRIES loop
+  if [ "$FOUND_IN_DB" = "good" ];then
+   break ;
   fi
  done
 done
Previously, when a good package was found, the code would break out of the loop that looped through the various repo databases. But now those breaks would break out of the new loop that loops through the various versions of the dependency package in the current database. We don't want to do that, since we want to provide a list of all compatible versions in the current database, so we just set a flag to indicate that at least one was found in the current data base. Then after that loop finishes we test it, and if it is good we break out of the loop that loops through the various repo databases.

- - - - - - - - - - - - - - - - - - - -

I hasten to add that I am not very familiar with the scripts in petget. Although my changes seem to be working okay in my preliminary testing, I am hoping that someone more familiar with the code (Hi Barry!) will look this over to ensure that it makes sense and doesn't add more bugs than it squashes. :)

EDIT, 2012-Sep-07: In fact, there was at least one bug in my code. By using petget_missingpkgs_patterns_with_versioning, I neglected any dependencies of the dependencies (and any dependencies of the dependencies of the dependencies, etc.) that were added to petget_missingpkgs_patterns by the code earlier in dependencies.sh. Thankfully, Barry noticed that and "re-implemented" the fix with code that works properly. (See Barry's blog: PPM: deps versioning re-fixed)

So the attached files are now obsolete. The latest dependencies.sh can be found in Woof2 fossil. [END OF EDIT]


Also, anyone testing this needs to be aware that just plugging my modified dependencies.sh into an old Puppy will probably not work. One also needs to get the current versions of the other files in /usr/local/petget/ from Woof2 fossil.

Posted: Fri 31 Aug 2012, 07:39
by backi
Hi everyone !
Please have a look at CPU frequence scaling tool .
Cpu scaling tool did not work for me .
Installed the one from Slacko . Now it does .

...and cant get my HP f300 printer working ....Cups does not find it .
Scanning works ...
Does anybody know something ...

Posted: Fri 31 Aug 2012, 15:15
by rcrsn51
backi wrote:...and cant get my HP f300 printer working ....Cups does not find it .Scanning works ....
What printer/scanner drivers have you installed?

Run the CUPS wizard and click on Administration > Find New Printers. What do you see?

Then click Manage Printers.

After a scanning session, some HP units need to be rebooted before they become visible again as printers.

Posted: Fri 31 Aug 2012, 18:21
by `f00
Possibly related to earlier post by Argolance on pg1, the "ugly font with strange characters" part?

Although I don't notice strange characters, there seems to be an issue with missing charsets. This stops treewm window manager from loading at all (a fresh compile to racy's kernel also fails) - curious, I tried many different fonts and even the 'fallback' fixed font fails (they all are "missing charsets").

Was about to give it up as simply not doable (for me, anyway). Then fvwm (version 262) gave me some specific details about the missing charsets when I tried some changes relating to font customization in the fvwm ui. A snippet from xerrs.log:

Missing font charsets: ISO8859-7, ISO8859-13, ISO8859-14, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0

Anyone else having this missing charsets issue? Or any light on how to solve would be appreciated as well.

Possibly not even a bug (and so ot here) for a 'vanilla' oem racy 5.3 .. but I generally mess that vanilla up fairly quickly.

____________
test on: i686 machine
processor - Pentium 3 @1GHz
RAM - 512M
vidcard0 - RV280 (aka ATI Radeon 9200), AGP
vidcard1 - not used, but also RV280 (switched off in BIOS - aka Radeon 9200SE), PCI (old-style)
soundcard - emu10k1 (aka Creative Audigy 2 ZS or SB0350)
boot/save method - liveCD multisession (cd-rw media)
limitations - no printer, no internet connection

___addenda 120901___

The 'light' came by way of Zigbert (an old topic somewhere in this forum), thanks.

'solved' by an untick in Quick Setup screencap link @157k
.. my mileage did vary on the recommendation, but it's all good on the road :)

Black screen when booting into either Slacko or Wary puppy 5

Posted: Sat 01 Sep 2012, 21:10
by tlc08071
I am trying to run puppy on an Acer Aspire 5734Z laptop. I downloaded and burnt to disk both puppy slacko and wary and tried to boot each up on my laptop but once either of them are completely booted all I get is a black screen. However, when I hit the power button to shut the system down just as the pc starts shutting down it looks like there are a few windows open on the desktop then the pc shuts down and thats it.
I do not have a hard drive cause the 1 that came with my laptop took a crap on me so I decided to use 1 of the puppy installs on my 32gb Microsd card from my phone till I can get a new hard drive. However, to free up the sd card so I can put it back in my phone I wanted to run puppy on a dvd but like I said, once fully booted all I get is a black screen till shut down which by that point its to late.
I do have puppy linux 5.2.8 running on the microsd card in my laptop and it runs good so far but wanted to install the newest linux. So you should know that i'm a complete noob when it comes to puppy linux os's. I still haven't figured out how to use the CMD commands so i'm pretty much lost when it comes to doing any kind of install to this OS.
Thank you anyone for any help you can give me.
TC

Posted: Sat 01 Sep 2012, 22:22
by Ray MK
Hi tlc08071

[url]http://www.google.com/search?q=Ac ... eamonkey-a[/url]

If above is the laptop refered to - then look at these:

Fatdog64, Lighthouse64 - 64bit iso’s - or
Exprimo, Saluki, Precise and Racy - 32bit iso’s.

I’d be very surprised if they don’t fit the bill.

HTH - very best regards - and welcome to the kennels - Ray

Re: Some PPM versioning problems

Posted: Sat 01 Sep 2012, 22:37
by BarryK
npierce wrote:Forum member elroy seems to have run into a bug in the Puppy Package Manager:
elroy wrote:I have a problem with a .pet I’ve created. It requires a version of java that’s greater than or equal to a said version; upon install (while downloading - trying to locate missing deps) it insists on downloading an earlier version.
(See How to make my .pet download the correct Java version?)

Note that he seems to have two problems:

A. PPM offers to install a version that does not meet the specification.
B. PPM doesn't offer to install a version that does meet the specification.

When I have tried this it offers to install both. So I do not know if problem B is a bug or something else. The remainder of this post concerns itself only with problem A.

Looking into this, I have found a few problems with the version checking code in dependencies.sh. Although I am running Racy 5.2.2, I'm reporting it here (in the 5.3 thread) because I've tried the current suite of petget scripts from Woof2 and the same problems arise.

1. The major problem seems to be that, although findmissingpkgs.sh creates the /tmp/petget_missingpkgs_patterns_with_versioning file, which contains the versioning requirements of the missing dependency packages, dependencies.sh never reads it.

2. The format of the entries in the /tmp/petget_missingpkgs_patterns_with_versioning file differs from what the code in dependencies.sh expects. The format in the file looks like this:

Code: Select all

|udev|eq167-patched_t2-w5|
But the format expected by the code in dependencies.sh looks like this:

Code: Select all

|udev&eq167-patched_t2-w5|
3. Repositories often have multiple versions of a package. Before the versioning code was added, a single grep could find all versions in a repo's database. But with the added need to check versioning, a loop is needed to individually compare the versions of each dependency package with the requirements of the package being installed. (Without the loop strange things happen: like comparing the required version string with a string that is a concatenation of the multiple versions in the repo, separated by newline characters.)


Looking over the code, I have come up with a few ideas on how to deal with these problems. There are certainly other, perhaps better, ways, but I'll submit these ideas as suggestions.

I am attaching a revised dependencies.sh (based on the version that I grabbed from Woof2 fossil. I'm also attaching a diff file, but it is short, so I'll paste it here as well. I've split it up into three pieces and have added notes that I hope will explain my not too twisted logic. :)

Code: Select all

--- old/dependencies.sh	2012-08-25 17:49:22.955287915 -0400
+++ new/dependencies.sh	2012-08-25 21:39:16.027231096 -0400
@@ -129,9 +129,10 @@
 rm -f /tmp/petget_missing_dbentries* 2>/dev/null
 #for depPATTERN in `cat /tmp/petget_missingpkgs_patterns` #ex depPATTERN=|kdelibs| ex2: |kdelibs&gt2.3.6|
 #111107 01micko: fix for '||' messing things up...
-for depPATTERN in `grep '[a-zA-Z]' /tmp/petget_missingpkgs_patterns` #ex depPATTERN=|kdelibs| ex2: |kdelibs&gt2.3.6|. 120221 jemimah
+for depPATTERN in `grep '[a-zA-Z]' /tmp/petget_missingpkgs_patterns_with_versioning` #ex depPATTERN=|kdelibs| ex2: |kdelibs&gt2.3.6|. 120221 jemimah
 do
 
+ depPATTERN="`echo -n "$depPATTERN" | sed -e 's%|%\&%g' -e 's%^\&%|%' -e 's%\&$%|%'`"
  #110722 separate out any versioning... (see also findmissingpkgs.sh)
  xdepPATTERN="`echo -n "$depPATTERN" | sed -e 's%&.*%|%'`" #ex: changes |kdelibs&gt2.3.6| to |kdelibs|
  depVERSIONING="`echo -n "$depPATTERN" | grep -o '&.*' | tr -d '|'`" #ex: &gt2.3.6
One line was modified to read file with versioning requirements.

One line added to convert the format into what dependencies.sh expects.

Code: Select all

@@ -148,8 +149,12 @@
  do
   DBFILE="`basename $ONEREPODB`" #ex: Packages-slackware-12.2-official
   #find database entry(s) for this package...
-  DB_ENTRY="`cat $ONEREPODB | grep "$depPATTERN"`"
-  if [ "$DB_ENTRY" != "" ];then
+  FOUND_IN_DB=""
+  DB_ENTRIES="`cat $ONEREPODB | grep "$xdepPATTERN"`"
+  while [ -n "$DB_ENTRIES" ] ;
+  do
+   DB_ENTRY="`echo -n "$DB_ENTRIES" | head -n 1`"
+   DB_ENTRIES="`echo -n "$DB_ENTRIES" | tail -n +2`"
    DB_version="`echo -n "$DB_ENTRY" | cut -f 3 -d '|'`"
    if [ "$depVERSIONING" ];then #110722
     #110822 support chained operators...
The grep is now used to initialize a new variable, $DB_ENTRIES, which can have multiple entries, instead of $DB_ENTRY. The latter is now set to the individual entries as the while loop (that replaced the if block) progresses.

Another new variable, $FOUND_IN_DB, keeps track of whether or not a good package was found in this repo's database.

Code: Select all

@@ -164,7 +169,7 @@
     done
     if [ "$condFLG" = "good" ];then
      echo "$DB_ENTRY" >> /tmp/petget_missing_dbentries-${DBFILE}-2
-     break
+     FOUND_IN_DB="good"
     fi
     #if vercmp ${DB_version} ${VERTEST_OP} ${VERTEST_VAL};then
     # echo "$DB_ENTRY" >> /tmp/petget_missing_dbentries-${DBFILE}-2
@@ -172,8 +177,11 @@
     #fi
    else
     echo "$DB_ENTRY" >> /tmp/petget_missing_dbentries-${DBFILE}-2
-    break
+    FOUND_IN_DB="good"
    fi
+  done # DB_ENTRIES loop
+  if [ "$FOUND_IN_DB" = "good" ];then
+   break ;
   fi
  done
 done
Previously, when a good package was found, the code would break out of the loop that looped through the various repo databases. But now those breaks would break out of the new loop that loops through the various versions of the dependency package in the current database. We don't want to do that, since we want to provide a list of all compatible versions in the current database, so we just set a flag to indicate that at least one was found in the current data base. Then after that loop finishes we test it, and if it is good we break out of the loop that loops through the various repo databases.

- - - - - - - - - - - - - - - - - - - -

I hasten to add that I am not very familiar with the scripts in petget. Although my changes seem to be working okay in my preliminary testing, I am hoping that someone more familiar with the code (Hi Barry!) will look this over to ensure that it makes sense and doesn't add more bugs than it squashes. :)

Also, anyone testing this needs to be aware that just plugging my modified dependencies.sh into an old Puppy will probably not work. One also needs to get the current versions of the other files in /usr/local/petget/ from Woof2 fossil.
Yes, this is a good solution, now implemented in Woof, so will be in future puppies:

http://bkhome.org/blog/?viewDetailed=02978

Re: Some PPM versioning problems

Posted: Sun 02 Sep 2012, 03:48
by npierce
Thanks Barry. Thanks for taking the time to look at this and get it into Woof, especially since I read that you are currently on holiday.

cups does not find my printer

Posted: Mon 03 Sep 2012, 14:31
by backi
Hi rcrsn51 !
Thanks for your help with printing problems .
Did what you advised me to do . Now working .
What was wrong ? ... instead of going to " Administration > find new printer "
i went to "Administration > add new printer " which did not work .
The HP drivers i installed are some from lucid pup.......scanner to .
Everything is working fine now .
Thanks for your help .

Posted: Tue 04 Sep 2012, 01:43
by elroy
npierce, I just wanted to thank you for the work you did in following up on the ppm issue. Much appreciated.

Posted: Fri 07 Sep 2012, 15:46
by npierce
elroy, you're welcome. As it turned out, my suggested fix had at least one problem with it. But Barry looked at it and came up with a better fix that works properly. (See Barry's blog: PPM: deps versioning re-fixed)

Posted: Sun 23 Sep 2012, 07:03
by tommy
I installed Wary 5.3 and devx on a PIII 700MHz 512MB ram 512 swap BX chipset pc. I'm currently working at an italian translation using Momanager. No .pets installed, just devx + my savefile. I did some translations, made a .pet (partial, only to back-up), shut down OK.
Everything went well until the time when I rebooted my pc (third or fourth day of translations). X failed to start. On console I typed:
fdisk -l
and got: unable to look in /proc/partitions : file doesn't exist
or similar.
df also gave me an error message complaining at some df_FULL-something.
I tried xorgwizard + xwin, X started BUT: many programs didn't work ( terminal; wizards; jwm tray icons, desktop drive icons etc.).
Rebooting with pfix=fschk didn't solve the problem.
Then I booted Akita, mounted wary savefile, backed-up momanager translations and deleted the savefile.
I started over, new savefile, no .pets, only devx sfs. To see my translations with momanager I had to install my language .pet created before. After installation JWM and rox acted weird (windows borders were flat gray and became red when focused; JWM menu also was flat gray, and tray bar had disappeared. The menus and other things got well translated, though! Restarting X fixed this. I Worked at Momanager, then created new partial .pet, rebooted and:
same issue that I had before: no X, no /proc/partitions, JWM screwed up etc.

I think I broke something when I translated menu entries and / or scripts, or is this a momanager bug?
How to check?
I can upload my language .pet for the geeks, if interested.

Ps: the first time things got screwed up I thought: 'I told momanager to translate initrd.gz scripts and something got bad'.
So when I started over with new savefile I left initrd.gz in english, with same bad result.

Thank you for your attention!

On saving to a personal file

Posted: Mon 01 Oct 2012, 14:16
by dionicio
If you save to a personal file:
-say in /dev/sda3-
on next reboot that partition become /mnt/home.

Nowadays, /dev/sda3 continues to show
at bottom of the desktop.

Do not use that icon.

If you use it then puppy will create
a new dir INTO your personal file.
Yeah, that 512M file will get quickly filled
with your stuff.

/dev/sda3 should be accessed
through /mnt/home, always.

:)

Asking about arabic support

Posted: Tue 02 Oct 2012, 08:14
by ahmed742163
Does it support Arabic language?

Mplayer error skin

Posted: Thu 25 Oct 2012, 23:16
by walter leonardo
The edges are blue. How to solve this problem?

Posted: Sun 11 Nov 2012, 19:11
by snayak
Hi All,

Does chmod work in wary 530?

Code: Select all

/mnt/sda5#mkdir pp
/mnt/sda5#ls -ltr
total 5627664
drwxr-xr-x 2 root root       8192 2012-11-12 00:36 pp
/mnt/sda5#chmod -v 777 pp
mode of `pp' changed to 0777 (rwxrwxrwx)
/mnt/sda5#ls -ltr
total 5627664
drwxr-xr-x 2 root root       8192 2012-11-12 00:36 pp
/mnt/sda5#
Also found chown not working. I had tried to do chown spot:spot to a directory, but failed!

Please help.

Sincerely,
Srinivas Nayak

Posted: Sun 11 Nov 2012, 20:15
by rcrsn51
With what filesystem is your sda5 formatted - ext, fat32, ntfs?

Posted: Sun 11 Nov 2012, 20:58
by mcewanw
Yes, you say in another thread that your sda5 is fat filesystem. That will be the problem here.

Posted: Sun 11 Nov 2012, 21:23
by snayak
Oh, that vfat filesystem is root of all evil?

Black desktop?

Posted: Tue 27 Nov 2012, 11:01
by Gonzalo_VC
Friends,
my Wary 5.3 installation is getting crazy: the desktop becomes all black (no icons, no wallpaper). Why is that? Is is Xorg?? Should I save a session when it's all visible? Otherwise I have to click here and there to make it all come back :-/