You are not logged in.

#1 2005-04-05 09:08:57

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Pacmenu (with DB and Rollback)

This contribution is a continuation of pacmenu-1.4 by Tigger.
http://bbs.archlinux.org/viewtopic.php?t=9465

Thanks to Tigger's well done codes, to replace pacmenu's flat files with database (sqlite) was interesting. Also thanks to phrakture (sed help), kpiche (description detect codes), cactus (bug fixer) and others in "General Programming Forum":
http://bbs.archlinux.org/viewtopic.php?t=11193

Pacmenu-2.0 is ready and uploaded.

Apr 5, 2005 (ver. 2.0)
-Replaced flat files with sqlite database.
-Added package descriptions.
-New option: "View new in Arch repos".
-Information boxes what's happening.
-Fixed few minor bugs.

Home:
http://user-contributions.org/projects/pacmenu/
Screenshots:
http://user-contributions.org/projects/ … reenshots/
Download (latest upgrade: version 2.2)
http://user-contributions.org/projects/pacmenu/pkg/

Database:
sqlite2
I wanted to use sqlite3 but couldn't find any tool/manager except for sqlite2. Once the project is "ready" may change to 3. Haven't checked what's the difference.


Markku

Offline

#2 2005-04-05 09:23:00

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Pacmenu (with DB and Rollback)

mmm..I like screenshots.
*leers at monitor*

Nice work.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-04-05 09:26:42

topito
Member
From: Catalonia
Registered: 2004-03-25
Posts: 118
Website

Re: Pacmenu (with DB and Rollback)

mmm, it seems ok, im trying it but... does the "Downloading current name and category list..." take forever? 15 minuts and nothing happens... yikes

Offline

#4 2005-04-05 09:41:42

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: Pacmenu (with DB and Rollback)

Should be less than 2 minutes. Once it stucked during my testings, did a second run and worked.


Markku

Offline

#5 2005-04-05 10:11:33

topito
Member
From: Catalonia
Registered: 2004-03-25
Posts: 118
Website

Re: Pacmenu (with DB and Rollback)

I have tried 3 times...

Offline

#6 2005-04-05 10:49:58

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: Pacmenu (with DB and Rollback)

topito wrote:

"Downloading current name and category list..." take forever? 15 minuts and nothing happens... yikes

Your problem seems to not able to download. Try this in root:

wget ftp://ftp.archlinux.org/current/os/i686/setup/packages.txt

Markku

Offline

#7 2005-04-05 12:06:32

puntmuts
Member
Registered: 2005-02-22
Posts: 138

Re: Pacmenu (with DB and Rollback)

Setting the passive_ftp option to on in /etc/wgetrc worked for me big_smile


Out / Gone
Mirgrating all my machines off ArchLinux . No longer part of the ArchLinux community / users .
Done. Goodbye.

Offline

#8 2005-04-05 12:42:00

topito
Member
From: Catalonia
Registered: 2004-03-25
Posts: 118
Website

Re: Pacmenu (with DB and Rollback)

puntmuts wrote:

Setting the passive_ftp option to on in /etc/wgetrc worked for me big_smile

Yeps, passive ftp was the problem  lol

now it's working, good job  wink

Offline

#9 2005-04-05 16:21:25

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Pacmenu (with DB and Rollback)

I keep getting category template file does not exist every time I restart it. It asks me if I want to download it now then takes me to the regular menu. I updated the sqlite db and did a -sy and couple times but I still get the same error messages. I didn't see a man page on it so I'm a little lost what to do.

BTW, nice job! Much faster than before.

Offline

#10 2005-04-05 16:41:18

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: Pacmenu (with DB and Rollback)

Did you have the earlier pacmenu-1.4 installed? Remove everything, and make fresh install.

File list of 2.0:
etc/
etc/pacmenu/
etc/pacmenu/base.sql
etc/pacmenu/install.new
etc/pacmenu/package.new
etc/pacmenu/pacmenu.cat
etc/pacmenu/pacmenu.db
etc/pacmenu/version
usr/
usr/bin/
usr/bin/pacmenu
usr/sbin/
usr/sbin/pkg2db

PS.
Got one pm asking what's "View new in Arch repos". This is not "-Syu" (upgrades) but new names of packages in repos. It shows what're totally new. It keeps adding until you reset.


Markku

Offline

#11 2005-04-05 16:42:58

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Pacmenu (with DB and Rollback)

rasat wrote:

This is ... new names of packages in repos. Its shows what're totally new.

Nice !

Offline

#12 2005-04-05 18:02:27

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: Pacmenu (with DB and Rollback)

