Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portside - New Tool for Managing package.*
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
BlueDragonX
n00b
n00b


Joined: 26 Mar 2004
Posts: 44
Location: United States

PostPosted: Sun Nov 28, 2010 9:30 am    Post subject: Portside - New Tool for Managing package.* Reply with quote

I have created Portside, a small tool for managing the package.* files.

I needed something that would be fast, simple, and that I could (with minimal effort) call from Puppet. The existing tools did not meet my needs in this area. Portside is fast because it does not make any checks against Portage to verify that your packages, use flags, or keywords exist. This is good because it keeps it fast. This is bad because it leaves the tool more open to user errors. Since the tool's initial purpose is to be called from an automated system this should not be an issue.

Portside is written in Python. It is written as a library with a CLI interface; you can call the library directly in your own Python code for more flexibility.

I've published it under a modified BSD license. Source and egg packages are available via Google Code at http://code.google.com/p/portside/. I intend to add an ebuild when I find some time. You can use setuptools until then.

If anyone sees this post and tries it out, please leave some feedback here. If you run into a bug, please post it in the project issues log.

Thanks,
Ryan
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43546
Location: 56N 3W

PostPosted: Sun Nov 28, 2010 1:58 pm    Post subject: Reply with quote

Moved from Gentoo Chat to Unsupported Software.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Rion
Guru
Guru


Joined: 12 Oct 2006
Posts: 377
Location: Ekaterinburg, Russia

PostPosted: Sun Nov 28, 2010 4:48 pm    Post subject: Reply with quote

is it somehow better/worse than flaggie?
_________________
~amd64
rion-overlay
Back to top
View user's profile Send private message
BlueDragonX
n00b
n00b


Joined: 26 Mar 2004
Posts: 44
Location: United States

PostPosted: Sun Nov 28, 2010 6:36 pm    Post subject: Reply with quote

I was unsatisfied with Flaggie's performance. I found that it executed very slowly, taking at minimum 1s to execute in my environment. I suspect this is due to the fact that Flaggie uses the Portage API.

In any case, I needed something that would be significantly faster, so I built this, and it is.
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Sun Nov 28, 2010 8:50 pm    Post subject: Reply with quote

Didn't have time to test it/look at the code, yet, but before I do, does it only handle single files or also the folder(s)+file(s) approach?
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
BlueDragonX
n00b
n00b


Joined: 26 Mar 2004
Posts: 44
Location: United States

PostPosted: Sun Nov 28, 2010 9:45 pm    Post subject: Reply with quote

Just single files at the moment and only package.use, .keywords, .mask, and .unmask.

I've uploaded the ebuild for the current version on the project page.
Back to top
View user's profile Send private message
BlueDragonX
n00b
n00b


Joined: 26 Mar 2004
Posts: 44
Location: United States

PostPosted: Mon Nov 29, 2010 2:41 am    Post subject: Reply with quote

In relation to using portside to manage package.* directories, I should point out it is possible, you just have to specify -F <file> to point it at a specific file. It defaults to /etc/portage/package.* and expects it to be a file.

I will be adding a shorthand method of doing this, though, as well as rc file support so default behavior can be managed.
Back to top
View user's profile Send private message
johnny99
Apprentice
Apprentice


Joined: 24 Oct 2005
Posts: 248
Location: Berkeley, California

PostPosted: Thu Dec 02, 2010 1:40 am    Post subject: Reply with quote

I tried to install flaggie today, and it bombed, but I'm not sure what to make of it.
Is flaggie compatible with Python 3.1?
Should I post a bug?

Code:
emerge app-portage/flaggie

 * IMPORTANT: 8 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-portage/flaggie-0.0.2.4
