Add subroutines to replace functionality from Emdebian::Tools in shell scripts. Drop Emdebian::Tools dependency. (LP: #531143)

git-svn-id: http://emdebian.org/svn/current@6803 563faec7-e20c-0410-992a-a66f704d0ccd
main
codehelp 14 years ago
parent 1cf62effa3
commit 0b6329aaf9

4
debian/changelog vendored

@ -3,8 +3,10 @@ emdebian-rootfs (2.0.7) unstable; urgency=low
* [INTL:pt] Updated Portuguese program output translation
(Closes: #572929)
* Handle relative directories from the command line.
* Add subroutines to replace functionality from Emdebian::Tools
in shell scripts. Drop Emdebian::Tools dependency. (LP: #531143)
-- Neil Williams <codehelp@debian.org> Thu, 11 Mar 2010 16:39:36 +0000
-- Neil Williams <codehelp@debian.org> Fri, 12 Mar 2010 14:58:01 +0000
emdebian-rootfs (2.0.6) unstable; urgency=low

5
debian/control vendored

@ -4,7 +4,8 @@ Priority: extra
Maintainer: Neil Williams <codehelp@debian.org>
Uploaders: Wookey <wookey@debian.org>
Build-Depends: cdbs, debhelper (>= 5), po4a (>= 0.37.1), po-debconf
Build-Depends-Indep: devscripts, docbook-xml, docbook-xsl, gnupg, libxml2-utils, xml-core, xsltproc, intltool
Build-Depends-Indep: devscripts, docbook-xml, docbook-xsl, gnupg,
libxml2-utils, xml-core, xsltproc, intltool
Standards-Version: 3.8.4
Homepage: http://www.emdebian.org/
Vcs-Browser: http://buildd.emdebian.org/svn/browser/current/
@ -15,7 +16,7 @@ Architecture: all
Depends: ${perl:Depends}, ${misc:Depends}, apt, apt-cross (>= 0.5.0),
binutils-multiarch, debootstrap (>= 1.0.4), dpkg-cross (>= 2.1.0),
devscripts, emdebian-archive-keyring, multistrap, pbuilder, sudo, ucf,
libparse-debian-packages-perl, libemdebian-tools-perl
libparse-debian-packages-perl
Replaces: emdebian-tools (<= 1.4.3)
Recommends: gcc
Suggests: deb-gview, debian-xcontrol, screen | minicom

@ -24,12 +24,12 @@ use Parse::Debian::Packages;
use POSIX qw(locale_h);
use Locale::gettext;
use vars qw/ $progname $ourversion $dstrap $extra @aptsources
use vars qw/ $progname $ourversion $dstrap $extra @aptsources $mirror
@archives $deb $cachedir $config_str %packages $retval $str $retries
$dir $include $arch $foreign $suite $url $unpack $sourcedir $msg
@e $sourcesname $libdir $dpkgdir @debootstrap %suites %components $component $mirror $etcdir
$repo @dirs @touch %sources $section %keys $host $key $value $type
$file $config $tidy $noauth $keyring %keyrings $deflist @extrapkgs /;
$dir $include $arch $foreign $suite $url $unpack $sourcedir $msg $etcdir
@e $sourcesname $libdir $dpkgdir @debootstrap %suites %components
$component $repo @dirs @touch %sources $section %keys $host $key $value
$type $file $config $tidy $noauth $keyring %keyrings $deflist @extrapkgs /;
setlocale(LC_MESSAGES, "");
textdomain("multistrap");

@ -6,7 +6,7 @@ set -e
# Note that this script controls tarballs for empdebuild and emsandbox
# pass --cross to set an emsandbox tarball.
#
# Copyright (C) 2007-2008 Neil Williams <codehelp@debian.org>
# Copyright (C) 2007-2010 Neil Williams <codehelp@debian.org>
#
# This package is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -264,9 +264,9 @@ else # else if not $CROSS
# TODO this should be configurable - emdebian-tools will add a primary later.
# copy or use the ~/.apt-cross/sources.foo. files.
if [ ! $MIRROR ]; then
URL=`perl -e "use Emdebian::Tools; use Config::Auto; print &get_primary;"`
if [ ! -z "$URL" ]; then
MIRROR="http://${URL}/debian"
get_primary
if [ ! -z "$PRIMARY" ]; then
MIRROR="http://${PRIMARY}/debian"
fi
fi
if [ ! $MIRROR ]; then

@ -1,6 +1,6 @@
# empbuilderlib : shell library to support building chroots for Emdebian.
#
# Copyright (C) 2006-2008 Neil Williams <codehelp@debian.org>
# Copyright (C) 2006-2010 Neil Williams <codehelp@debian.org>
# Copyright (C) 2001-2007 Junichi Uekawa
#
# This package is free software; you can redistribute it and/or modify
@ -196,3 +196,25 @@ function save_aptcrosscache() {
done
fi
}
function get_aptcross_dir ()
{
if [ -z "$HOME" -o ! -d $HOME ]; then
$HOME = "/tmp";
fi
echo $HOME
path="$HOME/.apt-cross";
if [ ! -d $path ]; then
mkdir $path;
fi
}
function get_primary ()
{
get_aptcross_dir
if [ -f "$path/emsource.conf" ]; then
PRIMARY=`grep primary $path/emsource.conf|cut -d: -f2|tr -d ' '`
else
PRIMARY=`grep primary /etc/emsource.conf|cut -d: -f2|tr -d ' '`
fi
}

@ -3,7 +3,7 @@
# This file is POSIX shell, compatible with debootstrap.
# Do not include or reference pbuilder functions or bash code here.
#
# Copyright (C) 2006-2008 Neil Williams <codehelp@debian.org>
# Copyright (C) 2006-2010 Neil Williams <codehelp@debian.org>
#
# This package is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -24,25 +24,38 @@
# Intended solely for use on the build machine. Do not use these functions
# in second_stage_install !
OURVERSION=`perl -e 'use Emdebian::Tools; print &tools_version();'`
OURVERSION=`dpkg-query -W -f='${Version}' emdebian-rootfs`
get_aptcross_dir ()
{
if [ -z "$HOME" -o ! -d $HOME ]; then
$HOME = "/tmp";
fi
echo $HOME
path="$HOME/.apt-cross";
if [ ! -d $path ]; then
mkdir $path;
fi
}
get_default_arch ()
{
ARCH=`perl -e 'use Debian::DpkgCross; \
&read_config(); \
my $arch = &get_architecture(); \
print (qq/None.\n/) if (!$arch); \
print $arch;';`
if [ -f "/etc/dpkg-cross/cross-compile" ]; then
ARCH=`grep default_arch /etc/dpkg-cross/cross-compile|grep -v '^#'|cut -d'=' -f2`
fi
if [ -z "$ARCH" ]; then
ARCH="None"
fi
}
get_work_dir ()
get_work_dir ()
{
WORKDIR=`perl -e 'use Cwd; use Emdebian::Tools; use Config::Auto; use Debian::DpkgCross; \
&read_config; \
my $w = &get_workdir; \
$w = cwd if (! -d $w); \
$w =~ s/\/$//; \
print $w;';`
get_aptcross_dir
if [ -f "$path/emsource.conf" ]; then
WORKDIR=`grep workingdir $path/emsource.conf|cut -d: -f2|tr -d ' '`
else
WORKDIR=`grep workingdir /etc/emsource.conf|cut -d: -f2|tr -d ' '`
fi
}
get_work_dir

Loading…
Cancel
Save