does you pacmenu install packages via pacman? if so it would be nice if you could specify another frontend (like srcpac).
don't the db files belong in var? (just a question) as far as I know only configuration files get into /etc

Offline

#13 2005-04-05 18:05:55

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Pacmenu (with DB and Rollback)

cmp wrote:

does you pacmenu install packages via pacman? if so it would be nice if you could specify another frontend (like srcpac).
don't the db files belong in var? (just a question) as far as I know only configuration files get into /etc

i think ld.conf puts it's cache and db in var... and doesn't updatedb as well?

I still agree - put it in /var

Offline

#14 2005-04-05 20:31:31

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Pacmenu (with DB and Rollback)

rasat wrote:

Did you have the earlier pacmenu-1.4 installed? Remove everything, and make fresh install.

Thanks, that worked.  smile

Offline

#15 2005-04-06 02:39:53

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: Pacmenu (with DB and Rollback)

cmp wrote:

does you pacmenu install packages via pacman? if so it would be nice if you could specify another frontend (like srcpac).

I don't understand your suggestion, "another frontend". Pacman does the actul work and sqlite provides the category and group names, descriptions, and marks package names what are new in repos.

don't the db files belong in var? (just a question) as far as I know only configuration files get into /etc

Ok, these will go in /var/lib/pacmenu/
package.new
pacmenu.db


Markku

Offline

#16 2005-04-06 02:57:01

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Pacmenu (with DB and Rollback)

Rasat, I think he meant "backend" instead of frontend. By talking about srcpac, I assume he meant to inquire if pacmenu can be used with srcpac instead of pacman--To incorporate the building of certain packages with custom flags from source.

I imagine that it does not currently.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#17 2005-04-06 10:07:17

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: Pacmenu (with DB and Rollback)

thanks, I exactly meant this.

Offline

#18 2005-04-06 11:26:06

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: Pacmenu (with DB and Rollback)

I haven't tried srcpac, don't know how it works. When I get time, will take a look.


Markku

Offline

#19 2005-04-06 11:37:04

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Pacmenu (with DB and Rollback)

i'm impressed with this

[plug]
LOOK everyone at how great the "new in repo" function is!
[/plug]

Offline

#20 2005-04-06 16:02:01

Dreameen
Member
From: Poland
Registered: 2004-09-06
Posts: 252

Re: Pacmenu (with DB and Rollback)

How often should I run 'REFRESH'?

Offline

#21 2005-04-06 16:27:12

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: Pacmenu (with DB and Rollback)

Dreameen wrote:

How often should I run 'REFRESH'?

The database needs only to refresh when there are totally new packages in repos. If not refreshed, the package version numbers get outdated when viewing/installing with "Install new packages by alphabetical menu", but not a big deal.


Markku

Offline

#22 2005-04-07 05:11:15

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: Pacmenu (with DB and Rollback)

In 2.1 there will be no need for refresh. The database will be updated after each -Sy/Syu.


Markku

Offline

#23 2005-04-07 11:38:46

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Pacmenu (with DB and Rollback)

I changed UPDATEPKG and UPDATESYS from:

UPDATEPKG () {
clear
$pacrefresh
  [ -x /usr/sbin/pkg2db ] && /usr/sbin/pkg2db -r

to:

UPDATEPKG () {
clear
$pacrefresh
  [ -x /usr/sbin/pkg2db ] && /usr/sbin/pkg2db -n
  [ -x /usr/sbin/pkg2db ] && /usr/sbin/pkg2db -r
  [ -x /usr/sbin/pkg2db ] && /usr/sbin/pkg2db -d

is this ok?[/code]

Offline

#24 2005-04-07 13:53:30

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: Pacmenu (with DB and Rollback)

Penguin wrote:

I changed UPDATEPKG and UPDATESYS

It can be done, but the waiting time is long (> 60 sec.) when generating new database (pkg2db -n), especially for "pkg2db -d" (descriptionis). The "-r" (new in repo) is stand alone, but "-d" requires "-n".

Better solution will be to keep the installed database (/etc/pacmenu/pacmenu.db) and do update only whenever new upgrades or new packages in repos.

For upgrades of version number (ver) when $new and $pkgname are assigned:

sqlite /etc/pacmenu/pacmenu.db "UPDATE pkgs SET ver='$new' WHERE name='$pkgname'";

Markku

Offline

#25 2005-04-07 14:25:11

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: Pacmenu (with DB and Rollback)

why don't yous use an sql file with transactions? this way you could launch multiple task processing the files and then use cat with sqlite to commit all changes at once. could be faster than using sqlite very often.

Offline

Board footer

Powered by FluxBB