>>> Downloading 'http://distfiles.gentoo.org/distfiles/flaggie-0.0.2.4.tar.bz2'
--2010-12-01 17:33:08--  http://distfiles.gentoo.org/distfiles/flaggie-0.0.2.4.tar.bz2
Resolving distfiles.gentoo.org... 204.152.191.39, 156.56.247.195, 149.20.20.135, ...
Connecting to distfiles.gentoo.org|204.152.191.39|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mirrors.kernel.org/gentoo/distfiles/flaggie-0.0.2.4.tar.bz2 [following]
--2010-12-01 17:33:09--  http://mirrors.kernel.org/gentoo/distfiles/flaggie-0.0.2.4.tar.bz2
Resolving mirrors.kernel.org... 204.152.191.39, 149.20.20.135
Reusing existing connection to distfiles.gentoo.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 10272 (10K) [application/x-bzip2]
Saving to: `/usr/portage/distfiles/flaggie-0.0.2.4.tar.bz2'

100%[====================================================================================================>] 10,272      --.-K/s   in 0.006s 

2010-12-01 17:33:09 (1.75 MB/s) - `/usr/portage/distfiles/flaggie-0.0.2.4.tar.bz2' saved [10272/10272]

 * flaggie-0.0.2.4.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                             [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                   [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                  [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                 [ ok ]
 * CPV:  app-portage/flaggie-0.0.2.4
 * REPO: gentoo
 * USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU
>>> Unpacking source...
>>> Unpacking flaggie-0.0.2.4.tar.bz2 to /var/tmp/portage/app-portage/flaggie-0.0.2.4/work
>>> Source unpacked in /var/tmp/portage/app-portage/flaggie-0.0.2.4/work
>>> Preparing source in /var/tmp/portage/app-portage/flaggie-0.0.2.4/work/flaggie-0.0.2.4 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-portage/flaggie-0.0.2.4/work/flaggie-0.0.2.4 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-portage/flaggie-0.0.2.4/work/flaggie-0.0.2.4 ...
 * Building of app-portage/flaggie-0.0.2.4 with CPython 2.6...
python2.6 setup.py build -b build-2.6
running build
running build_py
creating build-2.6
creating build-2.6/lib
creating build-2.6/lib/flaggie
copying lib/flaggie/packagefile.py -> build-2.6/lib/flaggie
copying lib/flaggie/cache.py -> build-2.6/lib/flaggie
copying lib/flaggie/cli.py -> build-2.6/lib/flaggie
copying lib/flaggie/cleanup.py -> build-2.6/lib/flaggie
copying lib/flaggie/action.py -> build-2.6/lib/flaggie
copying lib/flaggie/__init__.py -> build-2.6/lib/flaggie
warning: build_py: byte-compiling is disabled, skipping.
running build_scripts
creating build-2.6/scripts-2.6
copying and adjusting flaggie -> build-2.6/scripts-2.6
changing mode of build-2.6/scripts-2.6/flaggie from 644 to 755
 * Building of app-portage/flaggie-0.0.2.4 with CPython 3.1...
python3.1 setup.py build -b build-3.1
running build
running build_py
creating build-3.1
creating build-3.1/lib
creating build-3.1/lib/flaggie
copying lib/flaggie/packagefile.py -> build-3.1/lib/flaggie
copying lib/flaggie/cache.py -> build-3.1/lib/flaggie
copying lib/flaggie/cli.py -> build-3.1/lib/flaggie
copying lib/flaggie/cleanup.py -> build-3.1/lib/flaggie
copying lib/flaggie/action.py -> build-3.1/lib/flaggie
copying lib/flaggie/__init__.py -> build-3.1/lib/flaggie
warning: build_py: byte-compiling is disabled, skipping.

running build_scripts
creating build-3.1/scripts-3.1
Traceback (most recent call last):
  File "setup.py", line 34, in <module>
    'Topic :: System :: Installation/Setup'
  File "/usr/lib64/python3.1/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/usr/lib64/python3.1/distutils/dist.py", line 919, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python3.1/distutils/dist.py", line 938, in run_command
    cmd_obj.run()
  File "/usr/lib64/python3.1/distutils/command/build.py", line 128, in run
    self.run_command(cmd_name)
  File "/usr/lib64/python3.1/distutils/cmd.py", line 315, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/python3.1/distutils/dist.py", line 938, in run_command
    cmd_obj.run()
  File "/usr/lib64/python3.1/distutils/command/build_scripts.py", line 51, in run
    self.copy_scripts()
  File "/usr/lib64/python3.1/distutils/command/build_scripts.py", line 83, in copy_scripts
    first_line = f.readline()
  File "/usr/lib64/python3.1/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 134: ordinal not in range(128)
 * ERROR: app-portage/flaggie-0.0.2.4 failed:
 *   Building failed with CPython 3.1 in distutils_building() function
 *
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 4791:  Called distutils_src_compile
 *   environment, line 1326:  Called python_execute_function 'distutils_building'
 *   environment, line 3539:  Called die
 * The specific snippet of code:
 *                       die "${failure_message}";
 *
 * If you need support, post the output of 'emerge --info =app-portage/flaggie-0.0.2.4',
 * the complete build log and the output of 'emerge -pqv =app-portage/flaggie-0.0.2.4'.
 * The complete build log is located at '/var/log/portage/app-portage:flaggie-0.0.2.4:20101202-013309.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-portage/flaggie-0.0.2.4/temp/environment'.
 * S: '/var/tmp/portage/app-portage/flaggie-0.0.2.4/work/flaggie-0.0.2.4'
!!! A network error occured while trying to send logmail:
[Errno 111] Connection refused
Sure you configured PORTAGE_ELOG_MAILURI correctly?

>>> Failed to emerge app-portage/flaggie-0.0.2.4, Log file:

>>>  '/var/log/portage/app-portage:flaggie-0.0.2.4:20101202-013309.log'


emerge --info
Code:

Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.4.4, glibc-2.11.2-r3, 2.6.35-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.35-gentoo-r5-x86_64-Dual_Core_AMD_Opteron-tm-_Processor_265-with-gentoo-1.12.13
Timestamp of tree: Wed, 01 Dec 2010 19:30:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       3.4.6-r2, 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/porage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 avi berkdb bitmap-fonts bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dlloader dri dts dvd dvdr eds emboss encode esd exif fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal iconv ipv6 isdnlog jack jack-tmpfs java jpeg kde lcms ldap libg++ libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pango pcre pdf pdflib perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb valias vorbis x264 xcb xcomposite xml xorg xulrunner xv xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias  auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2803
Location: Richmond, BC, Canada

PostPosted: Thu Dec 02, 2010 2:05 am    Post subject: Reply with quote

I don't know if the code is 3.1 ready, but that error, you should be able to work around by setting your LANG="en_US.utf8". python-3.1 needs a unicode LANG set or distutils bombs if LANG=C.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
johnny99
Apprentice
Apprentice


Joined: 24 Oct 2005
Posts: 248
Location: Berkeley, California

PostPosted: Thu Dec 02, 2010 2:18 am    Post subject: Reply with quote

Perfect! Thank you.
Code:
cat >> /etc/env.d/02locale <<'EOF'
LANG="en_US.UTF-8"
LC_COLLATE="C"
EOF
env-update && source /etc/profile
source ~/.bashrc
locale
emerge flaggie

success!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum