puppylinux-woof-CE / woof-CE

woof - the Puppy builder
GNU General Public License v2.0
393 stars 283 forks source link

0setup (for slacko) needs fixing #600

Closed 01micko closed 8 years ago

01micko commented 9 years ago

For Slacko 0setup didn't get any love from BK.. (I had to fix all the bugs myself and speed it up.. boy was it slow!)

There are a few issues.

Here is a short script that does that, and should easily integrate into 0setup (improvements welcome).

#!/bin/sh

OFF=`ls|grep 'Packages-slackware'|grep official$`
PAT=`ls|grep 'Packages-slackware'|grep patches$`

# each line in patches should exist in official
echo Please wait...
while read line
do 
    PKG=`echo "$line" | cut -d '|' -f2`
    # preserve deps (no deps in patches repo)
    DEPS=`grep "^${PKG}_[0-9]" $OFF | cut -d '|' -f9`
    DEPLINE=`echo "$line" | sed -e "s%t[a-z]z||%&${DEPS}%" -e "s%|${DEPS}%${DEPS}|%"`
    grep -q "^$PKG" $OFF && sed -i "s%^${PKG}_[0-9].*%$DEPLINE%" $OFF || continue
done < $PAT
echo done

Any other thoughts are welcome.

mavrothal commented 9 years ago

Will you stop the misleading titles? :D What about if multiple versions of a package we vercmp and get the latest? Can be a general approach.

01micko commented 9 years ago

vercmp would work, even without the integration of patches >> official, but for the sake of 3 seconds I think it should be integrated anyway. As said, then I can do away with the "updates" script.

mavrothal commented 9 years ago

Even if I still do not like the title :D (is 0setup -this is actually a woof script integrated to PPM to update the databases) 0setup has already some code (~ line 338 onwards) to deal with ubuntu|trisquel|debian|devuan updates. Why not do something similar for slacko?

mavrothal commented 9 years ago

Not that I mind your script. I was just hoping for a more general solution.

mavrothal commented 9 years ago

Is this still pending or we can close?

01micko commented 9 years ago

It's not fixed. I'll assign myself.

01micko commented 8 years ago

It might be a while until I get to this one. It does 'work' but it could be a lot better and cleaner.

mavrothal commented 8 years ago

Give me a good "test case" (ie puppy, test packages, test databases etc) and I may try to see if I can do anything about it, or can be added as such till we get the chance of a cleaner implementation.

01micko commented 8 years ago

In Packages-slackware64-14.1-official there is qt-4.8.5-x86_64-2

In Packages-slackware64-14.1-patches qt-4.8.7-x86_64-1_slack14.1

If you download my QupZilla-1.8.6-x86_64_slk600.pet it grabs both copies of qt - which is a ~30MB package.

mavrothal commented 8 years ago

Oh, boy. Is not 0setup that needs fixing. Actually "official" and "patches" can not be merged a la Ubuntu since I believe are downloaded from different directories (in contrast to Ubuntu that they are all in .../pool/...) so PPM must know which one is it. So is the dependencies.sh that needs fixing for skacko. This is also true for the packages downloaded from official, salix etc. Should we just give priority to the official if also present in the other repos? BTW if they are the same why do they exist in the other repos? If not the same, how do we know which is the "good" one?

mavrothal commented 8 years ago

I believe f78e384 fixes the issue prioritizing patches over official over salix and slacky. Though I do not have a good test case for slacky/salix. Please test so we can close this.

mavrothal commented 8 years ago

We are done here then

01micko commented 8 years ago

On my first actual test of this (even with faulty find_cat) seems working well :smile_cat:

Downloaded QupZilla from slacko repo and only deps needed are found and installed. Works.