You are not logged in.

#1 2010-11-01 15:04:48

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

[solved] gtkpacman issue?

I realize that it probably isn't supported here because it's from yaourt, so all I'm going to ask, is if anyone at this time is having issues with starting gtkpacman. I'm getting this:

# gtkpacman
  File "/usr/bin/gtkpacman", line 80
    print "Pacman version : %s" %database.ver
                              ^
SyntaxError: invalid syntax

I tried to fix the syntax, but everything I tried would just bring another syntax error somewhere else in /usr/bin/gtkpacman.

More info can be found here.

Thanks!

Last edited by dedanna1029 (2010-11-12 14:40:24)

Offline

#2 2010-11-01 23:39:10

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,413
Website

Re: [solved] gtkpacman issue?

Change the top line of /usr/bin/gtkpacman to use python2 instead of python.

Offline

#3 2010-11-03 23:11:43

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

Re: [solved] gtkpacman issue?

Trying now. Thanks so much!

Offline

#4 2010-11-03 23:15:40

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

Re: [solved] gtkpacman issue?

I've just made the edit, and reinstalled gtkpacman, and still get an error:

# gtkpacman
Traceback (most recent call last):
  File "/usr/bin/gtkpacman", line 62, in <module>
    from gtkPacman import gui, database
ImportError: No module named gtkPacman

Now it's not seeing it at all. :(

Here's /usr/bin/gtkpacman file:

#!/usr/bin/python2
# This file is part of gtkPacman.

# gtkPacman is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# gtkPacman is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with gtkPacman; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
# gtkPacman is copyright (C)2005-2008 by Stefano Esposito


def get_fname_and_icons():

    from os.path import exists, abspath, join

    path = "/usr/share/gtkpacman"
    if not exists(path):
        path = abspath("data/")

    
    icons = {}
    fname = join(path, "gtkpacman.glade")
    icons["red"] = join(path, "icons/red_box.png")
    icons["yellow"] = join(path, "icons/yellow_box.png")
    icons["green"] = join(path, "icons/green_box.png")
    icons["pacman"] = join(path, "icons/pacman.png")
    

    return fname, icons

def make_icons(icons):
    from gtk.gdk import pixbuf_new_from_file
    from gtk import IconSet, IconFactory
    
    for icon_name in icons.keys():
        icon = pixbuf_new_from_file(icons[icon_name])
        icon_set = IconSet(icon)
        icon_factory = IconFactory()
        icon_factory.add(icon_name, icon_set)
        icon_factory.add_default()
        continue
    return


if __name__ == "__main__":

    from os import getuid
    from os.path import exists
    from locale import setlocale, LC_ALL
    from gettext import install
    from gtk import main
    from gtk.glade import bindtextdomain, textdomain
    from gtkPacman import gui, database


    fname, icons = get_fname_and_icons()

    
    setlocale(LC_ALL, '')

    if exists("/usr/share/locale/it/LC_MESSAGES/gtkpacman.mo"):
        path="/usr/share/locale"
    else:
        path="data/locale"
        
    bindtextdomain('gtkpacman', path)
    textdomain('gtkpacman')
    install('gtkpacman', path, unicode=1)

    database = database()
    print "Pacman version : %s" %database.ver
    
    make_icons(icons)
    
    gui = gui(fname, database, getuid(), icons["pacman"])
    
    main()

See, this is what I mean by it - fix one thing, and up pops another... :(

Last edited by dedanna1029 (2010-11-03 23:22:01)

Offline

#5 2010-11-12 02:44:39

viking60
Member
From: Valhalla
Registered: 2010-08-02
Posts: 95
Website

Re: [solved] gtkpacman issue?

Yes that thing is broken - confirmed here. Same story. I just removed it.


"Common sense is not common"

Offline

#6 2010-11-12 06:53:21

jib2
Member
From: Paris, France
Registered: 2009-08-13
Posts: 93

Re: [solved] gtkpacman issue?

PKGBUILD updated. Installed and tested (a bit). Seems to work OK.

Offline

#7 2010-11-12 07:18:55

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [solved] gtkpacman issue?

As I already posted elsewhere, all you need to do is change 'python' to 'python2' in the PKGBUILD.

Offline

#8 2010-11-12 11:27:19

viking60
Member
From: Valhalla
Registered: 2010-08-02
Posts: 95
Website

Re: [solved] gtkpacman issue?

jib2 wrote:

PKGBUILD updated. Installed and tested (a bit). Seems to work OK.

Works fine now! Thanks!


"Common sense is not common"

Offline

#9 2010-11-12 12:23:42

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [solved] gtkpacman issue?

Can we assume you're aware of the unforgivably huge flaw in gtkpacman's design? Your apparent enthusiasm suggests otherwise.

Read the AUR comments from May for details - or just read /usr/lib/python2.7/site-packages/gtkPacman/terminal.py .

Offline

#10 2010-11-12 12:44:27

viking60
Member
From: Valhalla
Registered: 2010-08-02
Posts: 95
Website

Re: [solved] gtkpacman issue?

Yes you can assume that. And you have obviously never seen me enthusiastic:) I do not use it much - just for an occasional search. I agree that it is a bit dangerous.
Pacman-notifier is broken too due to the Ruby update btw.


