You are not logged in.

#1 2007-10-15 13:44:24

Pajaro
Member
Registered: 2004-04-21
Posts: 884

tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

0.5.6.1:
- call pacman through sudo.
- implement aur rpc.
- fix no single aur results bug.
** pending: check why it gets messed when you erase a repo. By now you can run:

rm /var/lib/tupac/*

0.5.5:
- Added an option '--aur-updates' that checks the version of installed aur packages. NOTE: it highlights if the version does not match, not if there's an update.
0.5.4.1:
- Fixed a bug that prevented out of date results from appearing in aur searches
- Added settings option called VERBOSITY. If set to 1 it enables the old tupac behavior in which every single package update get listed. (requested on AUR)
0.5.4:
- Fixed german bug
- Fixed bug updating database
- Fixed bug with proxy
- Added the possibility to use an alternate command instead of pacman through custom settings. checkout tupac --help

***PKGBUILD update: Now it is stored on sourceforge[b]. No more server disappearence anymore.

[b]Version history:
0.5.3.2:
- Reorganized directory structure.
0.5.2:
- Fixed bug: added '+' character as a valid caracter for versioning numbers.
0.5.1.2:
- Fix wrong version displaying of _NO_REPO_ results.
0.5.1.1:
- Fix php bug that prevented fresh cache creations. too much optimization for php.
0.5.1:
- Added --console option that starts a shell for pipe interaction
0.5:
- Added incremental cache to everything (local and filelist where pending it).
0.4.1.1:
- German localization added
0.4.1:
- Proxy error message wasn't localized
- Added independent internal versioning for TUPAC_CACHE (now it won't get updated on every tupac update).
0.4:
- Improved cache check speed time via new .lastupdate files pacman creates on each repo.
- Added multilanguage suport (it uses LANG variable). Current languages es_ES, es_AR (copy of es_ES), en_US, en_EN (copy of en_EN), ca_ES
- Added gui/cli better wrapping via metalanguage "machine"
- Added "--lang" option to set the language in command line.
- Removed some unneeded verbosity
0.3.5:
- Now it returns all aur results! (not limited to 200 anymore)
- Added --safe option to search only for safe packages in aur
- Added --set-proxy option to setup a proxy. See "tupac --help".
0.3.4.2:
- Updated to work with pacman 3.1
0.3.4:
- Now yaourt is only used when installing packages from aur... It was a big delay for nothing.
- You can specify working repos with --repos repo1,repo2,...
0.3.3:
- Added an option to change color scheme
0.3.2:
- Added incremental cache. Now it is much faster.
- Since it shows changes in repos when updating cache, tupac with no arguments now updates cache so that you can see what changed.
0.2.9.1:
- fix typo errors in child program calling function.
0.2.9:
- Support for "alias pacman=tupac"
- Show in search results what packages of AUR are SAFE.
- Improved subprocess handling (now control+c actually kills the child process).
- Slightly improved performance.
- Fix filename handling when it contains ? or $ (it treats them properly, but it stills shows strange output when one if this files is to be printed).
- Fix symbolic links recognition when searching for file owner.
0.2.8
- Fixed external programs behaivour. Now pacman progress bars and vi behave normally.
0.2.7
- Added --orphans option that finds files with no owner in a directory.
- Fixed symlinks processing.
0.2.6:
- Added a message recommending you to run tupac --checkdir as root to get real information.
0.2.5
- Removed unnecessary prompts.
- Added --checkdir functionality:
   * it checks if in the the provided directory any packages misses any file.
   * It is intended to help you recover your system from mistakes/errors.
   * It has a progress indicator.
0.2.4
- Fixed the bug that prevented tupac from showing norepo search results when aur search was omitted.
- Now it checks that contents of /var/lib/pacman are directories, and if not, it omits them.
- Moved all naming and directories from pajman to tupac.
0.2.3
- BUG FIXED: The problem was with finding file owner of packages that weren't part of any repo.
0.2.2
- Fixed initial bug with new default php.ini configuration
______________________-

I wrote a cached pacman implementation. It is really fast. See the information below.

I wrote it because i loved yaourt but i didn't like its performance.

I added the functionality to perform AND searches both in local and AUR repositories. Adding words to the search string actually filters the search. It doesn't add more results or tries to find the exact phrase.

The cache updates automatically, so there's nothing to care about.

It is written in php and uses yaourt to perform installations, so it is included as a dependency.

NOTE: After last update my php got corrupted. If this happens to you, you will have to fix it by editing the file /etc/php/php.ini and changing extension_dir to extension_dir = "/usr/lib/php/20060613/"

It can be found on AUR.

tupac --help

tupac: A cached pacman implementatioin. Version: 0.4

 Usage:
  tupac [word] [word] [word] ...     : Search for and install packages that match all [word]
  tupac -Ss [word] [word] [word] ... : Search for packages that match all [word]
  tupac -Qo [file] [file] [file] ... : Search for each [file] owner
  tupac --checkdir [directory]       : Check integrity of a directory.
  tupac --orphans [directory]        : Find files that are not part of any package
  tupac                              : Just update cache
  tupac [anything else]              : bypass to yaourt
  tupac --set-proxy [host:port|none] : set up a proxy

 Modifiers:
  --safe                             : Only search for safe packages
  --noaur                            : Don't search in AUR
  --noprompt                         : Don't prompt anything
  --color [darkbg|lightbg|nocolor]   : Choose color scheme
  --repos repo1,repo2,repo3,...      : Set active repositories
  --lang [xx_XX|machine]             : Set working language

tupac vs pacman
SEARCHING: (aur search omited on tupac)

[franki@patito php]$ time pacman -Ss kde>/dev/null

real    0m0.537s
user    0m0.227s
sys     0m0.300s
[franki@patito php]$ time tupac --noaur -Ss kde>/dev/null

real    0m0.201s
user    0m0.147s
sys     0m0.047s

FIND FILE OWNER:

this test is not relevant anymore, since pacman became slightly faster (once cached).

tupac vs yaourt
SEARCHING: (tupac gives 100 more results from AUR)

[franki@patito php]$ time yaourt -Ss kde>/dev/null

real    0m59.746s
user    0m12.156s
sys     0m41.927s
[franki@patito php]$ time tupac -Ss kde>/dev/null

real    0m3.182s
user    0m0.470s
sys     0m0.057s

improved search
EXAMPLE: looking for "3d game"

yaourt -Ss 3d game -> 4 results (it only includes packages that match exactly '3d game')

pacman -Ss 3d game -> 109 results (it includes all packages that include any of both words)

tupac -Ss 3d game -> 33 results (all packages contain the word 3d AND the word game)

REGENERATION CACHE:

[franki@patito php]$ time tupac -Ss gaupol
==> Generating PAJMAN_CACHE
1 aur/gaupol 0.12.1-1 - This is the installed version
    An editor for text-based subtitles

real    0m1.878s
user    0m0.893s
sys     0m0.290s

[franki@patito php]$ time tupac -Qo /opt/kde/bin/startkde
==> Reusing existing PAJMAN_CACHE
==> Creating file list (it doesn't exist)
/opt/kde/bin/startkde is owned by kdemod-kdebase 3.5.7-20

real    0m1.727s
user    0m1.323s
sys     0m0.327s

I hope you like it smile

PS: I am open to any comments/issues/improvements you may have/suggest.

Last edited by Pajaro (2009-08-08 23:23:54)

Offline

#2 2007-10-15 14:14:47

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

well better name than yaourt. Speedtests are great too tongue

But why php? Cant run this, typing tupac just prints the php code into screen...
No lamp on this machine, just the php installed. So am i supposed to install and config whole lamp to use this ?

Offline

#3 2007-10-15 14:49:00

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

why php? Because it is object oriented, because it is much more clear than bash, because it has the serialize function that makes caching a blink and because i mainly code in php.

I don't understand why it outputs the code when you run it. To me it works fine. it is a standard unix executable with #!/usr/bin/php.

Maybe you can check if the file is really an executable. Try:
chmod a+rx /usr/bin/tupac

Last edited by Pajaro (2007-10-15 14:49:32)

Offline

#4 2007-10-15 15:02:52

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

Same problem here.  PHP is in the right place, and tupac is executable.  Running

php /usr/bin/tupac

does the same thing.


Cthulhu For President!

Offline

#5 2007-10-15 19:26:22

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

I added the php 5 <?php instead of simply <? and added the paremeter -q.

Can you try if now it works?

If it doesn't, can you check if running this works?

php /usr/bin/tupac -Ss caca

Thank you in advance

Offline

#6 2007-10-15 19:37:42

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

Well, it runs.

sudo tupac -Ss yaourt
==> Generating PAJMAN_CACHE

Running it more times generates the same message.  The cache isn't created and it can't be run as a normal user.


Cthulhu For President!

Offline

#7 2007-10-15 19:47:33

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

I will add a progress indicator to the cache generation process.

Also, when i can, i will test it on another computer.

Offline

#8 2007-10-15 20:29:04

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

buttons wrote:

Well, it runs.

sudo tupac -Ss yaourt
==> Generating PAJMAN_CACHE

Running it more times generates the same message.  The cache isn't created and it can't be run as a normal user.

same ^^

PAJMAN_CACHE? should be pacman cache?

Offline

#9 2007-10-15 21:00:33

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

It is called PAJMAN_CACHE because initially it was thought to be a rewrite of pajman, another pacman wrapper that i wrote. Now it should be called TUPAC_CACHE, but first i want to fix the errors.

Can you answer this questions?
1) Does the program do anything else? Or it stays creating PAJMAN_CACHE forever till you cancel it?
2) Does the program create the directory /var/lib/pajman? Are there any files inside?

It is very difficult to solve the problems if it works perfectly in my computer, so any feedback will be appreciated.

Offline

#10 2007-10-15 21:07:38

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

Are you sure you won't get sued for the name of the application? lol


Follow me in: Identi.ca, Twitter, Google+

Offline

#11 2007-10-15 21:12:15

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

It generates the same problem as above. It spits out Generating PAJMAN_CACHE, nothing else seems to happen.

Offline

#12 2007-10-15 21:12:31

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

I don't think i'll sue myself yet tongue

Offline

#13 2007-10-15 21:26:49

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

Maybe it is the php version. Mine is 5.2.4-7, but i think tupac should work on any php5 installation.

Offline

#14 2007-10-15 21:40:25

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

My friend told me that he would lend me the laptop if it doesn't work in his computer, so maybe tomorrow i will have something clear.

Another idea
It may be related to php configuration. If you can, can you set the first line to look like this?
/usr/bin/tupac

#!/usr/bin/php -n

the '-n' parameter will avoid using php.ini (it will use default configuration). This way also works fine for me.

Offline

#15 2007-10-15 21:45:12

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

Ok, I was able to reproduce the problem. I changed php.ini to the current default configuration (php.ini.pacnew).

Let's see what i find... tongue

Offline

#16 2007-10-15 21:47:39

dir
Member
From: dotph
Registered: 2007-10-10
Posts: 20

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

It works here with #!/usr/bin/php -n

Offline

#17 2007-10-15 21:51:51

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

I was able to reproduce the problem it had. It was related to the new php.ini configuration.

I fixed that by setting the executable to be:
#!/usr/bin/php -n

Aur package updated!

Offline

#18 2007-10-15 21:52:11

dir
Member
From: dotph
Registered: 2007-10-10
Posts: 20

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

I think there's a bug in tupac -Qo:

dir@ayahuasca ~ $ tupac -Qo /usr/bin/tupac 
==> Reusing existing PAJMAN_CACHE
==> Reusing existing file list
/usr/bin/tupac has no owner
dir@ayahuasca ~ $ pacman -Qo /usr/bin/tupac 
/usr/bin/tupac is owned by tupac 0.2.1-1
dir@ayahuasca ~ $

Offline

#19 2007-10-15 22:15:35

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

BUG FIXED. AUR UPDATED.

[franki@patito abs.local]$ tupac -Qo /usr/bin/tupac
==> Regenerating PAJMAN_CACHE
==> Creating file list (it doesn't exist)
/usr/bin/tupac is owned by tupac 0.2.3-1

The problem was with packages that weren't part of any repo.

Offline

#20 2007-10-15 22:19:58

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

MINOR BUG: Found another bug. If you omit aur search, it doesn't show packages that are not part of any repo. it should show them tagged as _NO_REPO_

But this will come tomorrow... good night!

Last edited by Pajaro (2007-10-15 22:20:31)

Offline

#21 2007-10-15 23:58:51

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

sudo tupac -Ss yaourt
==> Generating PAJMAN_CACHE

Warning: dir(/var/lib/pacman//Victor.db.tar.gz.part): failed to open dir: Not a directory in /usr/bin/tupac on line 189

Fatal error: Call to a member function read() on a non-object in /usr/bin/tupac on line 190

 -- files in /var/lib --
pacman/  pajman/

Last edited by buttons (2007-10-15 23:59:09)


Cthulhu For President!

Offline

#22 2007-10-16 07:53:48

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

UPDATED 0.2.4. AUR UPDATED
- Fixed the bug that prevented tupac from showing norepo search results when aur search was omitted.
- Now it checks that contents of /var/lib/pacman are directories, and if not, it omits them.
- Moved all naming and directories from pajman to tupac.

ATENTION: - If you plan to erase /var/lib/pajman (with J of paJaro) be careful. It is very similar to the most important directory in arch. This was another reason to move naming. Never erase it if you are drunk, sleepy, stressed or under any circumstance that may reduce your concentration.. wink

Offline

#23 2007-10-16 08:13:12

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

NOTE: tupac doesn't take care of what pacman.conf says. It will show any package that is in the db (/var/lib/pacman), even if it is disabled in pacman configuration.

I don't find necessary to implement this, but if somebody wants it i can develop it.

Offline

#24 2007-10-16 10:19:23

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

Well now it works, and it's super fast compared to yaourt cool

mikko@desktop:~$ time tupac -Ss kde>/dev/null
real    0m3.321s
user    0m0.400s
sys     0m0.057s

mikko@desktop:~$ time yaourt -Ss kde>/dev/null
real    1m18.245s
user    0m17.322s
sys     0m12.666s

mikko@desktop:~$ time pacman -Ss kde>/dev/null
real    0m2.112s
user    0m0.233s
sys     0m0.430s

Now if I'd have an alias file for pacman to use always the fastest option (yaourt, tupac, pacman for aur, searching, installing) I'd be  happy ^^

Offline

#25 2007-10-16 11:28:46

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: tupac (TUrbo PACman) - a cached pacman implementation. UPDATED 0.5.6.1

Wow, I've never seen a search performed so fast! This is really great, thanks for your work big_smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

Board footer

Powered by FluxBB