Puppy Packages Updater Utility

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
linus.cl
Posts: 126
Joined: Wed 02 Apr 2014, 14:09
Location: Germany
Contact:

#16 Post by linus.cl »


User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#17 Post by mavrothal »

Take a look at /usr/bin/updates_mgr in the latest slacko. You may want to extend that to handle the puppy repos too.
The package version is the the 3rd field in package specs and *-installed-packages so

Code: Select all

{echo,cat,while} $LINE |  cut -f 3 -d '|'
will give you the package version and then you can use vercmp to compare them.
== [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] ==

linus.cl
Posts: 126
Joined: Wed 02 Apr 2014, 14:09
Location: Germany
Contact:

#18 Post by linus.cl »

I wrote some more code.
How can I continue?

https://github.com/linuscl/updatepuppy/ ... tepuppy.sh

Please write your tips here! :D :D

Thank you for all! :)

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#19 Post by 8-bit »

When I use Update in Puppy Package manager, It has to convert the lists to Puppy format for display. And in selecting repositories, old versions of Puppy are included in the update process. So... Can the Update script be rewritten to allow for exclusion of some of the repositories?
Having updates done for the 3 and 4 versions of Puppy seems to be overkill.

linus.cl
Posts: 126
Joined: Wed 02 Apr 2014, 14:09
Location: Germany
Contact:

#20 Post by linus.cl »

Thank you, 8-bit! :)
I've updated my script.

There's still a question:

How can I create a loop for this code block?
I'd like to check all applications in my /tmp/packages-install file.

Code: Select all

FIRST=$(head -n 1 /tmp/packages-install | cut -d\| -f 1)
version=$(head -n 1 /tmp/packages-install | cut -d\| -f 2)
ausgabegrep=$(grep -n -w $FIRST /tmp/packages-puppy-*)
file=$(echo $ausgabegrep | cut -d ':' -f 1)
if [ $file == "/tmp/packages-puppy-4" ]; then
filedirectory="/root/.packages/Packages-puppy-5-official"
elif [ $file == "/tmp/packages-puppy-5" ]; then
filedirectory="/root/.packages/Packages-puppy-slacko-official"
elif [ $file == "/tmp/packages-puppy-6" ]; then
filedirectory="/root/.packages/Packages-puppy-slacko14-official"
elif [ $file == "/tmp/packages-puppy-7" ]; then
filedirectory="/root/.packages/Packages-puppy-common-official"
elif [ $file == "/tmp/packages-puppy-8" ]; then
filedirectory="/root/.packages/Packages-puppy-noarch-official"
else
fehler=$(echo $ausgabegrep | cut -d ':' -f 3)
echo "File wasn't found"
fi
All lines must be checked.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#21 Post by mavrothal »

linus.cl wrote:How can I create a loop for this code block?
Time for some reading :wink:
You also may want to look at some PPM scripts too.
== [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] ==

linus.cl
Posts: 126
Joined: Wed 02 Apr 2014, 14:09
Location: Germany
Contact:

#22 Post by linus.cl »

There are nearly hundred lines of code now!

Look on Github!

How can I compare the versions?

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#23 Post by mavrothal »

linus.cl wrote: How can I compare the versions?
what versions?
you can see your commits in https://github.com/linuscl/updatepuppy/commits/master or locally with

Code: Select all

git show <commit hash>
to go to a "version" (ie previous commit) you can use git checkout or reset.
== [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] ==

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#24 Post by jamesbond »

linus.cl wrote:How can I compare the versions?
Use "git diff".
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

linus.cl
Posts: 126
Joined: Wed 02 Apr 2014, 14:09
Location: Germany
Contact:

#25 Post by linus.cl »

Thank you!
Attachments
updatepuppy.tar.gz
(1.28 KiB) Downloaded 118 times

linus.cl
Posts: 126
Joined: Wed 02 Apr 2014, 14:09
Location: Germany
Contact:

#26 Post by linus.cl »

Something goes wrong in my script... :(

Some packages will be installed twice..

Look at the source!

I hope you can find the error :shock:
Attachments
updatepuppy.tar.gz
(1.66 KiB) Downloaded 125 times

Post Reply