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:

Puppy Packages Updater Utility

#1 Post by linus.cl »

Hi!

I'm going to write a Puppy Update Manager on Github:
https://github.com/linuscl/updatepuppy

If somebody have time, he/she can help to create the program and become a contributor... :roll:

The manager is written in Python 3 and Tkinter.

Thank you!
Last edited by linus.cl on Tue 19 Aug 2014, 10:16, edited 1 time in total.

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

#2 Post by linus.cl »

I've deleted the repository.

I'll write a updatemanager in bash script.
I think this is better for Puppy Linux.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#3 Post by bigpup »

Slacko 5.7 has an Update Manager.

You may want to look at it to see how 01micko did it.

I think you are going to have problems making one that will work on different versions of Puppy.
The main problem will be:
What do you use as the source of the updates?

Slacko Puppy is based on stuff from Slackware 14, so it uses the Slackware repositories.

Precise Puppy uses stuff from Ubuntu.

Other Puppy versions use stuff from other repositories.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#4 Post by RSH »

linus.cl wrote:I've deleted the repository.

I'll write a updatemanager in bash script.
I think this is better for Puppy Linux.
Yes, Python sucks.

Java did never made any problems like Python does.

Have you seen this?
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

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

#5 Post by linus.cl »


gcmartin

Which of these is this thread themed?

#6 Post by gcmartin »

@RSH draws attention to a link, by @ASRI éducation, which can be of great help to distro developers and Puppy LInux in general. ===> http://murga-linux.com/puppy/viewtopic. ... 716#709716. This offer a "pull" options for system's users to acquire needed service from the developer-contributer community.

Questions
  1. Does this thread draw attention for a package manager?
  2. Does this thread draw attention, instead, for giving Puppy distro developers a common means for updating their distro system(s)?
    • If so, should the means be a "pull" updater or should it be a "push" updater?
    • If so, can the manner of alerting be something as simple as an icon barking it way onto the taskbar and disappearing after update(s) applies?
    And, how can this be moved forward for all developers to have understanding of benefit and have access commonly across new PUPPY Linux builds?
ALSO, although it does NOT havea thread dedicated to its purpose, @ETP has a method he has used in his BLUE distro where he provides service to its users.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#7 Post by bigpup »

linus.cl wrote:Repository for the manager:

http://distro.ibiblio.org/puppylinux/pe ... es-slacko/
This is not what is used for the Slacko 5.7 Updates Manager.
It gets information and updates from the Slackware 14 repository here:
ftp.osuosl.org/pub/slackware/slackware-14.0/patches/
It relies on updates to Slackware 14.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

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

#8 Post by linus.cl »

I'd like to create a better update manager for puppy.

Program structure:

1. Ask for a database update.
2. ( update all database )
3. read files: /root/.packages/user-installed-packages /root/.packages/woof-installed-packages
4. read database files: /root/.packages/Packages-*
5. compare the versions
6. show the packages with different versions
7. try to download them from the repos in this files:
/root/.packages/DISTRO_COMPAT_REPOS
/root/.packages/DISTRO_PET_REPOS
8. Install the downloaded packages with petget

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

#9 Post by mavrothal »

Sounds like a plan :D
Are you planing to use the existing PPM GUI/install infrastructure or start from scratch?
If you use PPM you may just want to couple this with the database update process/button and present a window with all the "upgradable" packages.
And then set a daemon to remind user for database update or better yet do it in the background with low priority (will very much slow down the machine otherwise).
Also consider that /root/.packages/Packages-* will contain multiple versions of a package not necessarily compatible with the current puppy and not necessarily versioned the same way.
Finally, I would rather avoid downloading any package without the user authorisation

PS: Though pointed a couple of times already, have you seen the Puppy Online Updater?
== [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:

#10 Post by linus.cl »

I've tried it yet.

The POU install only test packages! :cry: :cry: :x :cry:

The packages are also very old! ( 2013 ) :cry:
Attachments
Screenshot.png
(46.5 KiB) Downloaded 283 times

gcmartin

#11 Post by gcmartin »

Thanks @linus.cl for clarifying. What you are referring to might better be termed "Puppy Packages Updater Utility" which is a method to bring all packages from their original distro release levels to most current available. You may want to consider going to your first thread and renaming this thread to reflect your effort so that this is not confused with existing name for utilities in Puppyland which are aimed at allowing service related fixes to be applied to a distro

There have been known cases in the past when a distro developer has had to back-level package(s) because of either an incompatibility or its current release fails on a given kernel/library level. This is one area that your new utility may need to take into account as it can produce some system hardships if is "blanketly" applied.

Hope this is helpful info.
BTW: The author of POU has stated that he has a newer version soon to be posted. Seen here

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

#12 Post by linus.cl »

Thank you very much, gcmartin! :) :) :) :) :) :)

I've begun to write a bit code.

How can I continue?

Should I put this on Github?

@mavrothal : I'd like to use the infrastructure of the PPM.
Attachments
updatepuppy.tar.gz
(806 Bytes) Downloaded 173 times

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#13 Post by ASRI éducation »

linus.cl wrote:I've tried it yet.

The POU install only test packages! :cry: :cry: :x :cry:

The packages are also very old! ( 2013 ) :cry:
Hello linus.cl,
The package POU is old (v0.0.6). Now, I use v0.0.9. As soon as I have some free time, I put the latest version online.

Packages are old because it's been a few months since I use them.
Important Notes:
- These packages are empty, they are only examples to test POU without modifying the existing installation
- Each developer puplet must obviously create specific packages related to the version of the OS used

Cordialement,
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

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

#14 Post by linus.cl »

How can I compare the version of the packages in my bash script? :roll:

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#15 Post by RSH »

The version number is usually included in the .pet's file name like: gnewpet-6.5.pet.

Here is an Example of how to get date and time of a file.

Maybe this is of some help somehow.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

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.

Post Reply