Skip to content

Commit

Permalink
Import PortageXS-0.02.06
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten Veller committed Jan 16, 2011
1 parent 2bd63ee commit 92f557b
Show file tree
Hide file tree
Showing 11 changed files with 313 additions and 134 deletions.
19 changes: 18 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
Changes
-------

0.02.06
- fileBelongsToPackage(): Do not die if CONTENTS file is missing. (Reported by Michael Cummings <[email protected]>)
- Speedup functions getFilesOfInstalledPackage(), fileBelongsToPackage()
- Source cleanups
- New functions: disableColors(), getPackagesFromWorld(), recordPackageInWorld(), removePackageFromWorld()
- formatUseflags(): Also handle suffixes (% and *)
- added .cache dir to EXCLUDE_DIRS for use with paludis
- removed virtual dir from EXCLUDE_DIRS - we actually want virtuals in
- getPackagesFromCategory():
- Use PORTDIR by default
- New optional parameter to set the repository to use
- Check for dirs before trying to access them
- searchPackage(): Works - Feel free to use it now.
- Fixed bug #175175 - getArch() was not able to resolve the profile path if make.profile was an absolute path
- Apply fixes from bug #175175 to getProfilePath(); refactored getArch() and getUsemasksFromProfile()
- Make test getPortageXScategorylist() more robust

0.02.05
- New functions: getEbuildName(), getUsedescs(), getCategories(), formatUseflags() (from demerge 0.032), sortUseflags(), getUsemasksFromProfile(), getProfilePath(), resetCaches()
- Fixed some function descriptions
Expand All @@ -23,7 +40,7 @@ Changes
- Initscript for the server
- Runtime optimizations
- Basic server and client implemented

0.02.02
- New functions: searchPackage(), getReponame(), resolveMirror(), getUsedesc()
- New example: searchPackage.pl, resolveMirror.pl, getUsedesc.pl
Expand Down
33 changes: 17 additions & 16 deletions lib/PortageXS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package PortageXS;
#
# author : Christian Hartmann <[email protected]>
# license : GPL-2
# header : $Header: /srv/cvsroot/portagexs/trunk/lib/PortageXS.pm,v 1.9 2007/04/07 20:09:16 ian Exp $
# header : $Header: /srv/cvsroot/portagexs/trunk/lib/PortageXS.pm,v 1.12 2007/04/19 09:07:09 ian Exp $
#
# -----------------------------------------------------------------------------
#
Expand All @@ -17,7 +17,7 @@ package PortageXS;
#
# -----------------------------------------------------------------------------

$VERSION='0.02.05';
$VERSION='0.02.06';

use PortageXS::Core;
use PortageXS::System;
Expand Down Expand Up @@ -61,7 +61,8 @@ sub new {
$self->{'VERSION'} = $VERSION;

$self->{'PORTDIR'} = $self->getPortdir();
$self->{'PKG_DB_DIR'} = "/var/db/pkg/";
$self->{'PKG_DB_DIR'} = '/var/db/pkg/';
$self->{'PATH_TO_WORLDFILE'} = '/var/lib/portage/world';
$self->{'IS_INITIALIZED'} = 1;

$self->{'EXCLUDE_DIRS'}{'.'} = 1;
Expand All @@ -70,25 +71,25 @@ sub new {
$self->{'EXCLUDE_DIRS'}{'licenses'} = 1;
$self->{'EXCLUDE_DIRS'}{'eclass'} = 1;
$self->{'EXCLUDE_DIRS'}{'distfiles'} = 1;
$self->{'EXCLUDE_DIRS'}{'virtual'} = 1;
$self->{'EXCLUDE_DIRS'}{'profiles'} = 1;
$self->{'EXCLUDE_DIRS'}{'CVS'} = 1;
$self->{'EXCLUDE_DIRS'}{'.cache'} = 1;

$self->{'PORTAGEXS_ETC_DIR'} = "/etc/pxs/";
$self->{'ETC_DIR'} = "/etc/";
$self->{'MAKE_PROFILE_PATH'} = "/etc/make.profile";
$self->{'PORTAGEXS_ETC_DIR'} = '/etc/pxs/';
$self->{'ETC_DIR'} = '/etc/';
$self->{'MAKE_PROFILE_PATH'} = '/etc/make.profile';

# - init colors >
$self->{'COLORS'}{'YELLOW'} = color("bold yellow");
$self->{'COLORS'}{'GREEN'} = color("green");
$self->{'COLORS'}{'LIGHTGREEN'} = color("bold green");
$self->{'COLORS'}{'WHITE'} = color("bold white");
$self->{'COLORS'}{'CYAN'} = color("bold cyan");
$self->{'COLORS'}{'RED'} = color("bold red");
$self->{'COLORS'}{'BLUE'} = color("bold blue");
$self->{'COLORS'}{'RESET'} = color("reset");
$self->{'COLORS'}{'YELLOW'} = color('bold yellow');
$self->{'COLORS'}{'GREEN'} = color('green');
$self->{'COLORS'}{'LIGHTGREEN'} = color('bold green');
$self->{'COLORS'}{'WHITE'} = color('bold white');
$self->{'COLORS'}{'CYAN'} = color('bold cyan');
$self->{'COLORS'}{'RED'} = color('bold red');
$self->{'COLORS'}{'BLUE'} = color('bold blue');
$self->{'COLORS'}{'RESET'} = color('reset');

if (lc($self->getParamFromFile($self->getFileContents('/etc/make.conf'),"NOCOLOR","lastseen")) eq 'true') {
if (lc($self->getParamFromFile($self->getFileContents('/etc/make.conf'),'NOCOLOR','lastseen')) eq 'true') {
$self->{'COLORS'}{'YELLOW'} = '';
$self->{'COLORS'}{'GREEN'} = '';
$self->{'COLORS'}{'LIGHTGREEN'} = '';
Expand Down
Loading

0 comments on commit 92f557b

Please sign in to comment.