"Common sense is not common"

Offline

#11 2010-11-12 14:21:55

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

Re: [solved] gtkpacman issue?

tomk wrote:

As I already posted elsewhere, all you need to do is change 'python' to 'python2' in the PKGBUILD.

From what I remember, someone above had said to change the top line of /usr/bin/gtkpacman to use python2, which is what I tried. Thanks.

About to try the new version - we'll see what happens.

As you can see also from here, where I put the arrows (--->):

yaourt -S gtkpacman

==> Downloading gtkpacman PKGBUILD from AUR...
x PKGBUILD

Comment by: Falcata on Sat, 29 May 2010 16:33:25 +0000
Use this program at your own risk!  This program is designed so that it will remove software with the -d switch, meaning it won't check if what you are removing is a dependency for another software package.  Using this program to remove software puts you at risk for breaking your system.    

Comment by: hunterm on Wed, 28 Jul 2010 17:43:11 +0000
Can't someone fix it? I've tried, but I'm not fluent in python, so I can't find what actually installs it.    

Comment by: saleem on Fri, 22 Oct 2010 09:49:05 +0000
this fix will let gtkpacman to work with latest python2

http://pastebin.com/eHRJf3vt

thanks    

Comment by: killajoe on Fri, 22 Oct 2010 12:55:36 +0000
CRLF Error with saleem's PKGBUILD...

http://aur.pastebin.com/raw.php?i=1RL8JB2L    

---->Comment by: Letarch on Mon, 25 Oct 2010 08:13:28 +0000
sudo gtkpacman 
File /usr/bin/gtkpacman, line 80
print Pacman version : %s %database.ver
^
SyntaxError: invalid syntax

Comment by: killajoe on Mon, 25 Oct 2010 08:25:42 +0000
Letarch use this PKGBUILD:
http://aur.pastebin.com/raw.php?i=1RL8JB2L

--->Fixed for latest python2 by saleem ;)    

First Submitted: Mon, 08 Jan 2007 11:23:41 +0000    
gtkpacman 2.3.1-2 : GTK package manager for archlinux based on pacman

I took the time yesterday, since I couldn't fix it myself, to report it to Berlios here - I'm glad it was noted and acted on.

Last edited by dedanna1029 (2010-11-12 14:36:52)

Offline

#12 2010-11-12 14:29:14

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

Re: [solved] gtkpacman issue?

And yes, it works now!  From what I understand, /usr/bin/gtkpacman isn't where the issue was anyway.

Thank you Berlios! smile

I only use it for an occassional search as well, but a lot of the time those searches are important - gtkpacman gives me more info on packages than pacman does, and a lot of the time, that's the info I need.

Last edited by dedanna1029 (2010-11-12 14:30:23)

Offline

#13 2010-11-12 14:34:30

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

Re: [solved] gtkpacman issue?

jib2 wrote:

PKGBUILD updated. Installed and tested (a bit). Seems to work OK.

Thank you! smile  <3

Last edited by dedanna1029 (2010-11-12 15:13:17)

Offline

#14 2010-11-12 22:04:07

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [solved] gtkpacman issue?

dedanna1029 - allow me to clarify the situation for you.

The gtkpacman project is inactive. The most recent release is 2.3.1 from February 2008, and the most recent SVN commit was in December of the same year. Your bug report was not read, let alone actioned, by any upstream developer. jib2 had a look at the PKGBUILD in the AUR and applied the fixes that he believed were necessary to accommodate Arch's current python implementation. His work is "the latest version in yaourt" that is now working for you.

I hope this information is helpful.

Offline

Board footer

Powered by FluxBB